ANSIfication; bug report 4.3BSD/bin/223
[unix-history] / usr / src / old / cpp / cpp.c
index 2d0b0fa..5564bac 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)cpp.c      1.15 %G%";
+static char sccsid[] = "@(#)cpp.c      1.17 %G%";
 #endif lint
 
 #ifdef FLEXNAMES
 #endif lint
 
 #ifdef FLEXNAMES
@@ -8,6 +8,7 @@ static char sccsid[] = "@(#)cpp.c       1.15 %G%";
 #define        NCPS    8
 #endif
 
 #define        NCPS    8
 #endif
 
+# include "sys/param.h"
 # include "stdio.h"
 # include "ctype.h"
 /* C command
 # include "stdio.h"
 # include "ctype.h"
 /* C command
@@ -968,10 +969,10 @@ subst(p,sp) register char *p; struct symtab *sp; {
        dump();
        if (sp==ulnloc) {
                vp=acttxt; *vp++='\0';
        dump();
        if (sp==ulnloc) {
                vp=acttxt; *vp++='\0';
-               sprintf(vp,"%d",lineno[ifno]); while (*vp++);
+               (void)sprintf(vp,"%d",lineno[ifno]); while (*vp++);
        } else if (sp==uflloc) {
                vp=acttxt; *vp++='\0';
        } else if (sp==uflloc) {
                vp=acttxt; *vp++='\0';
-               sprintf(vp,"\"%s\"",fnames[ifno]); while (*vp++);
+               (void)sprintf(vp,"\"%s\"",fnames[ifno]); while (*vp++);
        }
        if (0!=(params= *--vp&0xFF)) {/* definition calls for params */
                register char **pa;
        }
        if (0!=(params= *--vp&0xFF)) {/* definition calls for params */
                register char **pa;
@@ -1241,39 +1242,7 @@ main(argc,argv)
 # if unix
        ysysloc=stsym("unix");
 # endif
 # if unix
        ysysloc=stsym("unix");
 # endif
-# if gcos
-       ysysloc=stsym ("gcos");
-# endif
-# if ibm
-       ysysloc=stsym ("ibm");
-# endif
-# if pdp11
-       varloc=stsym("pdp11");
-# endif
-# if vax
-       varloc=stsym("vax");
-# endif
-# if tahoe
-       varloc=stsym("tahoe");
-# endif
-# if interdata
-       varloc=stsym ("interdata");
-# endif
-# if tss
-       varloc=stsym ("tss");
-# endif
-# if os
-       varloc=stsym ("os");
-# endif
-# if mert
-       varloc=stsym ("mert");
-# endif
-# if mc68000
-       varloc=stsym("mc68000");
-# endif
-# if sun
-       varloc=stsym("sun");
-# endif
+       ysysloc=stsym(MACHINE);
        ulnloc=stsym ("__LINE__");
        uflloc=stsym ("__FILE__");
 
        ulnloc=stsym ("__LINE__");
        uflloc=stsym ("__FILE__");