From: Dale Weiler Date: Wed, 30 Jan 2013 06:13:11 +0000 (+0000) Subject: Some cleanups and what not. X-Git-Tag: before-library~190 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=commitdiff_plain;h=98fd5cd429efba365da12578cd861012fb1749b5 Some cleanups and what not. --- diff --git a/gmqcc.h b/gmqcc.h index 0b97e2f..dd5dbc7 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -1132,15 +1132,14 @@ enum { 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" - "" + "" }; -#endif + extern unsigned int opts_optimizationcount[COUNT_OPTIMIZATIONS]; diff --git a/main.c b/main.c index dee9a32..6132978 100644 --- 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")) { - 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")) {