Mercurial > hg > index.cgi
comparison 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 |
comparison
equal
deleted
inserted
replaced
305:54f213c8fb81 | 306:b08787e5b9f3 |
---|---|
191 by fetch_byte(). Theoretically, an unlimited number of characters can | 191 by fetch_byte(). Theoretically, an unlimited number of characters can |
192 be unfetched. Line and column counting may be incorrect if unfetched | 192 be unfetched. Line and column counting may be incorrect if unfetched |
193 characters cross a token boundary. */ | 193 characters cross a token boundary. */ |
194 void preproc_lex_unfetch_byte(struct preproc_info *pp, int c) | 194 void preproc_lex_unfetch_byte(struct preproc_info *pp, int c) |
195 { | 195 { |
196 if (pp -> lexstr) | |
197 { | |
198 if (c == CPP_EOL) | |
199 return; | |
200 if (pp -> lexstrloc > 0) | |
201 { | |
202 pp -> lexstrloc--; | |
203 return; | |
204 } | |
205 } | |
206 | |
196 if (pp -> ungetbufl >= pp -> ungetbufs) | 207 if (pp -> ungetbufl >= pp -> ungetbufs) |
197 { | 208 { |
198 pp -> ungetbufs += 100; | 209 pp -> ungetbufs += 100; |
199 pp -> ungetbuf = lw_realloc(pp -> ungetbuf, pp -> ungetbufs); | 210 pp -> ungetbuf = lw_realloc(pp -> ungetbuf, pp -> ungetbufs); |
200 } | 211 } |