]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Implemented -W? and -f? as aliases to -Whelp and -fhelp
authorDale Weiler <killfieldengine@gmail.com>
Sat, 24 Nov 2012 00:29:30 +0000 (00:29 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 24 Nov 2012 00:29:30 +0000 (00:29 +0000)
main.c

diff --git a/main.c b/main.c
index ca489a2198dbbb8bbc0208d8faee8a4acad3e5d5..0d9fe04a9f8c043b845c2c1193c78d263f1a56a4 100644 (file)
--- 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));