Update of /cvsroot/pure-data/externals/iemlib/iemlib2/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26377
Modified Files: iem_sel_any.c Log Message: add old method set_item_name to make it compatible
Index: iem_sel_any.c =================================================================== RCS file: /cvsroot/pure-data/externals/iemlib/iemlib2/src/iem_sel_any.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** iem_sel_any.c 9 Dec 2006 01:57:51 -0000 1.1 --- iem_sel_any.c 8 Nov 2007 15:56:12 -0000 1.2 *************** *** 69,72 **** --- 69,95 ---- }
+ static void iem_sel_any_set_item_name(t_iem_sel_any *x, t_symbol *s, int ac, t_atom *av) + { + if((ac >= 2) && (IS_A_FLOAT(av, 1))) + { + int i = (int)atom_getintarg(1, ac, av); + + if((i >= 0) && (i < x->x_max_ac)) + { + if(IS_A_SYMBOL(av, 0)) + x->x_any[i] = atom_getsymbolarg(0, ac, av); + else if(IS_A_FLOAT(av, 0)) + { + char str[100]; + + sprintf(str, "%g", atom_getfloatarg(0, ac, av)); + x->x_any[i] = gensym(str); + } + if(i >= x->x_ac) + x->x_ac = i+1; + } + } + } + static void iem_sel_any_clear(t_iem_sel_any *x) { *************** *** 103,106 **** --- 126,130 ---- (t_method)iem_sel_any_free, sizeof(t_iem_sel_any), 0, A_DEFFLOAT, 0); class_addmethod(iem_sel_any_class, (t_method)iem_sel_any_add, gensym("add"), A_GIMME, 0); + class_addmethod(iem_sel_any_class, (t_method)iem_sel_any_set_item_name, gensym("set_item_name"), A_GIMME, 0); class_addmethod(iem_sel_any_class, (t_method)iem_sel_any_clear, gensym("clear"), 0); class_addfloat(iem_sel_any_class, (t_method)iem_sel_any_float);