Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20512
Modified Files: Tag: desiredata desire.c Log Message: 0.40: gatom_list
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.44 retrieving revision 1.1.2.217.2.45 diff -C2 -d -r1.1.2.217.2.44 -r1.1.2.217.2.45 *** desire.c 8 Dec 2006 09:17:53 -0000 1.1.2.217.2.44 --- desire.c 8 Dec 2006 09:43:05 -0000 1.1.2.217.2.45 *************** *** 6206,6209 **** --- 6206,6218 ---- }
+ /* We need a list method because, since there's both an "inlet" and a + "nofirstin" flag, the standard list behavior gets confused. */ + static void gatom_list(t_gatom *x, t_symbol *s, int argc, t_atom *argv) { + if (!argc) gatom_bang(x); + else if (argv->a_type == A_FLOAT) gatom_float(x, argv->a_w.w_float); + else if (argv->a_type == A_SYMBOL) gatom_symbol(x, argv->a_w.w_symbol); + else pd_error(x, "gatom_list: need float or symbol"); + } + void canvas_atom(t_canvas *gl, t_atomtype type, t_symbol *s, int argc, t_atom *argv) { t_gatom *x = (t_gatom *)pd_new(gatom_class); *************** *** 6393,6396 **** --- 6402,6406 ---- class_addfloat(c, gatom_float); class_addsymbol(c, gatom_symbol); + class_addlist(c, gatom_list); class_addmethod3(c, gatom_set, "set","*"); class_addmethod3(c, gatom_reload, "reload","*");