diff options
-rw-r--r-- | src/zexy.c | 14 | ||||
-rw-r--r-- | src/zexy.h | 6 |
2 files changed, 20 insertions, 0 deletions
@@ -21,6 +21,7 @@ #include "zexy.h" #include "z_zexy.h" +#include <stdarg.h> /* do a little help thing */ @@ -144,3 +145,16 @@ void zexy_setup(void) zexy_register("zexy"); } + +void verbose(int level, const char *fmt, ...){ + char buf[MAXPDSTRING]; + va_list ap; + t_int arg[8]; + int i; + + va_start(ap, fmt); + vsnprintf(buf, MAXPDSTRING-1, fmt, ap); + va_end(ap); + + post("zverbose(%d): %s", level, buf); +} @@ -113,6 +113,12 @@ static void zexy_register(char*object){object=0;} * btw, this finally makes zexy binary incompatible with older version */ # define z_verbose verbose + +/* when compiling zexy as library, we also provide now provide a dummy verbose() function, + * which will chime in, when pd is lacking one + * this should make zexy binary compatible with older pd versions again + */ +void verbose(int level, const char *fmt, ...); #else /* * this might not work on compilers other than gcc |