diff options
author | Linus Nordberg <linus@nordu.net> | 2016-04-29 12:45:58 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2016-04-29 12:45:58 +0200 |
commit | ce461321ef514cc0b21e44e415eb05ad2122036b (patch) | |
tree | dd1121fea3b9e5a995b757e06feda2e67bc617e9 /c_src/util.h | |
parent | 41dfffcc1572073c3d1d201a0a19dd2c4ca1bb4a (diff) |
Turn a bunch of outcommented fprintf's into dprintf's.
Also, rename dprintf 'level' to 'category' and add DEBUG_REBUILD.
Diffstat (limited to 'c_src/util.h')
-rw-r--r-- | c_src/util.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/c_src/util.h b/c_src/util.h index f08f2c3..9c2b9d6 100644 --- a/c_src/util.h +++ b/c_src/util.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, NORDUnet A/S. + * Copyright (c) 2016, NORDUnet A/S. * See LICENSE for licensing information. */ @@ -9,10 +9,11 @@ #define DEBUG_CACHE 0 #define DEBUG_WRITE 0 #define DEBUG_READ 0 +#define DEBUG_REBUILD 0 #define DEBUG_PORT 0 -#define dprintf(level,args) do { if (DEBUG_ ## level) { fprintf args; } } while (0) -#define dprinthex(level,data,size) do { if (DEBUG_ ## level) { print_hex(data, size); } } while (0) +#define dprintf(category,args) do { if (DEBUG_ ## category) { fprintf args; } } while (0) +#define dprinthex(category,data,size) do { if (DEBUG_ ## category) { print_hex(data, size); } } while (0) void set_error(char **error, const char * __restrict, ...) __attribute__ ((__format__ (__printf__, 2, 3))); |