From: ceriel Date: Fri, 24 Jul 1987 09:21:24 +0000 (+0000) Subject: characters were treated as unsigneds, lines with quotes in them X-Git-Tag: release-5-5~3983 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=690a4cfbc65cb7fc2f1a9e2c05a3b2a5e1d9a577;p=ack.git characters were treated as unsigneds, lines with quotes in them where not treated correctly --- diff --git a/util/cpp/LLlex.c b/util/cpp/LLlex.c index 5ff8567f4..8df9a28ef 100644 --- a/util/cpp/LLlex.c +++ b/util/cpp/LLlex.c @@ -207,12 +207,11 @@ go_on: if (c == '\\') { LoadChar(c); if (c == '\n') { - LoadChar(c); LineNumber++; - continue; } c = quoted(c); } + if (c >= 128) c -= 256; val = val*256 + c; size++; LoadChar(c); diff --git a/util/cpp/preprocess.c b/util/cpp/preprocess.c index 5a06b42c9..b305753f2 100644 --- a/util/cpp/preprocess.c +++ b/util/cpp/preprocess.c @@ -100,6 +100,7 @@ preprocess(fn) ++LineNumber; ++lineno; echo(c); + break; } else if (c == EOI) { flush(op - _obuf); @@ -143,8 +144,6 @@ preprocess(fn) echo(c); LoadChar(c); if (c == '\n') { - ++LineNumber; - lineno++; break; } else if (c == EOI) { @@ -162,6 +161,8 @@ preprocess(fn) } while (c != stopc); echo(c); + if (c == '\n') + break; /* Don't eat # */ LoadChar(c); continue; }