begin display changes
This commit is contained in:
+11
-3
@@ -53,6 +53,8 @@ static const int g_maxNbVariations = 64;
|
|||||||
* Macros
|
* Macros
|
||||||
**************************************/
|
**************************************/
|
||||||
#define DISPLAY(...) fprintf(stderr, __VA_ARGS__)
|
#define DISPLAY(...) fprintf(stderr, __VA_ARGS__)
|
||||||
|
#define DISPLAYLEVEL(n, ...) if(g_displayLevel >= n) { fprintf(stderr, __VA_ARGS__); }
|
||||||
|
|
||||||
#define TIMED 0
|
#define TIMED 0
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
# define DEBUG 0
|
# define DEBUG 0
|
||||||
@@ -233,6 +235,7 @@ static U32 g_noSeed = 0;
|
|||||||
static paramValues_t g_params; /* Initialized at the beginning of main w/ emptyParams() function */
|
static paramValues_t g_params; /* Initialized at the beginning of main w/ emptyParams() function */
|
||||||
static UTIL_time_t g_time; /* to be used to compare solution finding speeds to compare to original */
|
static UTIL_time_t g_time; /* to be used to compare solution finding speeds to compare to original */
|
||||||
static U32 g_memoTableLog = PARAM_UNSET;
|
static U32 g_memoTableLog = PARAM_UNSET;
|
||||||
|
static U32 g_displayLevel = 3;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
directMap,
|
directMap,
|
||||||
@@ -1282,7 +1285,6 @@ static void BMK_printWinnerOpt(FILE* f, const U32 cLevel, const BMK_result_t res
|
|||||||
/* the table */
|
/* the table */
|
||||||
fprintf(f, "================================\n");
|
fprintf(f, "================================\n");
|
||||||
for(n = g_winners; n != NULL; n = n->next) {
|
for(n = g_winners; n != NULL; n = n->next) {
|
||||||
fprintf(f, "\r%79s\r", "");
|
|
||||||
BMK_displayOneResult(f, n->res, srcSize);
|
BMK_displayOneResult(f, n->res, srcSize);
|
||||||
}
|
}
|
||||||
fprintf(f, "================================\n");
|
fprintf(f, "================================\n");
|
||||||
@@ -2313,7 +2315,6 @@ static int optimizeForSize(const char* const * const fileNamesTable, const size_
|
|||||||
}
|
}
|
||||||
|
|
||||||
BMK_printWinnerOpt(stdout, CUSTOM_LEVEL, winner.result, winner.params, target, buf.srcSize);
|
BMK_printWinnerOpt(stdout, CUSTOM_LEVEL, winner.result, winner.params, target, buf.srcSize);
|
||||||
BMK_translateAdvancedParams(stdout, winner.params);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2364,7 +2365,6 @@ static int optimizeForSize(const char* const * const fileNamesTable, const size_
|
|||||||
}
|
}
|
||||||
/* end summary */
|
/* end summary */
|
||||||
BMK_printWinnerOpt(stdout, CUSTOM_LEVEL, winner.result, winner.params, target, buf.srcSize);
|
BMK_printWinnerOpt(stdout, CUSTOM_LEVEL, winner.result, winner.params, target, buf.srcSize);
|
||||||
BMK_translateAdvancedParams(stdout, winner.params);
|
|
||||||
DISPLAY("grillParams size - optimizer completed \n");
|
DISPLAY("grillParams size - optimizer completed \n");
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2653,6 +2653,14 @@ int main(int argc, const char** argv)
|
|||||||
seperateFiles = 1;
|
seperateFiles = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'q':
|
||||||
|
g_displayLevel--;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'v':
|
||||||
|
g_displayLevel++;
|
||||||
|
break;
|
||||||
|
|
||||||
/* load dictionary file (only applicable for optimizer rn) */
|
/* load dictionary file (only applicable for optimizer rn) */
|
||||||
case 'D':
|
case 'D':
|
||||||
if(i == argc - 1) { /* last argument, return error. */
|
if(i == argc - 1) { /* last argument, return error. */
|
||||||
|
|||||||
Reference in New Issue
Block a user