From: eck Date: Tue, 13 Nov 1990 16:50:55 +0000 (+0000) Subject: fixed two preprocessing bugs X-Git-Tag: release-5-5~1411 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=7536a1f510231bfe1b64cdc8a347b24e3b3dad1a;p=ack.git fixed two preprocessing bugs --- diff --git a/lang/cem/cemcom.ansi/LLlex.c b/lang/cem/cemcom.ansi/LLlex.c index fc1342a33..3b789d75a 100644 --- a/lang/cem/cemcom.ansi/LLlex.c +++ b/lang/cem/cemcom.ansi/LLlex.c @@ -147,7 +147,11 @@ firstline: return ptok->tk_symb = EOI; while ((ch = GetChar()), - (ch == '#' || ch == '/' || class(ch) == STSKIP)) { + (ch == '#' +#ifndef NOPP + || ch == '/' +#endif + || class(ch) == STSKIP)) { /* blanks are allowed before hashes */ if (ch == '#') { /* a control line follows */ diff --git a/lang/cem/cemcom.ansi/replace.c b/lang/cem/cemcom.ansi/replace.c index ce8408e25..05afb8616 100644 --- a/lang/cem/cemcom.ansi/replace.c +++ b/lang/cem/cemcom.ansi/replace.c @@ -435,6 +435,10 @@ a_new_line: ch = GetChar(); if (ch == '#') { domacro(); + /* Clear File_Inserted since domacro could + * be called again, which calls GetToken(). + */ + File_Inserted = 0; goto a_new_line; } else if (ch == EOI) { lexerror("unterminated macro call");