# HG changeset patch # User Sascha Wilde # Date 1395757206 -3600 # Node ID 7b9545ad76f67c23e3ffb9ef789c0df07dcd4f9a # Parent 04c1e0188ac3526862d0cb8fc7ab68b6ad2ba47f Added include file with debugging macros. diff -r 04c1e0188ac3 -r 7b9545ad76f6 common/debug.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/debug.h Tue Mar 25 15:20:06 2014 +0100 @@ -0,0 +1,20 @@ +#ifndef DEBUG_H +#define DEBUG_H + +/** + * @file debug.h + * @brief Helper macros for debugging + */ + +/** + * @brief Debug printf + * + * Prints to stderr if RELEASE_BUILD is not defined. + */ +#ifndef RELEASE_BUILD +#define DEBUGFPRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__); +#else +#define DEBUGFPRINT(fmt, ...) +#endif + +#endif