summaryrefslogtreecommitdiff
path: root/src/ivydebug.h
diff options
context:
space:
mode:
authorfcolin2006-04-20 15:55:15 +0000
committerfcolin2006-04-20 15:55:15 +0000
commit2ed39b250788a32ee77e5af1a923edd64211d128 (patch)
tree48ef890b6876f3e1451c586909e5933ed75e6f7b /src/ivydebug.h
parentd20808b04feb328272a35ee2b03f4ae19db23fbe (diff)
downloadivy-c-2ed39b250788a32ee77e5af1a923edd64211d128.zip
ivy-c-2ed39b250788a32ee77e5af1a923edd64211d128.tar.gz
ivy-c-2ed39b250788a32ee77e5af1a923edd64211d128.tar.bz2
ivy-c-2ed39b250788a32ee77e5af1a923edd64211d128.tar.xz
Macro de debug afin d'eviter de truffer le code de #ifdef DEBUG #endif
Diffstat (limited to 'src/ivydebug.h')
-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