fix: line number administration wrong in scan.c
authorceriel <none@none>
Tue, 9 Aug 1988 14:07:39 +0000 (14:07 +0000)
committerceriel <none@none>
Tue, 9 Aug 1988 14:07:39 +0000 (14:07 +0000)
lang/cem/cemcom/Makefile
lang/cem/cemcom/scan.c
util/cpp/Makefile
util/cpp/scan.c

index 9d55f3d..20f61dc 100644 (file)
@@ -586,6 +586,7 @@ options.o: spec_arith.h
 options.o: target_sizes.h
 options.o: use_tmp.h
 scan.o: class.h
+scan.o: file_info.h
 scan.o: idf.h
 scan.o: input.h
 scan.o: interface.h
index da83648..b23a0e0 100644 (file)
@@ -21,6 +21,7 @@
 #include       "idf.h"
 #include       "macro.h"
 #include       "interface.h"
+#include       "file_info.h"
 
 #define        EOS             '\0'
 #define        overflow()      (fatal("actual parameter buffer overflow"))
@@ -141,6 +142,7 @@ copyact(ch1, ch2, level)
 #endif __MATCHING_PAR__
 
                case '\n':
+                       LineNumber++;
                        while (LoadChar(ch), ch == '#') {
                                /*      This piece of code needs some
                                        explanation: consider the call of
@@ -208,6 +210,7 @@ copyact(ch1, ch2, level)
                                else
                                if (ch == '\n') {
                                        lexerror("newline in string");
+                                       LineNumber++;
                                        copy(match);
                                        break;
                                }
index da7b156..5b0c4d6 100644 (file)
@@ -223,6 +223,7 @@ replace.o: pathlength.h
 replace.o: textsize.h
 scan.o: charoffset.h
 scan.o: class.h
+scan.o: file_info.h
 scan.o: idf.h
 scan.o: input.h
 scan.o: inputtype.h
index e996024..677f3a0 100644 (file)
@@ -18,6 +18,7 @@
 #include       "idf.h"
 #include       "macro.h"
 #include       "interface.h"
+#include       "file_info.h"
 
 #define        EOS             '\0'
 #define        overflow()      (fatal("actual parameter buffer overflow"))
@@ -138,6 +139,7 @@ copyact(ch1, ch2, level)
 #endif __MATCHING_PAR__
 
                case '\n':
+                       LineNumber++;
                        LoadChar(ch);
                        while (ch == '#')       {
                                /*      This piece of code needs some
@@ -207,6 +209,7 @@ copyact(ch1, ch2, level)
                                }
                                else
                                if (ch == '\n') {
+                                       LineNumber++;
                                        error("newline in string");
                                        copy(match);
                                        break;