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 --- tst/va_test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tst') diff --git a/tst/va_test.c b/tst/va_test.c index 9b527f2..96cd65d 100644 --- a/tst/va_test.c +++ b/tst/va_test.c @@ -7,8 +7,9 @@ #define espik_debug_print(fmt, ...) \ { \ - fprintf (stdout, "%s, %s, %i: \n", __func__, __FILE__, __LINE__); \ - vfprintf (stdout, fmt, __VA_ARGS__); \ + fprintf (stdout, "%s+%i @%s: '", __FILE__, __LINE__, __func__); \ + fprintf (stdout, fmt, __VA_ARGS__); \ + fprintf (stdout, "'\n"); \ } #endif /* __GNUC__ */ @@ -17,7 +18,7 @@ int main() { int a = 10; - espik_debug_print ("a : %d\n", a); + espik_debug_print ("a : %d", a); return (0); } -- cgit v1.2.3