From: Matthias Braun Date: Tue, 4 Dec 2007 14:26:26 +0000 (+0000) Subject: fix print ast and print fluffy X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=999f0b49497871780e5b5dc880cf69ce24e2ea1f;p=cparser fix print ast and print fluffy [r18597] --- diff --git a/main.c b/main.c index 60b0b44..a05fbdc 100644 --- a/main.c +++ b/main.c @@ -430,6 +430,9 @@ int main(int argc, char **argv) case PrintAst: case PrintFluffy: case LexTest: + if(outname == NULL) + outname = "-"; + break; case ParseOnly: break; case Compile: @@ -492,11 +495,14 @@ int main(int argc, char **argv) return 1; if(mode == PrintAst) { + type_set_output(out); ast_set_output(out); print_ast(unit); return 0; } if(mode == PrintFluffy) { + type_set_output(out); + ast_set_output(out); write_fluffy_decls(out, unit); }