shithub: scc

Download patch

ref: 804901a9a3e5b33a0514ea2670597057da68d03b
parent: e9ccea1272ee0193a50d7288fdddd55ed45ad53e
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun May 24 09:10:42 EDT 2015

Remove leading spaces in moreinput()

Preprcessor() had to skip these spaces, and later on next() also had
to do, so it is better skip them only in one place.

--- a/cc1/lex.c
+++ b/cc1/lex.c
@@ -202,7 +202,9 @@
 
 	*(p = input->line) = '\0';
 	readline();
-	if (preprocessor(p))
+	while (isspace(*p))
+		++p;
+	if (*p == '\0' || preprocessor(p))
 		goto repeat;
 	input->p = input->begin = p;
 	return 1;