11 #ifndef libmobi_debug_h
12 #define libmobi_debug_h
28 #define free(x) debug_free(x, __FILE__, __LINE__)
29 #define malloc(x) debug_malloc(x, __FILE__, __LINE__)
30 #define realloc(x, y) debug_realloc(x, y, __FILE__, __LINE__)
31 #define calloc(x, y) debug_calloc(x, y, __FILE__, __LINE__)
35 void debug_free(
void *ptr,
const char *file,
const int line);
36 void *
debug_malloc(
const size_t size,
const char *file,
const int line);
37 void *
debug_realloc(
void *ptr,
const size_t size,
const char *file,
const int line);
38 void *
debug_calloc(
const size_t num,
const size_t size,
const char *file,
const int line);
49 #define debug_print(fmt, ...) { \
50 fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \
51 __LINE__, __func__, __VA_ARGS__); \
54 #define debug_print(fmt, ...)
void debug_free(void *ptr, const char *file, const int line)
Debugging wrapper for free(void *ptr)
Definition: debug.c:24
void print_indx_infl_old(const MOBIIndx *indx)
Dump inflections index (old version)
Definition: debug.c:101
void print_indx_orth_old(const MOBIIndx *indx)
Dump orthographic index (old version)
Definition: debug.c:134
void print_indx(const MOBIIndx *indx)
Dump index values.
Definition: debug.c:80
void * debug_realloc(void *ptr, const size_t size, const char *file, const int line)
Debugging wrapper for realloc(void* ptr, size_t size)
Definition: debug.c:53
void * debug_calloc(const size_t num, const size_t size, const char *file, const int line)
Debugging wrapper for calloc(size_t num, size_t size)
Definition: debug.c:69
void * debug_malloc(const size_t size, const char *file, const int line)
Debugging wrapper for malloc(size_t size)
Definition: debug.c:38
Libmobi main header file.
Parsed INDX record.
Definition: mobi.h:434