moved debug statements to a compiler flag

This commit is contained in:
Paul Cruz
2017-07-25 14:08:39 -07:00
parent e02c79f833
commit 310c12d07e
2 changed files with 8 additions and 4 deletions
+3
View File
@@ -24,6 +24,9 @@ all: adapt datagen
adapt: $(ZSTD_FILES) adapt.c
$(CC) $(FLAGS) $^ -o $@
adapt-debug: $(ZSTD_FILES) adapt.c
$(CC) $(FLAGS) -DDEBUG_MODE=2 $^ -o adapt
datagen : $(PRGDIR)/datagen.c datagencli.c
$(CC) $(FLAGS) $^ -o $@$(EXT)
+5 -4
View File
@@ -29,7 +29,12 @@
#define CONVERGENCE_LOWER_BOUND 5
#define CLEVEL_DECREASE_COOLDOWN 5
#ifndef DEBUG_MODE
static int g_displayLevel = DEFAULT_DISPLAY_LEVEL;
#else
static int g_displayLevel = DEBUG_MODE;
#endif
static unsigned g_compressionLevel = DEFAULT_COMPRESSION_LEVEL;
static UTIL_time_t g_startTime;
static size_t g_streamedSize = 0;
@@ -949,7 +954,6 @@ static void help()
PRINT("\n");
PRINT("Options:\n");
PRINT(" -oFILE : specify the output file name\n");
PRINT(" -v : display debug information\n");
PRINT(" -i# : provide initial compression level\n");
PRINT(" -h : display help/information\n");
PRINT(" -f : force the compression level to stay constant\n");
@@ -984,9 +988,6 @@ int main(int argCount, const char* argv[])
argument += 2;
outFilename = argument;
break;
case 'v':
g_displayLevel++;
break;
case 'i':
argument += 2;
g_compressionLevel = readU32FromChar(&argument);