From: ceriel Date: Tue, 3 Feb 1987 23:28:09 +0000 (+0000) Subject: Strings and character constants now stop at end-of-line, unless escaped X-Git-Tag: release-5-5~4783 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=85830c5f63871348b72f039e3aa8ecc3f030868e;p=ack.git Strings and character constants now stop at end-of-line, unless escaped by a backslash --- 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);