From 3dbe54f0cd906a22024788ed29a8c5ab739f2434 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sat, 24 Nov 2012 00:29:30 +0000 Subject: [PATCH] Implemented -W? and -f? as aliases to -Whelp and -fhelp --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index ca489a2..0d9fe04 100644 --- a/main.c +++ b/main.c @@ -290,7 +290,7 @@ static bool options_parse(int argc, char **argv) { /* handle all -fflags */ case 'f': util_strtocmd(argv[0]+2, argv[0]+2, strlen(argv[0]+2)+1); - if (!strcmp(argv[0]+2, "HELP")) { + if (!strcmp(argv[0]+2, "HELP") || *(argv[0]+2) == '?') { con_out("Possible flags:\n"); for (itr = 0; itr < COUNT_FLAGS; ++itr) { util_strtononcmd(opts_flag_list[itr].name, buffer, sizeof(buffer)); @@ -311,7 +311,7 @@ static bool options_parse(int argc, char **argv) { break; case 'W': util_strtocmd(argv[0]+2, argv[0]+2, strlen(argv[0]+2)+1); - if (!strcmp(argv[0]+2, "HELP")) { + if (!strcmp(argv[0]+2, "HELP") || *(argv[0]+2) == '?') { con_out("Possible warnings:\n"); for (itr = 0; itr < COUNT_WARNINGS; ++itr) { util_strtononcmd(opts_warn_list[itr].name, buffer, sizeof(buffer)); -- 2.39.2