[PD-cvs] externals/zexy/src zexy.c,1.15,1.16 zexy.h,1.24,1.25
IOhannes m zmölnig
zmoelnig at users.sourceforge.net
Thu Mar 8 14:10:56 CET 2007
Update of /cvsroot/pure-data/externals/zexy/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13723
Modified Files:
zexy.c zexy.h
Log Message:
provide our own verbose() function, in case pd is lacking one;
this is important when compiling the zexy binary against newer pd-versions
but really running it on outdated versions
Index: zexy.c
===================================================================
RCS file: /cvsroot/pure-data/externals/zexy/src/zexy.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** zexy.c 27 Jan 2006 13:02:44 -0000 1.15
--- zexy.c 8 Mar 2007 13:10:53 -0000 1.16
***************
*** 22,25 ****
--- 22,26 ----
#include "zexy.h"
#include "z_zexy.h"
+ #include <stdarg.h>
/* do a little help thing */
***************
*** 145,146 ****
--- 146,160 ----
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);
+ }
Index: zexy.h
===================================================================
RCS file: /cvsroot/pure-data/externals/zexy/src/zexy.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** zexy.h 7 Mar 2007 15:16:35 -0000 1.24
--- zexy.h 8 Mar 2007 13:10:54 -0000 1.25
***************
*** 114,117 ****
--- 114,123 ----
*/
# 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
/*
More information about the Pd-cvs
mailing list