Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21745
Modified Files: Tag: desiredata builtins_dsp.c Log Message: fixed recent problem with [-~] [*~] [/~] [min~] [max~]
Index: builtins_dsp.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/builtins_dsp.c,v retrieving revision 1.1.2.15 retrieving revision 1.1.2.16 diff -C2 -d -r1.1.2.15 -r1.1.2.16 *** builtins_dsp.c 4 Jan 2007 23:55:53 -0000 1.1.2.15 --- builtins_dsp.c 7 Jan 2007 00:34:18 -0000 1.1.2.16 *************** *** 67,71 **** typedef t_dop t_minus, t_scalarminus;
! #define DSPNEW(NAME) \ static void *NAME##_new(t_symbol *s, int argc, t_atom *argv) { \ if (argc > 1) error("extra arguments ignored"); \ --- 67,71 ---- typedef t_dop t_minus, t_scalarminus;
! #define DSPNEW(NAME,SYM) \ static void *NAME##_new(t_symbol *s, int argc, t_atom *argv) { \ if (argc > 1) error("extra arguments ignored"); \ *************** *** 79,87 **** return x;} \ static void NAME##_setup() { \ ! t_class *c = NAME##_class = class_new2("+~",NAME##_new,0,sizeof(t_dop),0,"*"); \ class_addmethod2(c, NAME##_dsp, "dsp",""); \ CLASS_MAINSIGNALIN(c, t_dop, a); \ class_sethelpsymbol(NAME##_class, gensym("sigbinops")); \ ! c = scalar##NAME##_class = class_new2("+~",0,0,sizeof(t_dop),0,""); \ CLASS_MAINSIGNALIN(c, t_dop, a); \ class_addmethod2(c, scalar##NAME##_dsp, "dsp",""); \ --- 79,87 ---- return x;} \ static void NAME##_setup() { \ ! t_class *c = NAME##_class = class_new2(SYM,NAME##_new,0,sizeof(t_dop),0,"*"); \ class_addmethod2(c, NAME##_dsp, "dsp",""); \ CLASS_MAINSIGNALIN(c, t_dop, a); \ class_sethelpsymbol(NAME##_class, gensym("sigbinops")); \ ! c = scalar##NAME##_class = class_new2(SYM,0,0,sizeof(t_dop),0,""); \ CLASS_MAINSIGNALIN(c, t_dop, a); \ class_addmethod2(c, scalar##NAME##_dsp, "dsp",""); \ *************** *** 182,191 **** }
! PERFORM(plus ,a+b) DSPDSP(plus) DSPNEW(plus) ! PERFORM(minus,a-b) DSPDSP(minus) DSPNEW(minus) ! PERFORM(times,a*b) /*DSPDSP(times)*/ DSPNEW(times) ! /*PERFORM(over,a/b)*/ DSPDSP(over) DSPNEW(over) ! PERFORM(min ,a<b?a:b) DSPDSP(min) DSPNEW(min) ! PERFORM(max ,a>b?a:b) DSPDSP(max) DSPNEW(max)
t_int *over_perform(t_int *w) { --- 182,191 ---- }
! PERFORM(plus ,a+b) DSPDSP(plus) DSPNEW(plus ,"+~") ! PERFORM(minus,a-b) DSPDSP(minus) DSPNEW(minus,"-~") ! PERFORM(times,a*b) /*DSPDSP(times)*/ DSPNEW(times,"*~") ! /*PERFORM(over,a/b)*/ DSPDSP(over) DSPNEW(over ,"/~") ! PERFORM(min ,a<b?a:b) DSPDSP(min) DSPNEW(min ,"min~") ! PERFORM(max ,a>b?a:b) DSPDSP(max) DSPNEW(max ,"max~")
t_int *over_perform(t_int *w) {