scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 804901a9a3e5b33a0514ea2670597057da68d03b
parent e9ccea1272ee0193a50d7288fdddd55ed45ad53e
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 24 May 2015 13:10:42 +0200

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.

Diffstat:
Mcc1/lex.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cc1/lex.c b/cc1/lex.c @@ -202,7 +202,9 @@ repeat: *(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;