shithub: riscv

Download patch

ref: 5c448c618a89ab8933838da1b5b97ed7c4a42e08
parent: b0ad72be22c9125e674d53bc7f9c086cd7c1ac83
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++;