aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2021-05-27 23:37:23 +0200
committerJan200101 <sentrycraft123@gmail.com>2021-05-27 23:37:23 +0200
commitdf1df2929646abd77955b80e3ded3574ac005179 (patch)
tree9704901455843d41180a9402ed4c0012a1d67f04 /src/main.c
parent68c20667ca775a4d4a7d1cfc3c9ec5c30f275084 (diff)
downloadpolecat-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index d6dd008..689d2b4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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)