void preprocess(void) { char *line; int eof = 0; preproc_push(stdin, current_fname, /*sysh:*/0); while(!eof && (line = splice_lines(&eof))){ debug_push_line(line); if(option_digraphs) line = expand_digraphs(line); line = strip_comment(line); switch(strip_in_block){ case NOT_IN_BLOCK: case IN_BLOCK_BEGIN: case IN_BLOCK_END: line = filter_macros(line); case IN_BLOCK_FULL: /* no thanks */ break; } debug_pop_line(); if(line){ if(!no_output) puts(line); free(line); } } switch(strip_in_block){ case NOT_IN_BLOCK: case IN_BLOCK_END: break; case IN_BLOCK_BEGIN: case IN_BLOCK_FULL: CPP_DIE("no terminating block comment"); } parse_end_validate(); }
void preprocess() { char *line; preproc_push(stdin, current_fname); while((line = splice_line())){ char *s = filter_macros(strip_comment(line)); if(s){ puts(s); free(s); } } if(strip_in_block) die("no terminating block comment"); macro_finish(); }