Commit | Line | Data |
---|---|---|
3cd4b0f8 MW |
1 | #include "cparse.h" |
2 | #include <unistd.h> | |
3 | ||
4 | int main(int argc, char **argv) { | |
5 | int n; | |
6 | ||
7 | n = commandline(argc, argv); | |
8 | for(; n < argc; ++n) { | |
9 | struct external_declaration *tu; | |
10 | ||
11 | tu = parse(argv[n]); | |
12 | if(dump_translation_unit(dump_new(stdout), tu, 0) < 0) | |
13 | fatal(errno, "error writing to stdout"); | |
14 | } | |
15 | if(fclose(stdout) < 0) fatal(errno, "error closing stdout"); | |
16 | return !!errors; | |
17 | } | |
18 | ||
19 | /* | |
20 | Local Variables: | |
21 | c-basic-offset:2 | |
22 | comment-column:40 | |
23 | End: | |
24 | */ |