diff options
author | beber <beber> | 2005-12-07 00:36:35 +0000 |
---|---|---|
committer | beber <beber> | 2005-12-07 00:36:35 +0000 |
commit | cfa7d8ca36d9dfa5608f04999f9bbdd778102d2a (patch) | |
tree | 85b49afaa2d476f32e2650c4b44ccb05c3fa7838 /src/espik_debug.h | |
parent | make it compile (diff) | |
download | espik-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.h | 14 |
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); |