[PD-cvs] externals/zexy/src zexy.h, 1.12, 1.13 index.c, 1.9, 1.10 lifop.c, 1.6, 1.7 fifop.c, 1.8, 1.9
IOhannes m zmölnig
zmoelnig at users.sourceforge.net
Wed Dec 21 10:15:22 CET 2005
Update of /cvsroot/pure-data/externals/zexy/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10863
Modified Files:
zexy.h index.c lifop.c fifop.c
Log Message:
removed C99-define-magic for verbose output:
now we just make a static function z_verbose() that calls either verbose() or post()
Index: fifop.c
===================================================================
RCS file: /cvsroot/pure-data/externals/zexy/src/fifop.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** fifop.c 4 Dec 2005 12:58:29 -0000 1.8
--- fifop.c 21 Dec 2005 09:15:20 -0000 1.9
***************
*** 107,111 ****
if(fifoprio==0){
! error("pfifo: no fifos available");
return -1;
}
--- 107,111 ----
if(fifoprio==0){
! error("pfifo: no fifos available");
return -1;
}
***************
*** 202,206 ****
static void fifop_query(t_fifop*x)
{
! verbose(1, "%d elements in fifo", (int)x->counter);
outlet_float(x->x_infout, (t_float)x->counter);
--- 202,206 ----
static void fifop_query(t_fifop*x)
{
! z_verbose(1, "%d elements in fifo", (int)x->counter);
outlet_float(x->x_infout, (t_float)x->counter);
Index: lifop.c
===================================================================
RCS file: /cvsroot/pure-data/externals/zexy/src/lifop.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** lifop.c 4 Dec 2005 12:58:29 -0000 1.6
--- lifop.c 21 Dec 2005 09:15:20 -0000 1.7
***************
*** 185,189 ****
static void lifop_query(t_lifop*x)
{
! verbose(1, "%d elements in lifo", (int)x->counter);
outlet_float(x->x_infout, (t_float)x->counter);
--- 185,189 ----
static void lifop_query(t_lifop*x)
{
! z_verbose(1, "%d elements in lifo", (int)x->counter);
outlet_float(x->x_infout, (t_float)x->counter);
Index: index.c
===================================================================
RCS file: /cvsroot/pure-data/externals/zexy/src/index.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** index.c 27 Oct 2005 11:58:10 -0000 1.9
--- index.c 21 Dec 2005 09:15:20 -0000 1.10
***************
*** 149,153 ****
newentry--;
if(x->names[newentry]){ /* it is already taken! */
! verbose(1, "index :: couldn't add element '%s' at position %d (already taken)", s->s_name, newentry+1);
outlet_float(x->x_obj.ob_outlet, -1.f);
return;
--- 149,153 ----
newentry--;
if(x->names[newentry]){ /* it is already taken! */
! z_verbose(1, "index :: couldn't add element '%s' at position %d (already taken)", s->s_name, newentry+1);
outlet_float(x->x_obj.ob_outlet, -1.f);
return;
***************
*** 164,168 ****
} else error("index :: couldn't find any place for new entry");
} else error("index :: max number of elements (%d) reached !", x->maxentries);
! } else verbose(1, "index :: element '%s' already exists", s->s_name);
/* couldn't add the symbol to our index table */
outlet_float(x->x_obj.ob_outlet, -1.f);
--- 164,168 ----
} else error("index :: couldn't find any place for new entry");
} else error("index :: max number of elements (%d) reached !", x->maxentries);
! } else z_verbose(1, "index :: element '%s' already exists", s->s_name);
/* couldn't add the symbol to our index table */
outlet_float(x->x_obj.ob_outlet, -1.f);
***************
*** 191,195 ****
outlet_float(x->x_obj.ob_outlet, 0.0);
} else {
! verbose(1, "index :: couldn't find element");
outlet_float(x->x_obj.ob_outlet, -1.0);
}
--- 191,195 ----
outlet_float(x->x_obj.ob_outlet, 0.0);
} else {
! z_verbose(1, "index :: couldn't find element");
outlet_float(x->x_obj.ob_outlet, -1.0);
}
Index: zexy.h
===================================================================
RCS file: /cvsroot/pure-data/externals/zexy/src/zexy.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** zexy.h 6 Dec 2005 22:00:17 -0000 1.12
--- zexy.h 21 Dec 2005 09:15:20 -0000 1.13
***************
*** 44,47 ****
--- 44,48 ----
* (like parallel-port)
* the ifdef is here, to not break the externals/build-system
+ * (read: build-systems outside of zexy)
*/
# include "zexyconf.h"
***************
*** 51,54 ****
--- 52,57 ----
#include <math.h>
+ #include <stdarg.h>
+
#define VERSION "2.1"
***************
*** 100,113 ****
#endif /* ZEXY_LIBRARY */
#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
*/
#else
! /* this might not work on compilers other than gcc
! * is it ISO-C99 or just a gnu-cpp thing ?
! */
! # define verbose(level, format, ...) post(format, ## __VA_ARGS__)
#endif
#endif /* INCLUDE_ZEXY_H__ */
--- 103,125 ----
#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
*/
+ verbose(level, fmt, ap);
#else
! /*
! * fall back to a simple post...
! */
! post(fmt, ap);
#endif
+ va_end(ap);
+ }
#endif /* INCLUDE_ZEXY_H__ */
More information about the Pd-cvs
mailing list