From 3f00592b96adfdc667410e86d39e942c9c72b439 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Mon, 16 Jun 2014 12:15:19 +0300 Subject: [PATCH] Separate strategyselector debug prints from _DEBUG. - I only want to see the strategy stuff. --- src/strategyselector.c | 8 ++++---- src/strategyselector.h | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/strategyselector.c b/src/strategyselector.c index db428950..7a47e0a9 100644 --- a/src/strategyselector.c +++ b/src/strategyselector.c @@ -100,9 +100,9 @@ int strategyselector_register(void * const opaque, const char * const type, cons new_strategy->priority = priority; new_strategy->fptr = fptr; } -#ifdef _DEBUG +#ifdef DEBUG_STRATEGYSELECTOR fprintf(stderr, "Registered strategy %s:%s with priority %d (%p)\n", type, strategy_name, priority, fptr); -#endif //_DEBUG +#endif //DEBUG_STRATEGYSELECTOR return 1; } @@ -139,7 +139,7 @@ static void* strategyselector_choose_for(const strategy_list * const strategies, return NULL; } -#ifdef _DEBUG +#ifdef DEBUG_STRATEGYSELECTOR fprintf(stderr, "Choosing strategy for %s:\n", strategy_type); for (i=0; i < strategies->count; ++i) { if (strcmp(strategies->strategies[i].type, strategy_type) == 0) { @@ -150,7 +150,7 @@ static void* strategyselector_choose_for(const strategy_list * const strategies, } } } -#endif //_DEBUG +#endif //DEBUG_STRATEGYSELECTOR if (max_priority_i == -1) { diff --git a/src/strategyselector.h b/src/strategyselector.h index 00aa6a1e..4918d82f 100644 --- a/src/strategyselector.h +++ b/src/strategyselector.h @@ -19,6 +19,10 @@ * along with Kvazaar. If not, see . ****************************************************************************/ +#if defined(_DEBUG) && !defined(DEBUG_STRATEGYSELECTOR) +# define DEBUG_STRATEGYSELECTOR +#endif + //Hardware data (abstraction of defines). Extend for other compilers #if defined(_M_IX86) || defined(__i586__) || defined(__i686__) || defined(_M_X64) || defined(_M_AMD64) || defined(__amd64__) || defined(__x86_64__)