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/include.c (1 of 11749 files). Show all

Unified · Split

sys/src/cmd/cpp/include.c+6−1
@@ -66,7 +66,7 @@ doinclude(Tokenrow *trp) · 65 unmodified lines
6666 write(1,"\n",1);
6767 }
6868 if (fd >= 0) {
69− if (++incdepth > 10)
69+ if (++incdepth > 20)
7070 error(FATAL, "#include too deeply nested");
7171 setsource((char*)newstring((uchar*)iname, strlen(iname), 0), fd, NULL);
7272 genline();
@@ -95,6 +95,11 @@ genline(void) · 22 unmodified lines
9595 p += sizeof("#line ")-1;
9696 p = (uchar*)outnum((char*)p, cursource->line);
9797 *p++ = ' '; *p++ = '"';
98+ if (cursource->filename[0]!='/' && wd[0]) {
99+ strcpy((char*)p, wd);
100+ p += strlen(wd);
101+ *p++ = '/';
102+ }
98103 strcpy((char*)p, cursource->filename);
99104 p += strlen((char*)p);
100105 *p++ = '"'; *p++ = '\n';