Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14523
Modified Files: Tag: desiredata builtins.c Log Message: switching to class_new2
Index: builtins.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/builtins.c,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -C2 -d -r1.1.2.7 -r1.1.2.8 *** builtins.c 4 Jan 2007 19:21:28 -0000 1.1.2.7 --- builtins.c 4 Jan 2007 21:37:27 -0000 1.1.2.8 *************** *** 104,108 **** static void C##_float(t_object *x, t_float a) {outlet_float(x->outlet, EXPR);} #define FUNC1DECL(C,SYM) \ ! C##_class = class_new(gensym(SYM), C##_new, 0, sizeof(t_object), 0, 0); \ class_addfloat(C##_class, (t_method)C##_float); \ class_sethelpsymbol(C##_class,s); --- 104,108 ---- static void C##_float(t_object *x, t_float a) {outlet_float(x->outlet, EXPR);} #define FUNC1DECL(C,SYM) \ ! C##_class = class_new2(SYM,C##_new,0,sizeof(t_object),0,""); \ class_addfloat(C##_class, (t_method)C##_float); \ class_sethelpsymbol(C##_class,s); *************** *** 1341,1345 **** void pdint_setup() { pdint_class = class_new(gensym("int"), (t_newmethod)pdint_new, 0, sizeof(t_pdint), 0, A_DEFFLOAT, 0); ! class_addcreator((t_newmethod)pdint_new, gensym("i"), A_DEFFLOAT, 0); class_addbang(pdint_class, pdint_bang); class_addfloat(pdint_class, pdint_float); --- 1341,1345 ---- void pdint_setup() { pdint_class = class_new(gensym("int"), (t_newmethod)pdint_new, 0, sizeof(t_pdint), 0, A_DEFFLOAT, 0); ! class_addcreator2("i",pdint_new,"F"); class_addbang(pdint_class, pdint_bang); class_addfloat(pdint_class, pdint_float); *************** *** 1363,1367 **** void pdfloat_setup() { pdfloat_class = class_new(gensym("float"), (t_newmethod)pdfloat_new, 0, sizeof(t_pdfloat), 0, A_FLOAT, 0); ! class_addcreator((t_newmethod)pdfloat_new2, gensym("f"), A_DEFFLOAT, 0); class_addbang(pdfloat_class, pdfloat_bang); class_addfloat(pdfloat_class, (t_method)pdfloat_float); --- 1363,1367 ---- void pdfloat_setup() { pdfloat_class = class_new(gensym("float"), (t_newmethod)pdfloat_new, 0, sizeof(t_pdfloat), 0, A_FLOAT, 0); ! class_addcreator2("f",pdfloat_new2,"F"); class_addbang(pdfloat_class, pdfloat_bang); class_addfloat(pdfloat_class, (t_method)pdfloat_float); *************** *** 1415,1419 **** void bang_setup() { bang_class = class_new(gensym("bang"), (t_newmethod)bang_new, 0, sizeof(t_bang), 0, 0); ! class_addcreator((t_newmethod)bang_new2, gensym("b"), 0); class_addbang(bang_class, bang_bang); class_addfloat(bang_class, bang_bang); --- 1415,1419 ---- void bang_setup() { bang_class = class_new(gensym("bang"), (t_newmethod)bang_new, 0, sizeof(t_bang), 0, 0); ! class_addcreator2("b",bang_new2,""); class_addbang(bang_class, bang_bang); class_addfloat(bang_class, bang_bang); *************** *** 1449,1453 **** static void send_setup() { send_class = class_new(gensym("send"), (t_newmethod)send_new, 0, sizeof(t_send), 0, A_DEFSYM, 0); ! class_addcreator((t_newmethod)send_new, gensym("s"), A_DEFSYM, 0); class_addbang(send_class, send_bang); class_addfloat(send_class, send_float); --- 1449,1453 ---- static void send_setup() { send_class = class_new(gensym("send"), (t_newmethod)send_new, 0, sizeof(t_send), 0, A_DEFSYM, 0); ! class_addcreator2("s",send_new,"S"); class_addbang(send_class, send_bang); class_addfloat(send_class, send_float); *************** *** 1485,1489 **** receive_class = class_new(gensym("receive"), (t_newmethod)receive_new, (t_method)receive_free, sizeof(t_receive), CLASS_NOINLET, A_DEFSYM, 0); ! class_addcreator((t_newmethod)receive_new, gensym("r"), A_DEFSYM, 0); class_addbang(receive_class, receive_bang); class_addfloat(receive_class, (t_method)receive_float); --- 1485,1489 ---- receive_class = class_new(gensym("receive"), (t_newmethod)receive_new, (t_method)receive_free, sizeof(t_receive), CLASS_NOINLET, A_DEFSYM, 0); ! class_addcreator2("r",receive_new,"S"); class_addbang(receive_class, receive_bang); class_addfloat(receive_class, (t_method)receive_float); *************** *** 1580,1591 **** } void select_setup() { ! sel1_class = class_new(gensym("select"), 0, 0, sizeof(t_sel1), 0, 0); class_addfloat(sel1_class, sel1_float); class_addsymbol(sel1_class, sel1_symbol); ! sel2_class = class_new(gensym("select"), 0, (t_method)sel2_free, sizeof(t_sel2), 0, 0); class_addfloat(sel2_class, sel2_float); class_addsymbol(sel2_class, sel2_symbol); ! class_addcreator((t_newmethod)select_new, gensym("select"), A_GIMME, 0); ! class_addcreator((t_newmethod)select_new, gensym("sel"), A_GIMME, 0); }
--- 1580,1591 ---- } void select_setup() { ! sel1_class = class_new2("select",0,0,sizeof(t_sel1),0,""); class_addfloat(sel1_class, sel1_float); class_addsymbol(sel1_class, sel1_symbol); ! sel2_class = class_new2("select",0,sel2_free,sizeof(t_sel2),0,""); class_addfloat(sel2_class, sel2_float); class_addsymbol(sel2_class, sel2_symbol); ! class_addcreator2("select",select_new,"*"); ! class_addcreator2("sel", select_new,"*"); }
*************** *** 1702,1707 **** } void route_setup() { ! route_class = class_new(gensym("route"), (t_newmethod)route_new, ! (t_method)route_free, sizeof(t_route), 0, A_GIMME, 0); class_addlist(route_class, route_list); class_addanything(route_class, route_anything); --- 1702,1706 ---- } void route_setup() { ! route_class = class_new2("route",route_new,route_free,sizeof(t_route),0,"*"); class_addlist(route_class, route_list); class_addanything(route_class, route_anything); *************** *** 1821,1826 **** } static void pack_setup() { ! pack_class = class_new(gensym("pack"), (t_newmethod)pack_new, ! (t_method)pack_free, sizeof(t_pack), 0, A_GIMME, 0); class_addbang(pack_class, pack_bang); class_addpointer(pack_class, pack_pointer); --- 1820,1824 ---- } static void pack_setup() { ! pack_class = class_new2("pack",pack_new,pack_free,sizeof(t_pack),0,"*"); class_addbang(pack_class, pack_bang); class_addpointer(pack_class, pack_pointer); *************** *** 1898,1903 **** static void unpack_free(t_unpack *x) {freebytes(x->vec, x->n * sizeof(*x->vec));} static void unpack_setup() { ! unpack_class = class_new(gensym("unpack"), (t_newmethod)unpack_new, ! (t_method)unpack_free, sizeof(t_unpack), 0, A_GIMME, 0); class_addlist(unpack_class, unpack_list); class_addanything(unpack_class, unpack_anything); --- 1896,1900 ---- static void unpack_free(t_unpack *x) {freebytes(x->vec, x->n * sizeof(*x->vec));} static void unpack_setup() { ! unpack_class = class_new2("unpack",unpack_new,unpack_free,sizeof(t_unpack),0,"*"); class_addlist(unpack_class, unpack_list); class_addanything(unpack_class, unpack_anything); *************** *** 1980,1986 **** static void trigger_free(t_trigger *x) {freebytes(x->vec, x->n * sizeof(*x->vec));} static void trigger_setup() { ! trigger_class = class_new(gensym("trigger"), (t_newmethod)trigger_new, ! (t_method)trigger_free, sizeof(t_trigger), 0, A_GIMME, 0); ! class_addcreator((t_newmethod)trigger_new, gensym("t"), A_GIMME, 0); class_addlist(trigger_class, trigger_list); class_addbang(trigger_class, trigger_bang); --- 1977,1982 ---- static void trigger_free(t_trigger *x) {freebytes(x->vec, x->n * sizeof(*x->vec));} static void trigger_setup() { ! trigger_class = class_new2("trigger",trigger_new,trigger_free,sizeof(t_trigger),0,"*"); ! class_addcreator2("t",trigger_new,"*"); class_addlist(trigger_class, trigger_list); class_addbang(trigger_class, trigger_bang); *************** *** 2015,2019 **** if (x->state) outlet_anything(x->outlet, s, argc, argv);} static void spigot_setup() { ! spigot_class = class_new(gensym("spigot"), (t_newmethod)spigot_new, 0, sizeof(t_spigot), 0, A_DEFFLOAT, 0); class_addbang(spigot_class, spigot_bang); class_addpointer(spigot_class, spigot_pointer); --- 2011,2015 ---- if (x->state) outlet_anything(x->outlet, s, argc, argv);} static void spigot_setup() { ! spigot_class = class_new2("spigot",spigot_new,0,sizeof(t_spigot),0,"F"); class_addbang(spigot_class, spigot_bang); class_addpointer(spigot_class, spigot_pointer); *************** *** 2042,2046 **** } static void moses_setup() { ! moses_class = class_new(gensym("moses"), (t_newmethod)moses_new, 0, sizeof(t_moses), 0, A_DEFFLOAT, 0); class_addfloat(moses_class, moses_float); } --- 2038,2042 ---- } static void moses_setup() { ! moses_class = class_new2("moses",moses_new,0,sizeof(t_moses),0,"F"); class_addfloat(moses_class, moses_float); } *************** *** 2069,2074 **** static void until_bang2(t_until *x) {x->run = 0;} static void until_setup() { ! until_class = class_new(gensym("until"), (t_newmethod)until_new, 0, ! sizeof(t_until), 0, 0); class_addbang(until_class, until_bang); class_addfloat(until_class, until_float); --- 2065,2069 ---- static void until_bang2(t_until *x) {x->run = 0;} static void until_setup() { ! until_class = class_new2("until",until_new,0,sizeof(t_until),0,""); class_addbang(until_class, until_bang); class_addfloat(until_class, until_float); *************** *** 2101,2106 ****
static void makefilename_setup() { ! makefilename_class = class_new(gensym("makefilename"), (t_newmethod)makefilename_new, 0, ! sizeof(t_makefilename), 0, A_DEFSYM, 0); class_addfloat(makefilename_class, makefilename_float); class_addsymbol(makefilename_class, makefilename_symbol); --- 2096,2100 ----
static void makefilename_setup() { ! makefilename_class = class_new2("makefilename",makefilename_new,0,sizeof(t_makefilename),0,"S"); class_addfloat(makefilename_class, makefilename_float); class_addsymbol(makefilename_class, makefilename_symbol); *************** *** 2132,2137 **** } void swap_setup() { ! swap_class = class_new(gensym("swap"), (t_newmethod)swap_new, 0, sizeof(t_swap), 0, A_DEFFLOAT, 0); ! class_addcreator((t_newmethod)swap_new, gensym("fswap"), A_DEFFLOAT, 0); class_addbang(swap_class, swap_bang); class_addfloat(swap_class, swap_float); --- 2126,2131 ---- } void swap_setup() { ! swap_class = class_new2("swap",swap_new,0,sizeof(t_swap),0,"F"); ! class_addcreator2("fswap",swap_new,"F"); class_addbang(swap_class, swap_bang); class_addfloat(swap_class, swap_float); *************** *** 2157,2162 **** static void change_set(t_change *x, t_float f) {x->f = f;} void change_setup() { ! change_class = class_new(gensym("change"), (t_newmethod)change_new, 0, ! sizeof(t_change), 0, A_DEFFLOAT, 0); class_addbang(change_class, change_bang); class_addfloat(change_class, change_float); --- 2151,2155 ---- static void change_set(t_change *x, t_float f) {x->f = f;} void change_setup() { ! change_class = class_new2("change",change_new,0,sizeof(t_change),0,"F"); class_addbang(change_class, change_bang); class_addfloat(change_class, change_float); *************** *** 2222,2231 ****
static void value_setup() { ! value_class = class_new(gensym("value"), (t_newmethod)value_new, ! (t_method)value_ff, sizeof(t_value), 0, A_DEFSYM, 0); ! class_addcreator((t_newmethod)value_new, gensym("v"), A_DEFSYM, 0); class_addbang(value_class, value_bang); class_addfloat(value_class, value_float); ! vcommon_class = class_new(gensym("value"), 0, 0, sizeof(t_vcommon), CLASS_PD, 0); }
--- 2215,2223 ----
static void value_setup() { ! value_class = class_new2("value",value_new,value_ff,sizeof(t_value),0,"S"); ! class_addcreator2("v",value_new,"S"); class_addbang(value_class, value_bang); class_addfloat(value_class, value_float); ! vcommon_class = class_new2("value",0,0,sizeof(t_vcommon),CLASS_PD,""); }
*************** *** 2269,2276 **** static void sysexin_free(t_midiin *x) {pd_unbind(x, sysexin_sym);} static void midiin_setup() { ! midiin_class = class_new(gensym("midiin"), (t_newmethod)midiin_new, ! (t_method)midiin_free, sizeof(t_midiin), CLASS_NOINLET, A_DEFFLOAT, 0); ! sysexin_class = class_new(gensym("sysexin"), (t_newmethod)sysexin_new, ! (t_method)sysexin_free, sizeof(t_midiin), CLASS_NOINLET, A_DEFFLOAT, 0); class_addlist(midiin_class, midiin_list); class_addlist(sysexin_class, midiin_list); --- 2261,2266 ---- static void sysexin_free(t_midiin *x) {pd_unbind(x, sysexin_sym);} static void midiin_setup() { ! midiin_class = class_new2("midiin",midiin_new,midiin_free,sizeof(t_midiin),CLASS_NOINLET,"F"); ! sysexin_class = class_new2("sysexin",sysexin_new,sysexin_free,sizeof(t_midiin),CLASS_NOINLET,"F"); class_addlist(midiin_class, midiin_list); class_addlist(sysexin_class, midiin_list); *************** *** 2320,2325 **** static void notein_free(t_notein *x) {pd_unbind(x, notein_sym);} static void notein_setup() { ! notein_class = class_new(gensym("notein"), (t_newmethod)notein_new, ! (t_method)notein_free, sizeof(t_notein), CLASS_NOINLET, A_DEFFLOAT, 0); class_addlist(notein_class, notein_list); class_sethelpsymbol(notein_class, gensym("midi")); --- 2310,2314 ---- static void notein_free(t_notein *x) {pd_unbind(x, notein_sym);} static void notein_setup() { ! notein_class = class_new2("notein",notein_new,notein_free,sizeof(t_notein),CLASS_NOINLET,"F"); class_addlist(notein_class, notein_list); class_sethelpsymbol(notein_class, gensym("midi")); *************** *** 2371,2376 **** static void ctlin_free(t_ctlin *x) {pd_unbind(x, ctlin_sym);} static void ctlin_setup() { ! ctlin_class = class_new(gensym("ctlin"), (t_newmethod)ctlin_new, ! (t_method)ctlin_free, sizeof(t_ctlin), CLASS_NOINLET, A_GIMME, 0); class_addlist(ctlin_class, ctlin_list); class_sethelpsymbol(ctlin_class, gensym("midi")); --- 2360,2364 ---- static void ctlin_free(t_ctlin *x) {pd_unbind(x, ctlin_sym);} static void ctlin_setup() { ! ctlin_class = class_new2("ctlin",ctlin_new,ctlin_free,sizeof(t_ctlin),CLASS_NOINLET,"*"); class_addlist(ctlin_class, ctlin_list); class_sethelpsymbol(ctlin_class, gensym("midi")); *************** *** 2420,2431 **** static void touchin_free(t_touchin *x) {pd_unbind(x, touchin_sym);} static void midi2_setup() { ! pgmin_class = class_new(gensym("pgmin"), (t_newmethod)pgmin_new, ! (t_method)pgmin_free, sizeof(t_pgmin), CLASS_NOINLET, A_DEFFLOAT, 0); class_addlist(pgmin_class,midi2_list); ! bendin_class = class_new(gensym("bendin"), (t_newmethod)bendin_new, ! (t_method)bendin_free, sizeof(t_bendin), CLASS_NOINLET, A_DEFFLOAT, 0); class_addlist(bendin_class,midi2_list); ! touchin_class = class_new(gensym("touchin"), (t_newmethod)touchin_new, ! (t_method)touchin_free, sizeof(t_touchin), CLASS_NOINLET, A_DEFFLOAT, 0); class_addlist(touchin_class,midi2_list); class_sethelpsymbol(pgmin_class, gensym("midi")); --- 2408,2416 ---- static void touchin_free(t_touchin *x) {pd_unbind(x, touchin_sym);} static void midi2_setup() { ! pgmin_class = class_new2("pgmin",pgmin_new,pgmin_free,sizeof(t_pgmin),CLASS_NOINLET,"F"); class_addlist(pgmin_class,midi2_list); ! bendin_class = class_new2("bendin",bendin_new,bendin_free,sizeof(t_bendin),CLASS_NOINLET,"F"); class_addlist(bendin_class,midi2_list); ! touchin_class = class_new2("touchin",touchin_new,touchin_free,sizeof(t_touchin),CLASS_NOINLET,"F"); class_addlist(touchin_class,midi2_list); class_sethelpsymbol(pgmin_class, gensym("midi")); *************** *** 2481,2487 **** static void polytouchin_free(t_polytouchin *x) {pd_unbind(x, polytouchin_sym);} static void polytouchin_setup() { ! polytouchin_class = class_new(gensym("polytouchin"), ! (t_newmethod)polytouchin_new, (t_method)polytouchin_free, ! sizeof(t_polytouchin), CLASS_NOINLET, A_DEFFLOAT, 0); class_addlist(polytouchin_class, polytouchin_list); class_sethelpsymbol(polytouchin_class, gensym("midi")); --- 2466,2471 ---- static void polytouchin_free(t_polytouchin *x) {pd_unbind(x, polytouchin_sym);} static void polytouchin_setup() { ! polytouchin_class = class_new2("polytouchin",polytouchin_new,polytouchin_free, ! sizeof(t_polytouchin), CLASS_NOINLET,"F"); class_addlist(polytouchin_class, polytouchin_list); class_sethelpsymbol(polytouchin_class, gensym("midi")); *************** *** 2518,2524 **** static void midiclkin_free(t_midiclkin *x) {pd_unbind(x, midiclkin_sym);} static void midiclkin_setup() { ! midiclkin_class = class_new(gensym("midiclkin"), ! (t_newmethod)midiclkin_new, (t_method)midiclkin_free, ! sizeof(t_midiclkin), CLASS_NOINLET, A_DEFFLOAT, 0); class_addlist(midiclkin_class, midiclkin_list); class_sethelpsymbol(midiclkin_class, gensym("midi")); --- 2502,2506 ---- static void midiclkin_free(t_midiclkin *x) {pd_unbind(x, midiclkin_sym);} static void midiclkin_setup() { ! midiclkin_class = class_new2("midiclkin",midiclkin_new,midiclkin_free,sizeof(t_midiclkin),CLASS_NOINLET,"F"); class_addlist(midiclkin_class, midiclkin_list); class_sethelpsymbol(midiclkin_class, gensym("midi")); *************** *** 2560,2566 **** static void midirealtimein_free(t_midirealtimein *x) {pd_unbind(x, midirealtimein_sym);} static void midirealtimein_setup() { ! midirealtimein_class = class_new(gensym("midirealtimein"), ! (t_newmethod)midirealtimein_new, (t_method)midirealtimein_free, ! sizeof(t_midirealtimein), CLASS_NOINLET, A_DEFFLOAT, 0); class_addlist(midirealtimein_class, midirealtimein_list); class_sethelpsymbol(midirealtimein_class, gensym("midi")); --- 2542,2547 ---- static void midirealtimein_free(t_midirealtimein *x) {pd_unbind(x, midirealtimein_sym);} static void midirealtimein_setup() { ! midirealtimein_class = class_new2("midirealtimein",midirealtimein_new,midirealtimein_free, ! sizeof(t_midirealtimein),CLASS_NOINLET,"F"); class_addlist(midirealtimein_class, midirealtimein_list); class_sethelpsymbol(midirealtimein_class, gensym("midi")); *************** *** 2595,2600 **** } static void midiout_setup() { ! midiout_class = class_new(gensym("midiout"), (t_newmethod)midiout_new, 0, ! sizeof(t_midiout), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(midiout_class, midiout_float); class_sethelpsymbol(midiout_class, gensym("midi")); --- 2576,2580 ---- } static void midiout_setup() { ! midiout_class = class_new2("midiout",midiout_new,0,sizeof(t_midiout),0,"FF"); class_addfloat(midiout_class, midiout_float); class_sethelpsymbol(midiout_class, gensym("midi")); *************** *** 2620,2625 **** } static void noteout_setup() { ! noteout_class = class_new(gensym("noteout"), (t_newmethod)noteout_new, 0, ! sizeof(t_noteout), 0, A_DEFFLOAT, 0); class_addfloat(noteout_class, noteout_float); class_sethelpsymbol(noteout_class, gensym("midi")); --- 2600,2604 ---- } static void noteout_setup() { ! noteout_class = class_new2("noteout",noteout_new,0,sizeof(t_noteout),0,"F"); class_addfloat(noteout_class, noteout_float); class_sethelpsymbol(noteout_class, gensym("midi")); *************** *** 2645,2650 **** } static void ctlout_setup() { ! ctlout_class = class_new(gensym("ctlout"), (t_newmethod)ctlout_new, 0, ! sizeof(t_ctlout), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(ctlout_class, ctlout_float); class_sethelpsymbol(ctlout_class, gensym("midi")); --- 2624,2628 ---- } static void ctlout_setup() { ! ctlout_class = class_new2("ctlout",ctlout_new,0,sizeof(t_ctlout),0,"FF"); class_addfloat(ctlout_class, ctlout_float); class_sethelpsymbol(ctlout_class, gensym("midi")); *************** *** 2676,2682 **** } static void mido2_setup() { ! pgmout_class = class_new(gensym("pgmout"), (t_newmethod)pgmout_new, 0, sizeof(t_pgmout), 0, A_DEFFLOAT, 0); ! bendout_class = class_new(gensym("bendout"), (t_newmethod)bendout_new, 0, sizeof(t_bendout), 0, A_DEFFLOAT, 0); ! touchout_class = class_new(gensym("touchout"), (t_newmethod)touchout_new, 0, sizeof(t_touchout), 0, A_DEFFLOAT, 0); class_addfloat(pgmout_class, pgmout_float); class_sethelpsymbol(pgmout_class, gensym("midi")); class_addfloat(bendout_class, bendout_float); class_sethelpsymbol(bendout_class, gensym("midi")); --- 2654,2660 ---- } static void mido2_setup() { ! pgmout_class = class_new2("pgmout", pgmout_new, 0, sizeof(t_pgmout), 0,"F"); ! bendout_class = class_new2("bendout", bendout_new, 0, sizeof(t_bendout), 0,"F"); ! touchout_class = class_new2("touchout", touchout_new, 0, sizeof(t_touchout), 0,"F"); class_addfloat(pgmout_class, pgmout_float); class_sethelpsymbol(pgmout_class, gensym("midi")); class_addfloat(bendout_class, bendout_float); class_sethelpsymbol(bendout_class, gensym("midi")); *************** *** 2702,2707 **** } static void polytouchout_setup() { ! polytouchout_class = class_new(gensym("polytouchout"), (t_newmethod)polytouchout_new, 0, ! sizeof(t_polytouchout), 0, A_DEFFLOAT, 0); class_addfloat(polytouchout_class, polytouchout_float); class_sethelpsymbol(polytouchout_class, gensym("midi")); --- 2680,2684 ---- } static void polytouchout_setup() { ! polytouchout_class = class_new2("polytouchout",polytouchout_new,0,sizeof(t_polytouchout),0,"F"); class_addfloat(polytouchout_class, polytouchout_float); class_sethelpsymbol(polytouchout_class, gensym("midi")); *************** *** 2780,2785 **** } static void makenote_setup() { ! makenote_class = class_new(gensym("makenote"), (t_newmethod)makenote_new, (t_method)makenote_clear, ! sizeof(t_makenote), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(makenote_class, makenote_float); class_addmethod2(makenote_class, makenote_stop, "stop",""); --- 2757,2761 ---- } static void makenote_setup() { ! makenote_class = class_new2("makenote",makenote_new,makenote_clear,sizeof(t_makenote),0,"FF"); class_addfloat(makenote_class, makenote_float); class_addmethod2(makenote_class, makenote_stop, "stop",""); *************** *** 2806,2811 **** } static void stripnote_setup() { ! stripnote_class = class_new(gensym("stripnote"), ! (t_newmethod)stripnote_new, 0, sizeof(t_stripnote), 0, 0); class_addfloat(stripnote_class, stripnote_float); } --- 2782,2786 ---- } static void stripnote_setup() { ! stripnote_class = class_new2("stripnote",stripnote_new,0,sizeof(t_stripnote),0,""); class_addfloat(stripnote_class, stripnote_float); } *************** *** 2902,2907 **** static void poly_free(t_poly *x) {freebytes(x->vec, x->n * sizeof (*x->vec));} static void poly_setup() { ! poly_class = class_new(gensym("poly"), (t_newmethod)poly_new, (t_method)poly_free, ! sizeof(t_poly), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(poly_class, poly_float); class_addmethod2(poly_class, poly_stop, "stop",""); --- 2877,2881 ---- static void poly_free(t_poly *x) {freebytes(x->vec, x->n * sizeof (*x->vec));} static void poly_setup() { ! poly_class = class_new2("poly",poly_new,poly_free,sizeof(t_poly),0,"FF"); class_addfloat(poly_class, poly_float); class_addmethod2(poly_class, poly_stop, "stop",""); *************** *** 2968,2972 **** } static void bag_setup() { ! bag_class = class_new(gensym("bag"), (t_newmethod)bag_new, (t_method)bag_clear, sizeof(t_bag), 0, 0); class_addfloat(bag_class, bag_float); class_addmethod2(bag_class,bag_flush,"flush",""); --- 2942,2946 ---- } static void bag_setup() { ! bag_class = class_new2("bag",bag_new,bag_clear,sizeof(t_bag),0,""); class_addfloat(bag_class, bag_float); class_addmethod2(bag_class,bag_flush,"flush",""); *************** *** 3003,3009 **** } static void delay_setup() { ! delay_class = class_new(gensym("delay"), (t_newmethod)delay_new, ! (t_method)delay_free, sizeof(t_delay), 0, A_DEFFLOAT, 0); ! class_addcreator((t_newmethod)delay_new, gensym("del"), A_DEFFLOAT, 0); class_addbang(delay_class, delay_bang); class_addmethod2(delay_class,delay_stop,"stop",""); --- 2977,2982 ---- } static void delay_setup() { ! delay_class = class_new2("delay",delay_new,delay_free,sizeof(t_delay),0,"F"); ! class_addcreator2("del",delay_new,"F"); class_addbang(delay_class, delay_bang); class_addmethod2(delay_class,delay_stop,"stop",""); *************** *** 3041,3046 **** } static void metro_setup() { ! metro_class = class_new(gensym("metro"), (t_newmethod)metro_new, ! (t_method)metro_free, sizeof(t_metro), 0, A_DEFFLOAT, 0); class_addbang(metro_class, metro_bang); class_addmethod2(metro_class,metro_stop,"stop",""); --- 3014,3018 ---- } static void metro_setup() { ! metro_class = class_new2("metro",metro_new,metro_free,sizeof(t_metro),0,"F"); class_addbang(metro_class, metro_bang); class_addmethod2(metro_class,metro_stop,"stop",""); *************** *** 3122,3127 **** } static void line_setup() { ! line_class = class_new(gensym("line"), (t_newmethod)line_new, ! (t_method)line_free, sizeof(t_line), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addmethod2(line_class,line_ft1,"ft1","f"); class_addmethod2(line_class,line_stop,"stop",""); --- 3094,3098 ---- } static void line_setup() { ! line_class = class_new2("line",line_new,line_free,sizeof(t_line),0,"FF"); class_addmethod2(line_class,line_ft1,"ft1","f"); class_addmethod2(line_class,line_stop,"stop",""); *************** *** 3149,3153 **** } static void timer_setup() { ! timer_class = class_new(gensym("timer"), (t_newmethod)timer_new, 0, sizeof(t_timer), 0, A_DEFFLOAT, 0); class_addbang(timer_class, timer_bang); class_addmethod2(timer_class,timer_bang2,"bang2",""); --- 3120,3124 ---- } static void timer_setup() { ! timer_class = class_new2("timer",timer_new,0,sizeof(t_timer),0,"F"); class_addbang(timer_class, timer_bang); class_addmethod2(timer_class,timer_bang2,"bang2",""); *************** *** 3317,3321 **** } static void pipe_setup() { ! pipe_class = class_new(gensym("pipe"), (t_newmethod)pipe_new, (t_method)pipe_clear, sizeof(t_pipe), 0, A_GIMME, 0); class_addlist(pipe_class, pipe_list); class_addmethod2(pipe_class,pipe_flush,"flush",""); --- 3288,3292 ---- } static void pipe_setup() { ! pipe_class = class_new2("pipe",pipe_new,pipe_clear,sizeof(t_pipe),0,"*"); class_addlist(pipe_class, pipe_list); class_addmethod2(pipe_class,pipe_flush,"flush",""); *************** *** 3361,3365 **** value_setup();
! qlist_class = class_new(gensym("qlist"), (t_newmethod)qlist_new, (t_method)qlist_free, sizeof(t_qlist), 0, 0); class_addmethod2(qlist_class,qlist_rewind, "rewind",""); class_addmethod2(qlist_class,qlist_next, "next","F"); --- 3332,3336 ---- value_setup();
! qlist_class = class_new2("qlist",qlist_new,qlist_free,sizeof(t_qlist),0,""); class_addmethod2(qlist_class,qlist_rewind, "rewind",""); class_addmethod2(qlist_class,qlist_next, "next","F"); *************** *** 3375,3380 **** class_addbang(qlist_class, qlist_bang);
! textfile_class = class_new(gensym("textfile"), (t_newmethod)textfile_new, ! (t_method)textfile_free, sizeof(t_textfile), 0, 0); class_addmethod2(textfile_class,textfile_rewind, "rewind",""); class_addmethod2(textfile_class,qlist_set, "set","*"); --- 3346,3350 ---- class_addbang(qlist_class, qlist_bang);
! textfile_class = class_new2("textfile",textfile_new,textfile_free,sizeof(t_textfile),0,""); class_addmethod2(textfile_class,textfile_rewind, "rewind",""); class_addmethod2(textfile_class,qlist_set, "set","*"); *************** *** 3399,3403 **** list_trim_setup(); list_length_setup(); ! class_addcreator((t_newmethod)list_new, &s_list, A_GIMME, 0); arithmetic_setup(); midi_setup(); --- 3369,3373 ---- list_trim_setup(); list_length_setup(); ! class_addcreator2("list",list_new,"*"); arithmetic_setup(); midi_setup();