From 121e0806979160e9236cd6cc6173fe76db3f2349 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sun, 2 Jun 2013 00:07:54 +0000 Subject: [PATCH] Guart statistics by option. --- main.c | 1 + opts.def | 1 + util.c | 8 +++++--- 3 files changed, 7 insertions(+), 3 deletions(-) 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)) { -- 2.39.2