diff options
Diffstat (limited to 'src/ivydebug.h')
-rw-r--r-- | src/ivydebug.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/ivydebug.h b/src/ivydebug.h new file mode 100644 index 0000000..ee73f0e --- /dev/null +++ b/src/ivydebug.h @@ -0,0 +1,30 @@ +#ifndef IVY_DEBUG_H +#define IVY_DEBUG_H + +#ifdef WIN32 +#ifdef DEBUG +#define TRACE(format,...) \ + fprintf (stderr, format , __VA_ARGS__ ) + +#define TRACE_IF( cond, format, ...) \ + if ( cond ) fprintf (stderr, format , __VA_ARGS__ ) + +#else +#define TRACE(format, ...) /**/ +#define TRACE_IF( cond, format, ...) /**/ +#endif +#else +#ifdef DEBUG +#define TRACE(format, args...) \ + fprintf (stderr, format , ## args) + +#define TRACE_IF( cond, format, args...) \ + if ( cond ) fprintf (stderr, format , ## args) + +#else +#define TRACE(format, args...) /**/ +#define TRACE_IF( cond, format, args...) /**/ +#endif +#endif + +#endif |