Merge pull request #3849 from ThomasWaldmann/hashindex-debug-print

add debug_print macro for hashindex debugging, see #3807
This commit is contained in:
TW 2018-05-19 22:58:23 +02:00 committed by GitHub
commit ce069035ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -15,6 +15,16 @@
#define MAGIC "BORG_IDX"
#define MAGIC_LEN 8
#define DEBUG 0
#define debug_print(fmt, ...) \
do { \
if (DEBUG) { \
fprintf(stderr, fmt, __VA_ARGS__); \
fflush(NULL); \
} \
} while (0)
typedef struct {
char magic[MAGIC_LEN];
int32_t num_entries;