Showing the changes to sys/src/cmd/cpp/include.c (1 of 11749 files). Show all
Unified · Split
| @@ -66,7 +66,7 @@ doinclude(Tokenrow *trp) · 65 unmodified lines | |||
| 66 | write(1,"\n",1); | 66 | write(1,"\n",1); |
| 67 | } | 67 | } |
| 68 | if (fd >= 0) { | 68 | if (fd >= 0) { |
| 69 | if (++incdepth > 10) | 69 | if (++incdepth > 20) |
| 70 | error(FATAL, "#include too deeply nested"); | 70 | error(FATAL, "#include too deeply nested"); |
| 71 | setsource((char*)newstring((uchar*)iname, strlen(iname), 0), fd, NULL); | 71 | setsource((char*)newstring((uchar*)iname, strlen(iname), 0), fd, NULL); |
| 72 | genline(); | 72 | genline(); |
| @@ -95,6 +95,11 @@ genline(void) · 22 unmodified lines | |||
| 95 | p += sizeof("#line ")-1; | 95 | p += sizeof("#line ")-1; |
| 96 | p = (uchar*)outnum((char*)p, cursource->line); | 96 | p = (uchar*)outnum((char*)p, cursource->line); |
| 97 | *p++ = ' '; *p++ = '"'; | 97 | *p++ = ' '; *p++ = '"'; |
| 98 | if (cursource->filename[0]!='/' && wd[0]) { | ||
| 99 | strcpy((char*)p, wd); | ||
| 100 | p += strlen(wd); | ||
| 101 | *p++ = '/'; | ||
| 102 | } | ||
| 98 | strcpy((char*)p, cursource->filename); | 103 | strcpy((char*)p, cursource->filename); |
| 99 | p += strlen((char*)p); | 104 | p += strlen((char*)p); |
| 100 | *p++ = '"'; *p++ = '\n'; | 105 | *p++ = '"'; *p++ = '\n'; |