ref: a3e24ec490673845170052007673b3956cff651b
parent: 427be719df2cdf8df4114345713be1926a63d1b7
author: Paul Brossier <piem@altern.org>
date: Sat Aug 13 21:59:32 EDT 2005
added non c99 alternatives in examples/utils.h (thanks Mo)
--- a/examples/utils.h
+++ b/examples/utils.h
@@ -26,9 +26,16 @@
#include <aubio.h>
#include <aubioext.h>
-#define debug(...) if (verbose) fprintf (stderr, __VA_ARGS__)
-#define errmsg(...) fprintf (stderr, __VA_ARGS__)
-#define outmsg(...) fprintf (stdout, __VA_ARGS__)
+#ifdef HAVE_C99_VARARGS_MACROS
+#define debug(...) if (verbose) fprintf (stderr, __VA_ARGS__)
+#define errmsg(...) fprintf (stderr, __VA_ARGS__)
+#define outmsg(...) fprintf (stdout, __VA_ARGS__)
+#else
+#define debug(format, args...) if (verbose) fprintf(stderr, format , ##args)
+#define errmsg(format, args...) fprintf(stderr, format , ##args)
+#define outmsg(format, args...) fprintf(stdout, format , ##args)
+#endif
+
extern int frames;
extern int verbose;