aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbeber <beber>2005-12-06 23:55:38 +0000
committerbeber <beber>2005-12-06 23:55:38 +0000
commit665ba8dbb088ab387b8ea80473283c21b11397e8 (patch)
tree1b572bae3faa995f65dd279549d109cb2c8e637a
parentuse a macro (diff)
downloadespik-665ba8dbb088ab387b8ea80473283c21b11397e8.tar.xz
much simplier macro
C99 Ã!!!
-rw-r--r--tst/va_test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tst/va_test.c b/tst/va_test.c
index f359717..fdba4be 100644
--- a/tst/va_test.c
+++ b/tst/va_test.c
@@ -3,6 +3,7 @@
#include <stdarg.h>
#include <string.h>
+/*
#define espik_debug_print (...) \
{ \
va_list __ap; \
@@ -14,6 +15,13 @@
va_end (__ap); \
free (__output); \
}
+*/
+
+#define espik_debug_print (fmt, ...) \
+{ \
+ fprintf (stdout, "%s, %s, %i: ", __FUNCTION__, __FILE__, __LINE__); \
+ vfprintf (stdout, fmt, ## __VA_ARGS__); \
+}
int main()
{