Mercurial > hg > CbC > old > device
comparison mc-macro.c @ 455:563a5d29ec5e
inline continue...
author | kono |
---|---|
date | Tue, 30 Nov 2004 16:46:55 +0900 |
parents | 818505dd6e1f |
children | b8f95294eb77 |
comparison
equal
deleted
inserted
replaced
454:214272c8f2da | 455:563a5d29ec5e |
---|---|
209 extern void | 209 extern void |
210 getline(void) | 210 getline(void) |
211 { | 211 { |
212 int i; | 212 int i; |
213 int c; | 213 int c; |
214 char num[10]; | |
214 | 215 |
215 if (next_eof) { | 216 if (next_eof) { |
216 next_eof=0; | 217 next_eof=0; |
217 error(EOFERR); | 218 error(EOFERR); |
218 } | 219 } |
240 break; | 241 break; |
241 } | 242 } |
242 } | 243 } |
243 } | 244 } |
244 *chptr = '\0'; | 245 *chptr = '\0'; |
245 if (lsrc && !asmf && !macro_if_skip && linebuf[0]) gen_comment(linebuf); | 246 if (lsrc && !asmf && !macro_if_skip && linebuf[0]) { |
247 gen_comment(linebuf); | |
248 if (inmode) { | |
249 int i=0; | |
250 int c; | |
251 char *p = cheap->ptr; | |
252 sprintf(num,"%d: ",lineno); | |
253 c = 0; | |
254 while((*cheap->ptr = num[c++])) | |
255 cheap = increment_cheap(cheap,&p); | |
256 while((c = *cheap->ptr = linebuf[i++])) { | |
257 cheap = increment_cheap(cheap,&p); | |
258 if (c=='\n') { | |
259 *cheap->ptr = 0; | |
260 cheap = increment_cheap(cheap,&p); | |
261 parse = list3(ST_COMMENT,parse,(int)p); | |
262 p = cheap->ptr; | |
263 sprintf(num,"%d: ",lineno); | |
264 c = 0; | |
265 while((*cheap->ptr = num[c++])) | |
266 cheap = increment_cheap(cheap,&p); | |
267 } | |
268 } | |
269 } | |
270 } | |
246 if (*(chptr = linebuf) == '#' && !in_comment && !in_quote) { | 271 if (*(chptr = linebuf) == '#' && !in_comment && !in_quote) { |
247 if (macro_processing()) return; | 272 if (macro_processing()) return; |
248 } | 273 } |
249 } while(!in_quote && (macro_if_skip || linebuf[0] == '#')); | 274 } while(!in_quote && (macro_if_skip || linebuf[0] == '#')); |
250 } | 275 } |