diff options
author | beber <beber> | 2005-12-06 23:55:38 +0000 |
---|---|---|
committer | beber <beber> | 2005-12-06 23:55:38 +0000 |
commit | 665ba8dbb088ab387b8ea80473283c21b11397e8 (patch) | |
tree | 1b572bae3faa995f65dd279549d109cb2c8e637a /tst | |
parent | use a macro (diff) | |
download | espik-665ba8dbb088ab387b8ea80473283c21b11397e8.tar.xz |
much simplier macro
C99 Ã!!!
Diffstat (limited to 'tst')
-rw-r--r-- | tst/va_test.c | 8 |
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() { |