diff options
Diffstat (limited to 'bcc/preproc.c')
-rw-r--r-- | bcc/preproc.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/bcc/preproc.c b/bcc/preproc.c index 90f5a8c..b4de99a 100644 --- a/bcc/preproc.c +++ b/bcc/preproc.c @@ -70,12 +70,15 @@ PRIVATE void asmcontrol() if (orig_cppmode) outstr("#asm\n"); else + { + outstr("!BCC_ASM\n"); dumplocs(); + } while (TRUE) { skipline(); skipeol(); - if (eof) + if (eofile) { eofin("#asm"); break; @@ -119,6 +122,8 @@ PRIVATE void asmcontrol() } if (orig_cppmode) outstr("#endasm"); /* nl is done by skipeol */ + else + outstr("!BCC_ENDASM\n"); } /* blanksident() - return nonzero if at blanks followed by an identifier */ @@ -403,8 +408,8 @@ ts_s_fakeline_tot += 3 + len + 2 + 2; endfakeline[0] = EOL; /* guards any trailing backslash */ endfakeline[1] = EOL; /* line ends here or before */ } - old_eof = eof; - eof = TRUE; /* valid after first EOL */ + old_eof = eofile; + eofile = TRUE; /* valid after first EOL */ ch = *(lineptr = fakeline); if (defineflag) { @@ -428,7 +433,7 @@ ts_s_fakeline_tot += 3 + len + 2 + 2; } else undef(); - eof = old_eof; + eofile = old_eof; #ifdef TS ts_s_fakeline_tot -= len + 2 + 2; #endif @@ -454,7 +459,7 @@ PUBLIC void docontrol() while (TRUE) { skipeol(); - if (eof) + if (eofile) return; blanks(); if (ch == '#') @@ -532,7 +537,7 @@ ts_s_macparam += sizeof *paramlist * nparleft; ts_s_macparam_tot += sizeof *paramlist * nparleft; #endif blanks(); - while (ch == EOL && !eof) + while (ch == EOL && !eofile) { skipeol(); blanks(); @@ -604,7 +609,7 @@ ts_s_macparam_tot += sizeof *paramlist * nparleft; skipeol(); /* macro case disposed of already */ if (SYMOFCHAR(ch) == SPECIALCHAR) specialchar(); - if (eof) + if (eofile) break; } else @@ -642,12 +647,12 @@ ts_s_macparam_string_tot -= charptr - oldparam; } } blanks(); - while (ch == EOL && !eof) + while (ch == EOL && !eofile) { skipeol(); blanks(); } - if (eof) + if (eofile) eofin("macro parameter expansion"); if (nparleft) { @@ -670,7 +675,7 @@ ts_s_macparam_string_tot -= charptr - oldparam; if (ch == EOL) { skipeol(); - if (eof) + if (eofile) break; continue; } @@ -883,14 +888,14 @@ PUBLIC void skipcomment() if (ch == EOL) { skipeol(); - if (eof) + if (eofile) break; } else if (ch != '*') gch1(); } gch1(); - if (eof) + if (eofile) { eofin("comment"); return; |