diff options
| author | 2023-05-10 20:38:32 +0200 | |
|---|---|---|
| committer | 2023-05-10 20:38:32 +0200 | |
| commit | 9100ed2b5dd01df8e6b766c7bc2a12c0dd44f1ff (patch) | |
| tree | 0598b126bdddb7db462a2f0915e272d4345c0c39 /main.c | |
initial commit
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -0,0 +1,27 @@ +#include "parse.h" +#include <stdlib.h> + +struct option ccopt; + +static void +flushstd(void) +{ + ioflush(&bstdout); + ioflush(&bstderr); +} + +int +main(int argc, char **argv) +{ + struct parser pr; + + atexit(flushstd); + if (argc < 2) { + efmt("usage: %s [options] <file>\n", *argv); + return 1; + } + + targ_init("amd64-sysv"); + initparser(&pr, argv[1]); + parse(&pr); +} |