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 | 9d60fb33e9163f052ce942d3991bdbb9475de61b (patch) | |
tree | dca2ea4320a8ad2bb33cf8c47139fb07f0bd3ef7 | |
parent | Map modifyCount on log scale (diff) | |
download | torus-9d60fb33e9163f052ce942d3991bdbb9475de61b.tar.gz torus-9d60fb33e9163f052ce942d3991bdbb9475de61b.zip |
Dump HELP_DATA with client -h ansi
-rw-r--r-- | client.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/client.c b/client.c index 1478ebe..66e6d08 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(); |