aboutsummaryrefslogtreecommitdiff
path: root/tst
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 /tst
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 'tst')
-rw-r--r--tst/va_test.c7
1 files changed, 4 insertions, 3 deletions
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);
}