summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-27 13:01:28 -0400
committerJune McEnroe <june@causal.agency>2018-08-27 13:01:28 -0400
commit9d60fb33e9163f052ce942d3991bdbb9475de61b (patch)
treedca2ea4320a8ad2bb33cf8c47139fb07f0bd3ef7
parentMap modifyCount on log scale (diff)
downloadtorus-9d60fb33e9163f052ce942d3991bdbb9475de61b.tar.gz
torus-9d60fb33e9163f052ce942d3991bdbb9475de61b.zip
Dump HELP_DATA with client -h ansi
Diffstat (limited to '')
-rw-r--r--client.c12
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();