From cfa7d8ca36d9dfa5608f04999f9bbdd778102d2a Mon Sep 17 00:00:00 2001 From: beber Date: Wed, 7 Dec 2005 00:36:35 +0000 Subject: 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 --- src/espik_debug.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/espik_debug.h') 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); -- cgit v1.2.3