[PD-cvs] pd/src kernel.c, 1.1.2.64, 1.1.2.65 d_ugen.c, 1.3.4.1.2.5.2.13, 1.3.4.1.2.5.2.14
Mathieu Bouchard
matju at users.sourceforge.net
Thu Jul 19 07:13:23 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7132
Modified Files:
Tag: desiredata
kernel.c d_ugen.c
Log Message:
replaced most pd_error() by error()
Index: kernel.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v
retrieving revision 1.1.2.64
retrieving revision 1.1.2.65
diff -C2 -d -r1.1.2.64 -r1.1.2.65
*** kernel.c 19 Jul 2007 01:30:16 -0000 1.1.2.64
--- kernel.c 19 Jul 2007 05:13:21 -0000 1.1.2.65
***************
*** 401,405 ****
pd_free(b);
}
! } else pd_error(x, "%s: couldn't unbind", s->name);
}
--- 401,405 ----
pd_free(b);
}
! } else error("%s: couldn't unbind", s->name);
}
***************
*** 459,463 ****
}
! static void stackerror(t_pd *x) {pd_error(x,"stack overflow");}
/* to enable multithreading, make those variables "thread-local". this means that they have to go in
--- 459,463 ----
}
! static void stackerror(t_pd *x) {error("stack overflow");}
/* to enable multithreading, make those variables "thread-local". this means that they have to go in
***************
*** 539,543 ****
static void inlet_wrong(t_inlet *x, t_symbol *s) {
! pd_error(x->owner, "inlet: expected '%s' but got '%s'", x->symfrom->name, s->name);
}
--- 539,543 ----
static void inlet_wrong(t_inlet *x, t_symbol *s) {
! error("inlet: expected '%s' but got '%s'", x->symfrom->name, s->name);
}
***************
*** 949,953 ****
static void pd_defaultanything(t_pd *x, t_symbol *s, int argc, t_atom *argv) {
! pd_error(x, "%s: no method for '%s'", x->_class->name->name, s->name);
}
--- 949,953 ----
static void pd_defaultanything(t_pd *x, t_symbol *s, int argc, t_atom *argv) {
! error("%s: no method for '%s'", x->_class->name->name, s->name);
}
***************
*** 1182,1186 ****
*(t_sample *)(((char *)x) + offset) = f;
else
! pd_error(x, "%s: float unexpected for signal input", x->_class->name->name);
}
--- 1182,1186 ----
*(t_sample *)(((char *)x) + offset) = f;
else
! error("%s: float unexpected for signal input", x->_class->name->name);
}
***************
*** 1381,1385 ****
if (!argc) c->floatmethod(x, 0.);
else if (argv->a_type == A_FLOAT) c->floatmethod(x, argv->a_float);
! else pd_error(x, "expected one float, in class [%s]", c->name->name);
return;
}
--- 1381,1385 ----
if (!argc) c->floatmethod(x, 0.);
else if (argv->a_type == A_FLOAT) c->floatmethod(x, argv->a_float);
! else error("expected one float, in class [%s]", c->name->name);
return;
}
***************
*** 1450,1454 ****
return;
badarg:
! pd_error(x, "Bad arguments for message '%s' to object '%s'", s->name, c->name->name);
}
--- 1450,1454 ----
return;
badarg:
! error("Bad arguments for message '%s' to object '%s'", s->name, c->name->name);
}
***************
*** 1465,1469 ****
while (1) {
if (nargs > MAXPDARG) {
! pd_error(x, "pd_vmess: only %d allowed", MAXPDARG);
break;
}
--- 1465,1469 ----
while (1) {
if (nargs > MAXPDARG) {
! error("pd_vmess: only %d allowed", MAXPDARG);
break;
}
***************
*** 1499,1503 ****
t_methodentry *m = c->methods;
for (int i=c->nmethod; i--; m++) if (m->me_name == s) return m->me_fun;
! pd_error(x, "%s: no method for message '%s'", c->name->name, s->name);
return (t_gotfn)nullfn;
}
--- 1499,1503 ----
t_methodentry *m = c->methods;
for (int i=c->nmethod; i--; m++) if (m->me_name == s) return m->me_fun;
! error("%s: no method for message '%s'", c->name->name, s->name);
return (t_gotfn)nullfn;
}
Index: d_ugen.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_ugen.c,v
retrieving revision 1.3.4.1.2.5.2.13
retrieving revision 1.3.4.1.2.5.2.14
diff -C2 -d -r1.3.4.1.2.5.2.13 -r1.3.4.1.2.5.2.14
*** d_ugen.c 10 Jul 2007 07:02:00 -0000 1.3.4.1.2.5.2.13
--- d_ugen.c 19 Jul 2007 05:13:21 -0000 1.3.4.1.2.5.2.14
***************
*** 26,29 ****
--- 26,30 ----
#include <stdlib.h>
#include <stdarg.h>
+ #define pd_error(a,b...) error(b)
/* T.Grill - include SIMD functionality */
***************
*** 146,153 ****
int overlap = (int)foverlap;
int dspstate = canvas_suspend_dsp();
- int vecsize;
if (overlap < 1) overlap = 1;
if (calcsize < 0) calcsize = 0; /* this means we'll get it from parent later. */
-
/* IOhannes { */
if (fupsample <= 0) upsample = downsample = 1;
--- 147,152 ----
***************
*** 160,185 ****
}
/* } IOhannes */
!
! /* vecsize is smallest power of 2 large enough to hold calcsize */
if (calcsize) {
! if ((vecsize = (1 << ilog2(calcsize))) != calcsize) vecsize *= 2;
! } else vecsize = 0;
! if (vecsize && (vecsize != (1 << ilog2(vecsize)))) {
! pd_error(x, "block~: vector size not a power of 2");
! vecsize = 64;
! }
! if (overlap != (1 << ilog2(overlap))) {
! pd_error(x, "block~: overlap not a power of 2");
! overlap = 1;
}
/* IOhannes { */
! if (downsample != (1 << ilog2(downsample))) {
! pd_error(x, "block~: downsampling not a power of 2");
! downsample = 1;
! }
! if (upsample != (1 << ilog2(upsample))) {
! pd_error(x, "block~: upsampling not a power of 2");
! upsample = 1;
! }
/* } IOhannes */
x->calcsize = calcsize;
--- 159,173 ----
}
/* } IOhannes */
! /* vecsize is smallest power of 2 large enough to hold calcsize */
! int vecsize = 0;
if (calcsize) {
! vecsize = (1 << ilog2(calcsize));
! if (vecsize != calcsize) vecsize *= 2;
}
+ if (vecsize && vecsize != (1 << ilog2(vecsize))) {error("block~: vector size not a power of 2"); vecsize = 64;}
+ if ( overlap != (1 << ilog2(overlap))) {error("block~: overlap not a power of 2"); overlap = 1;}
/* IOhannes { */
! if (downsample != (1 << ilog2(downsample))) {error("block~: downsampling not a power of 2"); downsample = 1;}
! if ( upsample != (1 << ilog2( upsample))) {error("block~: upsampling not a power of 2"); upsample = 1;}
/* } IOhannes */
x->calcsize = calcsize;
***************
*** 211,215 ****
ip = (*(t_perfroutine)(*ip))(ip);
x->x_return = 0;
! } else pd_error(x, "bang to block~ or on-state switch~ has no effect");
}
--- 199,203 ----
ip = (*(t_perfroutine)(*ip))(ip);
x->x_return = 0;
! } else error("bang to block~ or on-state switch~ has no effect");
}
More information about the Pd-cvs
mailing list