Added l_comment.h to .distr file, fixed problem with #
occurring between macro name and arguments
This commit is contained in:
parent
a5f950bac7
commit
e52091ea7c
2 changed files with 15 additions and 3 deletions
|
@ -54,6 +54,7 @@ interface.h
|
||||||
ival.g
|
ival.g
|
||||||
l_brace.str
|
l_brace.str
|
||||||
l_class.h
|
l_class.h
|
||||||
|
l_comment.h
|
||||||
l_comment.c
|
l_comment.c
|
||||||
l_dummy.c
|
l_dummy.c
|
||||||
l_ev_ord.c
|
l_ev_ord.c
|
||||||
|
|
|
@ -20,12 +20,17 @@ skipspaces(ch, skipnl)
|
||||||
/* skipspaces() skips any white space and returns the first
|
/* skipspaces() skips any white space and returns the first
|
||||||
non-space character.
|
non-space character.
|
||||||
*/
|
*/
|
||||||
|
register int nlseen = 0;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
while (class(ch) == STSKIP)
|
while (class(ch) == STSKIP) {
|
||||||
|
nlseen = 0;
|
||||||
LoadChar(ch);
|
LoadChar(ch);
|
||||||
|
}
|
||||||
if (skipnl && class(ch) == STNL) {
|
if (skipnl && class(ch) == STNL) {
|
||||||
LoadChar(ch);
|
LoadChar(ch);
|
||||||
++LineNumber;
|
LineNumber++;
|
||||||
|
nlseen++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* How about "\\\n"????????? */
|
/* How about "\\\n"????????? */
|
||||||
|
@ -41,7 +46,13 @@ skipspaces(ch, skipnl)
|
||||||
return '/';
|
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;
|
return ch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue