improved #line handling
authorceriel <none@none>
Fri, 17 Nov 1989 14:53:05 +0000 (14:53 +0000)
committerceriel <none@none>
Fri, 17 Nov 1989 14:53:05 +0000 (14:53 +0000)
lang/cem/cemcom/domacro.c
util/cpp/domacro.c

index d427d51..8fe2da8 100644 (file)
@@ -695,9 +695,10 @@ do_line(l)
        unsigned int l;
 {
        struct token tk;
+       int t = GetToken(&tk);
 
+       SkipRestOfLine();
        LineNumber = l - 1;     /* the number of the next input line */
-       if (GetToken(&tk) == STRING)    /* is there a filespecifier? */
+       if (t == STRING)        /* is there a filespecifier? */
                FileName = tk.tk_bts;
-       SkipRestOfLine();
 }
index 63b9901..3aaf9ff 100644 (file)
@@ -444,12 +444,13 @@ do_line(l)
        unsigned int l;
 {
        struct token tk;
+       int t = GetToken(&tk);
 
-       LineNumber = l - 1;     /* the number of the next input line */
-       if (GetToken(&tk) == STRING)    /* is there a filespecifier? */
-               FileName = tk.tk_str;
        PushBack();
        skipline();
+       LineNumber = l - 1;     /* the number of the next input line */
+       if (t == STRING)        /* is there a filespecifier? */
+               FileName = tk.tk_str;
 }
 
 PRIVATE int