diff options
author | June McEnroe <june@causal.agency> | 2018-08-27 13:01:28 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-08-27 13:01:28 -0400 |
commit | 76350f1e602f1dcbea28063fa215b732e507d525 (patch) | |
tree | 2244f64fc570088a6d3767f50f6df609540b762b | |
parent | Map modifyCount on log scale (diff) | |
download | torus-76350f1e602f1dcbea28063fa215b732e507d525.tar.gz torus-76350f1e602f1dcbea28063fa215b732e507d525.zip |
Dump HELP_DATA with client -h
-rw-r--r-- | client.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/client.c b/client.c index 062c2e6..eafea91 100644 --- a/client.c +++ b/client.c @@ -667,7 +667,17 @@ static void readInput(void) { } } -int main() { +int main(int argc, char *argv[]) { + int opt; + while (0 < (opt = getopt(argc, argv, "h"))) { + if (opt == 'h') { + fwrite(HELP_DATA, sizeof(HELP_DATA), 1, stdout); + return EX_OK; + } else { + return EX_USAGE; + } + } + curse(); modeHelp(); readInput(); |