diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2021-05-27 23:37:23 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2021-05-27 23:37:23 +0200 |
commit | df1df2929646abd77955b80e3ded3574ac005179 (patch) | |
tree | 9704901455843d41180a9402ed4c0012a1d67f04 /src/main.c | |
parent | 68c20667ca775a4d4a7d1cfc3c9ec5c30f275084 (diff) | |
download | polecat-df1df2929646abd77955b80e3ded3574ac005179.tar.gz polecat-df1df2929646abd77955b80e3ded3574ac005179.zip |
allow flags to exit prematurely, move defines, add no networking flag
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -25,8 +25,8 @@ static const struct Command main_commands[] = { }; static const struct Flag main_flags[] = { - { .name = "help", .variant = TWO, .func = main_help, .description = "show this message"}, - { .name = "version", .variant = BOTH, .func = main_version, .description = "prints the program version"} + { .name = "help", .variant = TWO, .returns = 1, .func = main_help, .description = "show this message"}, + { .name = "version", .variant = BOTH, .returns = 1, .func = main_version, .description = "prints the program version"} }; COMMAND_GROUP(main) @@ -55,7 +55,7 @@ COMMAND_GROUP(main) atexit(free_nargv); } #endif - COMMAND_GROUP_BODY(main) + COMMAND_GROUP_BODY(main, COMMANDS, FLAGS) } COMMAND(main, env) |