diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-12-03 00:04:40 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-12-03 00:04:40 +0000 |
commit | 9bbfa7d2cd5b46f07052dfb2212d792cb6f2641d (patch) | |
tree | 25841d1585df85161bf91e864c626eb5713dd262 /main.c | |
parent | 623b3acc1f8b719b15523982ff5ed04eb85b19d5 (diff) | |
download | obf-9bbfa7d2cd5b46f07052dfb2212d792cb6f2641d.tar.gz obf-9bbfa7d2cd5b46f07052dfb2212d792cb6f2641d.tar.bz2 obf-9bbfa7d2cd5b46f07052dfb2212d792cb6f2641d.zip |
Some general reworking, error handling
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -74,14 +74,19 @@ void interpret(machine_t *cpu, node_t *ast, size_t num) #endif } +void usage(const char *name, FILE *fp) +{ + fprintf(fp, + "Usage: %s [FILE]...\n\tExecutes FILES sequentially on the " + "same machine\n", + name); +} + int main(int argc, char *argv[]) { if (argc == 1) { - fprintf( - stderr, - "Usage: %s [FILE]...\nReads FILES sequentially on the same machine\n", - argv[0]); + usage(argv[0], stderr); return 1; } |