moved debug statements to a compiler flag
This commit is contained in:
@@ -24,6 +24,9 @@ all: adapt datagen
|
|||||||
adapt: $(ZSTD_FILES) adapt.c
|
adapt: $(ZSTD_FILES) adapt.c
|
||||||
$(CC) $(FLAGS) $^ -o $@
|
$(CC) $(FLAGS) $^ -o $@
|
||||||
|
|
||||||
|
adapt-debug: $(ZSTD_FILES) adapt.c
|
||||||
|
$(CC) $(FLAGS) -DDEBUG_MODE=2 $^ -o adapt
|
||||||
|
|
||||||
datagen : $(PRGDIR)/datagen.c datagencli.c
|
datagen : $(PRGDIR)/datagen.c datagencli.c
|
||||||
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
$(CC) $(FLAGS) $^ -o $@$(EXT)
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,12 @@
|
|||||||
#define CONVERGENCE_LOWER_BOUND 5
|
#define CONVERGENCE_LOWER_BOUND 5
|
||||||
#define CLEVEL_DECREASE_COOLDOWN 5
|
#define CLEVEL_DECREASE_COOLDOWN 5
|
||||||
|
|
||||||
|
#ifndef DEBUG_MODE
|
||||||
static int g_displayLevel = DEFAULT_DISPLAY_LEVEL;
|
static int g_displayLevel = DEFAULT_DISPLAY_LEVEL;
|
||||||
|
#else
|
||||||
|
static int g_displayLevel = DEBUG_MODE;
|
||||||
|
#endif
|
||||||
|
|
||||||
static unsigned g_compressionLevel = DEFAULT_COMPRESSION_LEVEL;
|
static unsigned g_compressionLevel = DEFAULT_COMPRESSION_LEVEL;
|
||||||
static UTIL_time_t g_startTime;
|
static UTIL_time_t g_startTime;
|
||||||
static size_t g_streamedSize = 0;
|
static size_t g_streamedSize = 0;
|
||||||
@@ -949,7 +954,6 @@ static void help()
|
|||||||
PRINT("\n");
|
PRINT("\n");
|
||||||
PRINT("Options:\n");
|
PRINT("Options:\n");
|
||||||
PRINT(" -oFILE : specify the output file name\n");
|
PRINT(" -oFILE : specify the output file name\n");
|
||||||
PRINT(" -v : display debug information\n");
|
|
||||||
PRINT(" -i# : provide initial compression level\n");
|
PRINT(" -i# : provide initial compression level\n");
|
||||||
PRINT(" -h : display help/information\n");
|
PRINT(" -h : display help/information\n");
|
||||||
PRINT(" -f : force the compression level to stay constant\n");
|
PRINT(" -f : force the compression level to stay constant\n");
|
||||||
@@ -984,9 +988,6 @@ int main(int argCount, const char* argv[])
|
|||||||
argument += 2;
|
argument += 2;
|
||||||
outFilename = argument;
|
outFilename = argument;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
|
||||||
g_displayLevel++;
|
|
||||||
break;
|
|
||||||
case 'i':
|
case 'i':
|
||||||
argument += 2;
|
argument += 2;
|
||||||
g_compressionLevel = readU32FromChar(&argument);
|
g_compressionLevel = readU32FromChar(&argument);
|
||||||
|
|||||||
Reference in New Issue
Block a user