Mercurial > trustbridge
view common/debug.h @ 251:c596568fa45b
Add utf16 conversion functions for Windows.
This also includes a null pointer checking free.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 01 Apr 2014 10:48:35 +0000 |
parents | 92b1e5ed2d5f |
children |
line wrap: on
line source
#ifndef DEBUG_H #define DEBUG_H /** * @file * @brief Helper macros for debugging */ /** * @def DEBUGOUTPUT * @brief If defined code for extra debugging output will be generated. * * Will be defined if current build is not an RELEASE_BUILD. */ #ifndef RELEASE_BUILD #define DEBUGOUTPUT #endif /** * @def DEBUGPREFIX * @brief A string prepended to debug output. * * Should be defined to indicate which module created the output. */ #ifndef DEBUGPREFIX #define DEBUGPREFIX "" #endif /** * @def DEBUGPRINTF(fmt, ...) * @brief Debug printf * * Prints to stderr if DEBUGOUTPUT is defined. */ #ifdef DEBUGOUTPUT #define DEBUGPRINTF(fmt, ...) fprintf(stderr, DEBUGPREFIX "DEBUG: " fmt, ##__VA_ARGS__); #else #define DEBUGPRINTF(fmt, ...) #endif #endif