From: ceriel Date: Wed, 14 Feb 1990 11:57:41 +0000 (+0000) Subject: Under the -M option, identifiers were sometimes truncated X-Git-Tag: release-5-5~1819 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=cba0bbac02d2dad59e800a2aa0a111619b5b5ec7;p=ack.git Under the -M option, identifiers were sometimes truncated --- diff --git a/util/cpp/preprocess.c b/util/cpp/preprocess.c index 64ca97e83..34c076981 100644 --- a/util/cpp/preprocess.c +++ b/util/cpp/preprocess.c @@ -222,15 +222,22 @@ preprocess(fn) if (tg < maxpos) { cpy; } + else break; load; } endidf: PushBack(); *tg = '\0'; /* mark the end of the identifier */ idef = findidf(buf); - if ((idef && idef->id_macro && replace(idef))) { - LoadChar(c); - continue; + if (idef && idef->id_macro) { + do { + LoadChar(c); + } while (in_idf(c)); + PushBack(); + if (replace(idef)) { + LoadChar(c); + continue; + } } nomac: *tg = 0;