From 70531760103cac048f9451c31f94ed34a4c1fcbb Mon Sep 17 00:00:00 2001 From: "F. Duncanh" Date: Sun, 26 Feb 2023 13:05:52 -0500 Subject: [PATCH] add --help -help -? synonyms for -h; hint if option is unknown --- uxplay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uxplay.cpp b/uxplay.cpp index 7a97d11..45ad20d 100644 --- a/uxplay.cpp +++ b/uxplay.cpp @@ -648,7 +648,7 @@ static void parse_arguments (int argc, char *argv[]) { use_audio = false; } else if (arg == "-d") { debug_log = !debug_log; - } else if (arg == "-h") { + } else if (arg == "-h" || arg == "--help" || arg == "-?" || arg == "-help") { print_info(argv[0]); exit(0); } else if (arg == "-v") { @@ -793,7 +793,7 @@ static void parse_arguments (int argc, char *argv[]) { "(like 5 or 4.8, which will be converted to a whole number of microseconds)\n", argv[i]); exit(1); } else { - fprintf(stderr, "unknown option %s, stopping\n",argv[i]); + fprintf(stderr, "unknown option %s, stopping (for help use option \"-h\")\n",argv[i]); exit(1); } }