git: 9front

Download patch

ref: 519a41f463fe2b4b4391c2811bc59aa557c6efe9
parent: 39cdf5e37163ad03c43b853fe3e0b5f50239b497
author: Jacob Moody <moody@posixcafe.org>
date: Tue Sep 26 10:40:56 EDT 2023

cpp: don't bail on all '?'

Earlier trigraph change deleted too much.

--- a/sys/src/cmd/cpp/lex.c
+++ b/sys/src/cmd/cpp/lex.c
@@ -362,6 +362,8 @@
 				}
 				state &= ~QBSBIT;
 				s->inp = ip;
+				if (c=='?')
+					goto reswitch;
 				if (c=='\\') { /* line-folding */
 					if (foldline(s)) {
 						s->lineinc++;
--