From 5a22e055ba2edd7a091270f4954dbebe55d71fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 21 Dec 2005 09:53:24 +0000 Subject: 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 --- src/zexy.h | 24 ++++++++++-------------- 1 file 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 -#include - #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__ */ -- cgit v1.2.1