Strings and character constants now stop at end-of-line, unless escaped
authorceriel <none@none>
Tue, 3 Feb 1987 23:28:09 +0000 (23:28 +0000)
committerceriel <none@none>
Tue, 3 Feb 1987 23:28:09 +0000 (23:28 +0000)
by a backslash

util/cpp/preprocess.c

index 394770c..fd5fa21 100644 (file)
@@ -122,18 +122,23 @@ preprocess(fn)
                                do {
                                        echo(c);
                                        LoadChar(c);
-                                       if (c == '\\') {
-                                               echo(c);
-                                               LoadChar(c);
-                                       }
                                        if (c == '\n') {
                                                ++LineNumber;
                                                lineno++;
+                                               break;
                                        }
                                        else if (c == EOI) {
                                                flush(op-_obuf);
                                                return;
                                        }
+                                       if (c == '\\') {
+                                               echo(c);
+                                               LoadChar(c);
+                                               if (c == '\n') {
+                                                       ++LineNumber;
+                                                       lineno++;
+                                               }
+                                       }
                                }
                                while (c != stopc);
                                echo(c);