From: Dale Weiler Date: Sun, 2 Jun 2013 00:07:54 +0000 (+0000) Subject: Guart statistics by option. X-Git-Tag: v0.3.0~151^2~24 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=121e0806979160e9236cd6cc6173fe76db3f2349;p=xonotic%2Fgmqcc.git Guart statistics by option. --- diff --git a/main.c b/main.c index 840a6a7..4eb5eb3 100644 --- a/main.c +++ b/main.c @@ -173,6 +173,7 @@ static bool options_parse(int argc, char **argv) { OPTS_OPTION_U32(OPTION_STANDARD) = COMPILER_GMQCC; + OPTS_OPTION_BOOL(OPTION_STATISTICS) = true; } else if (!strcmp(argarg, "qcc")) { diff --git a/opts.def b/opts.def index 520f9b9..77a4094 100644 --- a/opts.def +++ b/opts.def @@ -121,6 +121,7 @@ GMQCC_DEFINE_FLAG(MAX_ARRAY_SIZE) GMQCC_DEFINE_FLAG(ADD_INFO) GMQCC_DEFINE_FLAG(CORRECTION) + GMQCC_DEFINE_FLAG(STATISTICS) #endif /* some cleanup so we don't have to */ diff --git a/util.c b/util.c index 891082b..c19bbaf 100644 --- a/util.c +++ b/util.c @@ -181,9 +181,11 @@ void util_meminfo() { } } - con_out("Additional Statistics:\n Total vectors used: %lu\n", - vectors - ); + if (OPTS_OPTION_BOOL(OPTION_STATISTICS)) { + con_out("Additional Statistics:\n Total vectors used: %lu\n", + vectors + ); + } if (OPTS_OPTION_BOOL(OPTION_DEBUG) || OPTS_OPTION_BOOL(OPTION_MEMCHK)) {