From 85830c5f63871348b72f039e3aa8ecc3f030868e Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 3 Feb 1987 23:28:09 +0000 Subject: [PATCH] Strings and character constants now stop at end-of-line, unless escaped by a backslash --- util/cpp/preprocess.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/util/cpp/preprocess.c b/util/cpp/preprocess.c index 394770c31..fd5fa21ee 100644 --- a/util/cpp/preprocess.c +++ b/util/cpp/preprocess.c @@ -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); -- 2.34.1