commit - e453131942fb3a20b680d275b691cd990e28e06d
commit + c591ae72dc1bd77c12a0563030c9a2e539ffe09f
blob - 20fe8d8313a93e3e91c3b704f8c14eda6e1becbb
blob + d3b1d65932f37ed2e1309416b4e820810f52fae6
--- cc/cpp/cpp.c
+++ cc/cpp/cpp.c
# define SBSIZE ((unsigned)0114130) /* PDP compiler doesn't like 39024 */
short sbff[SBSIZE/2];
# define sbf ((char *)sbff)
-#else // !pdp11
+#else /* !pdp11 */
# define SBSIZE 60000 /* std = 12000, wnj aug 1979 */
char sbf[SBSIZE];
-#endif // pdp11
+#endif /* pdp11 */
char *savch = sbf;
# define DROP 0xFE /* special character not legal ASCII or EBCDIC */
char *strdex(), *copy(), *subst(), *trmdir();
struct symtab *stsym();
STATIC int fin = STDIN;
-STATIC FILE *fout = stdout;
+STATIC FILE *fout;
STATIC int nd = 1;
STATIC int pflag; /* don't put out lines "# 12 foo.c" */
int passcom; /* don't delete comments */
return sp;
}
-// TODO: this is very ugly, but it works for now
+/* TODO: this is very ugly, but it works for now */
/* VARARGS1 */
pperror(s, x, y)
register int i, c;
register char *p;
char *tf,**cp2, obuf[BUFSIZ];
+
+ fout = stdout;
p = "_$ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
i = 0;
switch (argv[i][1]) {
case 'M':
mflag++;
- // fallthrough
+ /* fallthrough */
case 'P':
pflag++;
- // fallthrough
+ /* fallthrough */
case 'E':
continue;
exit (8);
}
- tf = (char *)rindex (infile, '.');
+ tf = strrchr (infile, '.');
if (tf == NULL) {
fprintf (stderr, "missing component name on %s\n", infile);
exit (8);
}
tf[1] = 'o';
- tf=(char *)rindex(infile, '/');
+ tf=strrchr(infile, '/');
if (tf != NULL)
infile = tf + 1;