aboutsummaryrefslogtreecommitdiff
path: root/src/espik_debug.h
diff options
context:
space:
mode:
authorbeber <beber>2005-12-07 00:36:35 +0000
committerbeber <beber>2005-12-07 00:36:35 +0000
commitcfa7d8ca36d9dfa5608f04999f9bbdd778102d2a (patch)
tree85b49afaa2d476f32e2650c4b44ccb05c3fa7838 /src/espik_debug.h
parentmake it compile (diff)
downloadespik-cfa7d8ca36d9dfa5608f04999f9bbdd778102d2a.tar.xz
Avoid warning
Make macro debug work (after compile :p) Format macro debug outpout (file.c+ligne @file.c: 'message') Start to use this macro #if -> #ifdeF del old macro code move macro to .h instead of .c while it's not an inline and use everywhere
Diffstat (limited to 'src/espik_debug.h')
-rw-r--r--src/espik_debug.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/espik_debug.h b/src/espik_debug.h
index c1f35f3..3bf52ab 100644
--- a/src/espik_debug.h
+++ b/src/espik_debug.h
@@ -3,7 +3,19 @@
#include "espik_global.h"
-void espik_debug_print (char *fct, ...);
+#ifdef __GNUC__
+#define espik_debug_print(fmt, ...) \
+{ \
+ fprintf (stdout, "%s+%i @%s: '", __FILE__, __LINE__, __func__); \
+ fprintf (stdout, fmt, __VA_ARGS__); \
+ fprintf (stdout, "'\n"); \
+}
+#else
+#define espik_debug_print(fmt, ...) \
+{ \
+}
+#endif /* __GNUC__ */
+
inline void espik_bt (void);
void espik_debug_init();
void kill_me (short num);