Added l_comment.h to .distr file, fixed problem with #
authorceriel <none@none>
Mon, 21 Aug 1989 10:58:24 +0000 (10:58 +0000)
committerceriel <none@none>
Mon, 21 Aug 1989 10:58:24 +0000 (10:58 +0000)
occurring between macro name and arguments

lang/cem/cemcom/.distr
lang/cem/cemcom/skip.c

index b556550..cf61530 100644 (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
index 4f6662f..3fb1808 100644 (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;
        }
 }