From 0cc26776cece29a23d1ddbad750a534df8d29f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Fri, 4 Nov 2022 01:07:11 +0000 Subject: 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. --- sys/src/cmd/cpp/macro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/src/cmd/cpp/macro.c') 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; ilen; i++) { if (instring && (*cp=='"' || *cp=='\\')) -- cgit v1.2.3