Mercurial > hg > index.cgi
diff lwcc/lex.c @ 306:b08787e5b9f3 ccdev
Add include search paths and command line macro definitions
Added command line macro definitions. Also implemented include paths. There
is no default include path; that will be supplied by the driver program.
author | William Astle <lost@l-w.ca> |
---|---|
date | Wed, 18 Sep 2013 20:41:41 -0600 |
parents | 54f213c8fb81 |
children | 670ea8f90212 |
line wrap: on
line diff
--- a/lwcc/lex.c Wed Sep 18 19:17:52 2013 -0600 +++ b/lwcc/lex.c Wed Sep 18 20:41:41 2013 -0600 @@ -193,6 +193,17 @@ characters cross a token boundary. */ void preproc_lex_unfetch_byte(struct preproc_info *pp, int c) { + if (pp -> lexstr) + { + if (c == CPP_EOL) + return; + if (pp -> lexstrloc > 0) + { + pp -> lexstrloc--; + return; + } + } + if (pp -> ungetbufl >= pp -> ungetbufs) { pp -> ungetbufs += 100;