Added l_comment.h to .distr file, fixed problem with #

occurring between macro name and arguments
This commit is contained in:
ceriel 1989-08-21 10:58:24 +00:00
parent a5f950bac7
commit e52091ea7c
2 changed files with 15 additions and 3 deletions

View file

@ -54,6 +54,7 @@ interface.h
ival.g
l_brace.str
l_class.h
l_comment.h
l_comment.c
l_dummy.c
l_ev_ord.c

View file

@ -20,12 +20,17 @@ skipspaces(ch, skipnl)
/* skipspaces() skips any white space and returns the first
non-space character.
*/
register int nlseen = 0;
for (;;) {
while (class(ch) == STSKIP)
while (class(ch) == STSKIP) {
nlseen = 0;
LoadChar(ch);
}
if (skipnl && class(ch) == STNL) {
LoadChar(ch);
++LineNumber;
LineNumber++;
nlseen++;
continue;
}
/* How about "\\\n"????????? */
@ -41,7 +46,13 @@ skipspaces(ch, skipnl)
return '/';
}
}
else
else if (nlseen && ch == '#') {
domacro();
LoadChar(ch);
/* ch is the first character of a line. This means
* that nlseen will still be true.
*/
} else
return ch;
}
}