]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Some cleanups and what not.
authorDale Weiler <killfieldengine@gmail.com>
Wed, 30 Jan 2013 06:13:11 +0000 (06:13 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Wed, 30 Jan 2013 06:13:11 +0000 (06:13 +0000)
gmqcc.h
main.c

diff --git a/gmqcc.h b/gmqcc.h
index 0b97e2f40c4d6fb9f8f55c4f8df96cd45be55224..dd5dbc7f9d75369afbf04e7b6db0b8172530aa38 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -1132,15 +1132,14 @@ enum {
     OPTION_COUNT
 };
 
     OPTION_COUNT
 };
 
-/* disabled for now */
-#if 0
-static const char *opts_options_descriptions[OPTION_COUNT + 1] = {
+
+static const char *opts_options_descriptions[] = {
 #   define GMQCC_TYPE_OPTIONS
 #   define GMQCC_DEFINE_FLAG(X, Y) Y,
 #   include "opts.def"
 #   define GMQCC_TYPE_OPTIONS
 #   define GMQCC_DEFINE_FLAG(X, Y) Y,
 #   include "opts.def"
-    ""
+    "<null>"
 };
 };
-#endif
+
 
 extern unsigned int opts_optimizationcount[COUNT_OPTIMIZATIONS];
 
 
 extern unsigned int opts_optimizationcount[COUNT_OPTIMIZATIONS];
 
diff --git a/main.c b/main.c
index dee9a3293b0bc6765c81ef485265214accc0ce7a..6132978f41d9aa9eca20492849b04e38a03f0204 100644 (file)
--- a/main.c
+++ b/main.c
@@ -460,7 +460,13 @@ static bool options_parse(int argc, char **argv) {
                     }
             /* All long options without arguments */
                     else if (!strcmp(argv[0]+2, "help")) {
                     }
             /* All long options without arguments */
                     else if (!strcmp(argv[0]+2, "help")) {
-                        usage();
+                        /* TODO .. map name back .. prittery print of
+                         * options and their associations.
+                         */  
+                        for (itr = 0; itr < OPTION_COUNT; itr++) {
+                            con_out("%s\n\n", opts_options_descriptions[itr]);
+                        }
+
                         exit(0);
                     }
                     else if (!strcmp(argv[0]+2, "version")) {
                         exit(0);
                     }
                     else if (!strcmp(argv[0]+2, "version")) {