commit 6f2b4000f5c8802117511bf94a2f136d92e3e1fc
parent 2d5efae6781b71ce98ea3514bd3175791234a587
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 11 Jan 2023 08:44:36 +0100
htrdr: change long options to POSIX-like short options
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/commands/htrdr_cmd.c b/src/commands/htrdr_cmd.c
@@ -42,7 +42,7 @@ static void
print_usage(const char* cmd)
{
ASSERT(cmd);
- printf("Usage: %s [--version] [--help] <mode> [<args>]\n", cmd);
+ printf("Usage: %s [-v] [-h] <mode> [<args>]\n", cmd);
}
static void
@@ -54,9 +54,9 @@ print_help(const char* cmd)
printf("\n");
printf(
-" --version display version information and exit.\n");
+" -h display this help and exit.\n");
printf(
-" --help display this help and exit.\n");
+" -v display version information and exit.\n");
printf("\n");
printf("These are %s modes:\n", cmd);
@@ -124,7 +124,7 @@ main(int argc, char** argv)
#endif
/* Version */
- } else if(!strcmp(argv[1], "--version")) {
+ } else if(!strcmp(argv[1], "-v")) {
printf("%s version %d.%d.%d\n",
argv[0],
HTRDR_VERSION_MAJOR,
@@ -133,7 +133,7 @@ main(int argc, char** argv)
goto exit;
/* Help */
- } else if(!strcmp(argv[1], "--help")) {
+ } else if(!strcmp(argv[1], "-h")) {
print_help(cmd_name);
goto exit;