summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSigrid Solveig Haflínudóttir <sigrid@ftrv.se>2022-11-04 01:07:11 +0000
committerSigrid Solveig Haflínudóttir <sigrid@ftrv.se>2022-11-04 01:07:11 +0000
commit0cc26776cece29a23d1ddbad750a534df8d29f1b (patch)
tree1fc1bb711055a23c64b27b540d2035b5efb8abe3 /sys
parent540a67e96f5874963880c4cbdbee65eacfb58857 (diff)
cpp: stringified macros shouldn't split words separate by a dot
> #define A(s) #s > #define B(s) A(s) > > #define x0 blah blah blah > B(x0) > > #define x1 blah.blah > B(x1) Before the fix, B(x1) would become "blah . blah". After the fix it's "blah.blah", as expected. In fact, the fix has always been there, but commented out on the initial import of The Artwork.
Diffstat (limited to 'sys')
-rw-r--r--sys/src/cmd/cpp/macro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/cpp/macro.c b/sys/src/cmd/cpp/macro.c
index f0e767577..4757f66aa 100644
--- a/sys/src/cmd/cpp/macro.c
+++ b/sys/src/cmd/cpp/macro.c
@@ -499,7 +499,7 @@ stringify(Tokenrow *vp)
error(ERROR, "Stringified macro arg is too long");
break;
}
- if (tp->wslen /* && (tp->flag&XPWS)==0 */)
+ if (tp->wslen && (tp->flag&XPWS)==0)
*sp++ = ' ';
for (i=0, cp=tp->t; i<tp->len; i++) {
if (instring && (*cp=='"' || *cp=='\\'))