From: ceriel Date: Mon, 21 Aug 1989 10:58:24 +0000 (+0000) Subject: Added l_comment.h to .distr file, fixed problem with # X-Git-Tag: release-5-5~2282 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e52091ea7cc408f3737b3dfc513c346d8b22df7f;p=ack.git Added l_comment.h to .distr file, fixed problem with # occurring between macro name and arguments --- diff --git a/lang/cem/cemcom/.distr b/lang/cem/cemcom/.distr index b5565509f..cf615302f 100644 --- a/lang/cem/cemcom/.distr +++ b/lang/cem/cemcom/.distr @@ -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 diff --git a/lang/cem/cemcom/skip.c b/lang/cem/cemcom/skip.c index 4f6662fdd..3fb1808ad 100644 --- a/lang/cem/cemcom/skip.c +++ b/lang/cem/cemcom/skip.c @@ -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; } }