Made acceptable for our ANSI C compiler
authorceriel <none@none>
Tue, 3 Dec 1991 11:03:58 +0000 (11:03 +0000)
committerceriel <none@none>
Tue, 3 Dec 1991 11:03:58 +0000 (11:03 +0000)
util/cgg/booth.h
util/cgg/main.c
util/int/dump.c
util/int/io.c
util/int/log.c
util/int/moncalls.c
util/int/monstruct.c
util/int/switch/mkiswitch.c
util/int/switch/mkswitch.c
util/int/trap.c

index e44c8a4..7c5d944 100644 (file)
@@ -53,7 +53,13 @@ extern char *iname;                  /* stdin */
 typedef char byte;
 typedef char * string;
 
-extern char *malloc(),*myalloc();
+extern char *myalloc();
+
+#if __STDC__
+#include <stdlib.h>
+#else
+extern char *malloc();
+#endif
 
 #include <cg_pattern.h>
 
index 7bf82b1..9254df4 100644 (file)
@@ -17,7 +17,7 @@ extern char *sprintf();
 char * myalloc(n) {
        register char *p;
 
-       p= (char*) malloc((unsigned)n);
+       p= malloc((unsigned)n);
        if (p==0) {
                yyerror("Out of core");
                exit(1);
index e64db3e..1ddea51 100644 (file)
@@ -31,8 +31,6 @@ extern long inr;                      /* from log.c */
        although it is not directly evident how.
 */
 
-extern char *sprintf();
-
 PRIVATE char *displ_undefs(), *displ_fil(), *displ_sh(), *displ_code();
 PRIVATE ptr std_raw(), std_rsb();
 PRIVATE int std_bytes(), dtd_bytes(), FRAd_bytes();
index 1763207..45188a0 100644 (file)
@@ -12,9 +12,6 @@
 #include       "mem.h"
 #include       "linfil.h"
 
-extern char *sprintf();
-extern _doprnt();
-
 extern int running;                    /* from main.c */
 extern char *prog_name;                        /* from main.c */
 extern char *load_name;                        /* from init.c */
@@ -162,7 +159,7 @@ PRIVATE do_fatal(fp, fmt, ap)
        fprintf(fp, "(Fatal error) ");
        if (load_name)
                fprintf(fp, "%s: ", load_name);
-       _doprnt(fmt, ap, fp);
+       vfprintf(fp, fmt, ap);
        fputc('\n', fp);
 }
 
@@ -177,7 +174,7 @@ message(va_alist)
        va_start(ap);
        {
                register char *fmt = va_arg(ap, char *);
-               _doprnt(fmt, ap, mess_fp);
+               vfprintf(mess_fp, fmt, ap);
        }
        va_end(ap);
 
index 9cd174e..b75922d 100644 (file)
@@ -13,7 +13,6 @@
 
 #ifdef LOGGING
 
-extern char *sprintf();
 extern int strlen();
 extern char *strcpy();
 
@@ -256,10 +255,10 @@ do_log(va_alist)
                if (fmt[0] == '@') {
                        /* include position */
                        fprintf(log_fp, "%.4s%s, ", fmt, position());
-                       _doprnt(&fmt[4], ap, log_fp);
+                       vfprintf(log_fp, &fmt[4], ap);
                }
                else {
-                       _doprnt(&fmt[0], ap, log_fp);
+                       vfprintf(log_fp, &fmt[0], ap);
                }
        }
        va_end(ap);
index 7a6d955..d229b65 100644 (file)
@@ -11,6 +11,9 @@
 
 #include       <sys/types.h>
 #include       <sys/stat.h>
+#if __STDC__
+#include       <time.h>
+#endif
 #include       <sys/times.h>
 
 extern int errno;                      /* UNIX error number */
@@ -54,7 +57,6 @@ struct timeb {                        /* non-existing; we use an ad-hoc definition */
 
 #define        DUPMASK         0x40
 
-extern long times();
 extern long lseek();
 #ifdef SYS_V
 extern unsigned int alarm();
index 557018b..780d089 100644 (file)
@@ -12,6 +12,9 @@
 
 #include       <sys/types.h>
 #include       <sys/stat.h>
+#if __STDC__
+#include       <time.h>
+#endif
 #include       <sys/times.h>
 #include       <sgtty.h>
 
index 080c744..6c5d05b 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <stdio.h>
 
-extern char *sprintf();
 extern FILE *popen();
 
 #include <ip_spec.h>
index 720755f..d4d3ce4 100644 (file)
@@ -13,7 +13,6 @@
 
 #include <stdio.h>
 
-extern char *sprintf();
 extern FILE *popen();
 
 char *progname;
index f54e22a..39729c5 100644 (file)
@@ -18,8 +18,6 @@
 #include       "rsb.h"
 #include       "fra.h"
 
-extern char *sprintf();
-
 extern jmp_buf trapbuf;                        /* from main.c */
 
 int must_test;                         /* TEST-bit on in EM header word 2 */