aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2005-12-21 09:53:24 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2005-12-21 09:53:24 +0000
commit5a22e055ba2edd7a091270f4954dbebe55d71fc3 (patch)
tree8dc2a6bc3aff27107ad96ca4c385820b02e94996
parentc1d165ffadfd5b254f5b2c8132ca008f7746da14 (diff)
revert changes of verbose() since it didn't really work out (we would have needed special versions of post() and verbose() that support vararg-pointers)
svn path=/trunk/externals/zexy/; revision=4267
-rw-r--r--src/zexy.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/zexy.h b/src/zexy.h
index ac32fe2..87dad24 100644
--- a/src/zexy.h
+++ b/src/zexy.h
@@ -51,8 +51,6 @@
#include "m_pd.h"
#include <math.h>
-#include <stdarg.h>
-
#define VERSION "2.1"
/* these pragmas are only used for MSVC, not MinGW or Cygwin */
@@ -102,24 +100,22 @@ static void zexy_register(char*object){
static void zexy_register(char*object){}
#endif /* ZEXY_LIBRARY */
-static void z_verbose(int level, char*fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
-
#if (defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 38)
/*
* pd>=0.39 has a verbose() function; older versions don't
+ * btw, this finally makes zexy binary incompatible with older version
*/
- verbose(level, fmt, ap);
+# define z_verbose verbose
#else
- /*
- * fall back to a simple post...
- */
- post(fmt, ap);
+/*
+ * this might not work on compilers other than gcc
+ * is it ISO-C99 or just a gnu-cpp thing ?
+ # define z_verbose(level, format, ...) post(format, ## __VA_ARGS__)
+ *
+ * so we make it simpler: on older version we just shut up!
+ */
+# define z_verbose
#endif
- va_end(ap);
-}
#endif /* INCLUDE_ZEXY_H__ */