From: Dale Weiler Date: Sat, 24 Nov 2012 00:29:30 +0000 (+0000) Subject: Implemented -W? and -f? as aliases to -Whelp and -fhelp X-Git-Tag: 0.1.9~291 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3dbe54f0cd906a22024788ed29a8c5ab739f2434;p=xonotic%2Fgmqcc.git Implemented -W? and -f? as aliases to -Whelp and -fhelp --- 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));