History

Plan 9 from Bell Labs Second Edition 1995-04-05

David du Colombier committed 31 years ago2e-1995-04-05

Commit 219b2ee1 parent bd389b311749 files · +2555453 −1889727Browse files

Showing the changes to sys/src/cmd/cpp/cpp.c (1 of 11749 files). Show all

Unified · Split

sys/src/cmd/cpp/cpp.c+7−5
@@ -16,7 +16,7 @@ int ifdepth; · 15 unmodified lines
16int ifsatisfied[NIF];16int ifsatisfied[NIF];
17int skipping;17int skipping;
18 18
19void19int
20main(int argc, char **argv)20main(int argc, char **argv)
21{21{
22 Tokenrow tr;22 Tokenrow tr;
@@ -36,6 +36,7 @@ main(int argc, char **argv) · 13 unmodified lines
36 flushout();36 flushout();
37 fflush(stderr);37 fflush(stderr);
38 exits(nerrs? "errors" : 0);38 exits(nerrs? "errors" : 0);
39 return 0;
39}40}
40 41
41void42void
@@ -266,12 +267,13 @@ error(enum errtype type, char *string, ...) · 224 unmodified lines
266 char *cp, *ep;267 char *cp, *ep;
267 Token *tp;268 Token *tp;
268 Tokenrow *trp;269 Tokenrow *trp;
270 Source *s;
269 int i;271 int i;
270 272
271 if (*cursource->filename)273 fprintf(stderr, "cpp: ");
272 fprintf(stderr, "cpp: %s:%d: ", cursource->filename, cursource->line);274 for (s=cursource; s; s=s->next)
273 else275 if (*s->filename)
274 fprintf(stderr, "cpp: ");276 fprintf(stderr, "%s:%d ", s->filename, s->line);
275 va_start(ap, string);277 va_start(ap, string);
276 for (ep=string; *ep; ep++) {278 for (ep=string; *ep; ep++) {
277 if (*ep=='%') {279 if (*ep=='%') {