From: Dale Weiler Date: Wed, 14 Jan 2015 02:46:52 +0000 (-0500) Subject: More cleanup X-Git-Tag: xonotic-v0.8.2~57 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a7b45ea14dd05ac141f7f220568fa4757ff98a03;p=xonotic%2Fgmqcc.git More cleanup --- diff --git a/main.c b/main.c index bfdadda..ac715d5 100644 --- a/main.c +++ b/main.c @@ -36,8 +36,7 @@ static int usage(void) { con_out("usage: %s [options] [files...]", app_name); con_out("options:\n" " -h, --help show this help message\n" - " -debug turns on compiler debug messages\n" - " -memchk turns on compiler memory leak check\n"); + " -debug turns on compiler debug messages\n"); con_out(" -o, --output=file output file, defaults to progs.dat\n" " -s filename add a progs.src file to be used\n"); con_out(" -E stop after preprocessing\n"); @@ -121,14 +120,13 @@ static bool options_long_gcc(const char *optname, int *argc_, char ***argv_, cha static bool options_parse(int argc, char **argv) { bool argend = false; size_t itr; - char buffer[1024]; - char *config = NULL; - char *memdumpcols = NULL; + char buffer[1024]; + char *config = NULL; while (!argend && argc > 1) { char *argarg; argitem item; - ppitem macro; + ppitem macro; ++argv; --argc; @@ -202,10 +200,6 @@ static bool options_parse(int argc, char **argv) { config = argarg; continue; } - if (options_long_gcc("memdumpcols", &argc, &argv, &memdumpcols)) { - OPTS_OPTION_U16(OPTION_MEMDUMPCOLS) = (uint16_t)strtol(memdumpcols, NULL, 10); - continue; - } if (options_long_gcc("progsrc", &argc, &argv, &argarg)) { OPTS_OPTION_STR(OPTION_PROGSRC) = argarg; continue; @@ -246,10 +240,6 @@ static bool options_parse(int argc, char **argv) { OPTS_OPTION_BOOL(OPTION_DUMPFIN) = true; continue; } - if (!strcmp(argv[0]+1, "memchk")) { - OPTS_OPTION_BOOL(OPTION_MEMCHK) = true; - continue; - } if (!strcmp(argv[0]+1, "nocolor")) { con_color(0); continue; diff --git a/opts.c b/opts.c index cbe9444..bc72824 100644 --- a/opts.c +++ b/opts.c @@ -112,7 +112,6 @@ void opts_init(const char *output, int standard, size_t arraysize) { OPTS_OPTION_STR(OPTION_OUTPUT) = output; OPTS_OPTION_U32(OPTION_STANDARD) = standard; OPTS_OPTION_U32(OPTION_MAX_ARRAY_SIZE) = arraysize; - OPTS_OPTION_U16(OPTION_MEMDUMPCOLS) = 16; } static bool opts_setflag_all(const char *name, bool on, uint32_t *flags, const opts_flag_def_t *list, size_t listsize) { diff --git a/opts.def b/opts.def index 4f828e2..f5ce0af 100644 --- a/opts.def +++ b/opts.def @@ -104,8 +104,6 @@ GMQCC_DEFINE_FLAG(G) GMQCC_DEFINE_FLAG(STANDARD) GMQCC_DEFINE_FLAG(DEBUG) - GMQCC_DEFINE_FLAG(MEMDUMPCOLS) - GMQCC_DEFINE_FLAG(MEMCHK) GMQCC_DEFINE_FLAG(DUMPFIN) GMQCC_DEFINE_FLAG(DUMP) GMQCC_DEFINE_FLAG(FORCECRC) @@ -113,7 +111,6 @@ GMQCC_DEFINE_FLAG(PP_ONLY) GMQCC_DEFINE_FLAG(MAX_ARRAY_SIZE) GMQCC_DEFINE_FLAG(ADD_INFO) - GMQCC_DEFINE_FLAG(STATISTICS) GMQCC_DEFINE_FLAG(PROGSRC) GMQCC_DEFINE_FLAG(COVERAGE) GMQCC_DEFINE_FLAG(STATE_FPS) diff --git a/test.c b/test.c index 0c59c6f..2c985f0 100644 --- a/test.c +++ b/test.c @@ -1279,7 +1279,6 @@ int main(int argc, char **argv) { char *defs = NULL; con_init(); - OPTS_OPTION_U16(OPTION_MEMDUMPCOLS) = 16; /* * Command line option parsing commences now We only need to support @@ -1297,10 +1296,6 @@ int main(int argc, char **argv) { OPTS_OPTION_BOOL(OPTION_DEBUG) = true; continue; } - if (!strcmp(argv[0]+1, "memchk")) { - OPTS_OPTION_BOOL(OPTION_MEMCHK) = true; - continue; - } if (!strcmp(argv[0]+1, "nocolor")) { con_color(0); continue;