From 76350f1e602f1dcbea28063fa215b732e507d525 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Mon, 27 Aug 2018 13:01:28 -0400 Subject: Dump HELP_DATA with client -h --- client.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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(); -- cgit 1.4.1