From: eck Date: Tue, 25 Sep 1990 13:40:32 +0000 (+0000) Subject: oops, previous fix was wrong for ## operator X-Git-Tag: release-5-5~1523 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=7b00154c5471792d3338e2bc6a1653d3799c6a95;p=ack.git oops, previous fix was wrong for ## operator --- diff --git a/lang/cem/cpp.ansi/replace.c b/lang/cem/cpp.ansi/replace.c index de9b44c0e..c899a8b89 100644 --- a/lang/cem/cpp.ansi/replace.c +++ b/lang/cem/cpp.ansi/replace.c @@ -512,8 +512,8 @@ macro2buffer(repl, idf, args) result onto the replacement buffer. It deals with the # and ## operators, and inserts the actual parameters. The argument buffer contains the raw argument (needed - for the ## operator), and the expanded argument (for - all other parameter substitutions). + for the # and ## operators), and the expanded argument + (for all other parameter substitutions). The grammar of the replacement list is: @@ -555,7 +555,7 @@ macro2buffer(repl, idf, args) ptr++; } while (*ptr != delim || *ptr == '\0'); add2repl(repl, *ptr++); - } else if (func && *ptr == '#') { + } else if (*ptr == '#' && (func || *(ptr+1) == '#')) { if (*++ptr == '#') { register int tmpindex; /* ## - paste operator */