summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ivydebug.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ivydebug.h b/src/ivydebug.h
new file mode 100644
index 0000000..da1dfee
--- /dev/null
+++ b/src/ivydebug.h
@@ -0,0 +1,20 @@
+#ifndef IVY_DEBUG_H
+#define IVY_DEBUG_H
+
+#ifdef WIN32
+#include <crtdbg.h>
+#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