made debug definitions common within zstd_internal.h

This commit is contained in:
Yann Collet
2017-06-02 18:20:48 -07:00
parent 86bd83ef12
commit 58e8d793e1
7 changed files with 67 additions and 81 deletions
-13
View File
@@ -70,19 +70,6 @@
#define FSE_isError ERR_isError
#define HUF_isError ERR_isError
#if defined(ZSTD_DEBUG) && (ZSTD_DEBUG>=2)
# include <stdio.h>
static unsigned g_debugLevel = ZSTD_DEBUG;
# define DEBUGLOG(l, ...) { \
if (l<=g_debugLevel) { \
fprintf(stderr, __FILE__ ": "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " \n"); \
} }
#else
# define DEBUGLOG(l, ...) {} /* disabled */
#endif
/*_*******************************************************
* Memory operations