[PD-cvs] externals/zexy/src repeat.c,1.2,1.3
IOhannes m zmölnig
zmoelnig at users.sourceforge.net
Wed Dec 21 11:55:57 CET 2005
Update of /cvsroot/pure-data/externals/zexy/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28358
Modified Files:
repeat.c
Log Message:
allow creation with no arguments (defaults to 2 repetitions)
Index: repeat.c
===================================================================
RCS file: /cvsroot/pure-data/externals/zexy/src/repeat.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** repeat.c 19 May 2005 09:42:55 -0000 1.2
--- repeat.c 21 Dec 2005 10:55:55 -0000 1.3
***************
*** 41,48 ****
}
! static void *repeat_new(t_float f)
{
t_repeat *x = (t_repeat *)pd_new(repeat_class);
! x->fcount = f;
floatinlet_new(&x->x_obj, &x->fcount);
outlet_new(&x->x_obj, 0);
--- 41,52 ----
}
! static void *repeat_new(t_symbol*s, int argc, t_atom*argv)
{
t_repeat *x = (t_repeat *)pd_new(repeat_class);
! if(argc){
! if(A_FLOAT==argv->a_type)
! x->fcount = atom_getfloat(argv);
! else return 0;
! } else x->fcount=2;
floatinlet_new(&x->x_obj, &x->fcount);
outlet_new(&x->x_obj, 0);
***************
*** 53,57 ****
{
repeat_class = class_new(gensym("repeat"), (t_newmethod)repeat_new,
! 0, sizeof(t_repeat), 0, A_FLOAT, 0);
class_addanything(repeat_class, repeat_anything);
--- 57,61 ----
{
repeat_class = class_new(gensym("repeat"), (t_newmethod)repeat_new,
! 0, sizeof(t_repeat), 0, A_GIMME, 0);
class_addanything(repeat_class, repeat_anything);
More information about the Pd-cvs
mailing list