Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17934
Modified Files: Tag: desiredata builtins.c Log Message: finishing previous commit...
Index: builtins.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/builtins.c,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -C2 -d -r1.1.2.8 -r1.1.2.9 *** builtins.c 4 Jan 2007 21:37:27 -0000 1.1.2.8 --- builtins.c 4 Jan 2007 21:45:29 -0000 1.1.2.9 *************** *** 141,146 **** static void openpanel_free(t_openpanel *x) {pd_unbind(x, x->s);} static void openpanel_setup() { ! openpanel_class = class_new(gensym("openpanel"), (t_newmethod)openpanel_new, (t_method)openpanel_free, ! sizeof(t_openpanel), 0, A_DEFSYM, 0); class_addbang(openpanel_class, openpanel_bang); class_addmethod2(openpanel_class, openpanel_path, "path","s"); --- 141,145 ---- static void openpanel_free(t_openpanel *x) {pd_unbind(x, x->s);} static void openpanel_setup() { ! openpanel_class = class_new2("openpanel",openpanel_new,openpanel_free,sizeof(t_openpanel),0,"S"); class_addbang(openpanel_class, openpanel_bang); class_addmethod2(openpanel_class, openpanel_path, "path","s"); *************** *** 174,179 **** static void savepanel_free(t_savepanel *x) {pd_unbind(x, x->s);} static void savepanel_setup() { ! savepanel_class = class_new(gensym("savepanel"), (t_newmethod)savepanel_new, (t_method)savepanel_free, ! sizeof(t_savepanel), 0, A_DEFSYM, 0); class_addbang(savepanel_class, savepanel_bang); class_addmethod2(savepanel_class, openpanel_path, "path","s"); --- 173,177 ---- static void savepanel_free(t_savepanel *x) {pd_unbind(x, x->s);} static void savepanel_setup() { ! savepanel_class = class_new2("savepanel",savepanel_new,savepanel_free,sizeof(t_savepanel),0,"S"); class_addbang(savepanel_class, savepanel_bang); class_addmethod2(savepanel_class, openpanel_path, "path","s"); *************** *** 223,237 ****
static void key_setup() { ! key_class = class_new(gensym("key"), (t_newmethod)key_new, (t_method)key_free, ! sizeof(t_key), CLASS_NOINLET, 0); class_addfloat(key_class, key_float); key_sym = gensym("#key"); ! keyup_class = class_new(gensym("keyup"), (t_newmethod)keyup_new, (t_method)keyup_free, ! sizeof(t_keyup), CLASS_NOINLET, 0); class_addfloat(keyup_class, keyup_float); keyup_sym = gensym("#keyup"); class_sethelpsymbol(keyup_class, gensym("key")); ! keyname_class = class_new(gensym("keyname"), (t_newmethod)keyname_new, (t_method)keyname_free, ! sizeof(t_keyname), CLASS_NOINLET, 0); class_addlist(keyname_class, keyname_list); keyname_sym = gensym("#keyname"); --- 221,232 ----
static void key_setup() { ! key_class = class_new2("key",key_new,key_free,sizeof(t_key),CLASS_NOINLET,""); class_addfloat(key_class, key_float); key_sym = gensym("#key"); ! keyup_class = class_new2("keyup",keyup_new,keyup_free,sizeof(t_keyup),CLASS_NOINLET,""); class_addfloat(keyup_class, keyup_float); keyup_sym = gensym("#keyup"); class_sethelpsymbol(keyup_class, gensym("key")); ! keyname_class = class_new2("keyname",keyname_new,keyname_free,sizeof(t_keyname),CLASS_NOINLET,""); class_addlist(keyname_class, keyname_list); keyname_sym = gensym("#keyname"); *************** *** 332,337 **** static void netsend_free(t_netsend *x) {netsend_disconnect(x);} static void netsend_setup() { ! netsend_class = class_new(gensym("netsend"), (t_newmethod)netsend_new, (t_method)netsend_free, ! sizeof(t_netsend), 0, A_DEFFLOAT, 0); class_addmethod2(netsend_class, netsend_connect, "connect","sf"); class_addmethod2(netsend_class, netsend_disconnect, "disconnect",""); --- 327,331 ---- static void netsend_free(t_netsend *x) {netsend_disconnect(x);} static void netsend_setup() { ! netsend_class = class_new2("netsend",netsend_new,netsend_free,sizeof(t_netsend),0,"F"); class_addmethod2(netsend_class, netsend_connect, "connect","sf"); class_addmethod2(netsend_class, netsend_disconnect, "disconnect",""); *************** *** 454,460 **** } static void netreceive_setup() { ! netreceive_class = class_new(gensym("netreceive"), ! (t_newmethod)netreceive_new, (t_method)netreceive_free, ! sizeof(t_netreceive), CLASS_NOINLET, A_DEFFLOAT, A_DEFFLOAT, A_DEFSYM, 0); } extern "C" t_socketreceiver *netreceive_newest_receiver(t_netreceive *x) {return x->sr;} --- 448,453 ---- } static void netreceive_setup() { ! netreceive_class = class_new2("netreceive",netreceive_new,netreceive_free, ! sizeof(t_netreceive),CLASS_NOINLET,"FFS"); } extern "C" t_socketreceiver *netreceive_newest_receiver(t_netreceive *x) {return x->sr;} *************** *** 763,767 **** } static void alist_setup() { ! alist_class = class_new(gensym("list inlet"), 0, 0, sizeof(t_alist), 0, 0); class_addlist(alist_class, alist_list); class_addanything(alist_class, alist_anything); --- 756,760 ---- } static void alist_setup() { ! alist_class = class_new2("list inlet",0,0,sizeof(t_alist),0,""); class_addlist(alist_class, alist_list); class_addanything(alist_class, alist_anything); *************** *** 801,806 **** static void list_append_free(t_list_append *x) {alist_clear(&x->alist);} static void list_append_setup() { ! list_append_class = class_new(gensym("list append"), ! (t_newmethod)list_append_new, (t_method)list_append_free, sizeof(t_list_append), 0, A_GIMME, 0); class_addlist(list_append_class, list_append_list); class_addanything(list_append_class, list_append_anything); --- 794,798 ---- static void list_append_free(t_list_append *x) {alist_clear(&x->alist);} static void list_append_setup() { ! list_append_class = class_new2("list append",list_append_new,list_append_free,sizeof(t_list_append),0,"*"); class_addlist(list_append_class, list_append_list); class_addanything(list_append_class, list_append_anything); *************** *** 841,846 **** static void list_prepend_free(t_list_prepend *x) {alist_clear(&x->alist);} static void list_prepend_setup() { ! list_prepend_class = class_new(gensym("list prepend"), (t_newmethod)list_prepend_new, ! (t_method)list_prepend_free, sizeof(t_list_prepend), 0, A_GIMME, 0); class_addlist(list_prepend_class, list_prepend_list); class_addanything(list_prepend_class, list_prepend_anything); --- 833,837 ---- static void list_prepend_free(t_list_prepend *x) {alist_clear(&x->alist);} static void list_prepend_setup() { ! list_prepend_class = class_new2("list prepend",list_prepend_new,list_prepend_free,sizeof(t_list_prepend),0,"*"); class_addlist(list_prepend_class, list_prepend_list); class_addanything(list_prepend_class, list_prepend_anything); *************** *** 882,888 **** } static void list_split_setup() { ! list_split_class = class_new(gensym("list split"), ! (t_newmethod)list_split_new, 0, ! sizeof(t_list_split), 0, A_DEFFLOAT, 0); class_addlist(list_split_class, list_split_list); class_addanything(list_split_class, list_split_anything); --- 873,877 ---- } static void list_split_setup() { ! list_split_class = class_new2("list split",list_split_new,0,sizeof(t_list_split),0,"F"); class_addlist(list_split_class, list_split_list); class_addanything(list_split_class, list_split_anything); *************** *** 905,910 **** } static void list_trim_setup() { ! list_trim_class = class_new(gensym("list trim"), (t_newmethod)list_trim_new, 0, ! sizeof(t_list_trim), 0, 0); class_addlist(list_trim_class, list_trim_list); class_addanything(list_trim_class, list_trim_anything); --- 894,898 ---- } static void list_trim_setup() { ! list_trim_class = class_new2("list trim",list_trim_new,0,sizeof(t_list_trim),0,""); class_addlist(list_trim_class, list_trim_list); class_addanything(list_trim_class, list_trim_anything); *************** *** 926,931 **** } static void list_length_setup() { ! list_length_class = class_new(gensym("list length"), (t_newmethod)list_length_new, 0, ! sizeof(t_list_length), 0, 0); class_addlist(list_length_class, list_length_list); class_addanything(list_length_class, list_length_anything); --- 914,918 ---- } static void list_length_setup() { ! list_length_class = class_new2("list length",list_length_new,0,sizeof(t_list_length),0,""); class_addlist(list_length_class, list_length_list); class_addanything(list_length_class, list_length_anything); *************** *** 983,988 **** static void random_seed(t_random *x, float f, float glob) {x->state = (int)f;} static void random_setup() { ! random_class = class_new(gensym("random"), (t_newmethod)random_new, 0, ! sizeof(t_random), 0, A_DEFFLOAT, 0); class_addbang(random_class, random_bang); class_addmethod2(random_class, random_seed,"seed","f"); --- 970,974 ---- static void random_seed(t_random *x, float f, float glob) {x->state = (int)f;} static void random_setup() { ! random_class = class_new2("random",random_new,0,sizeof(t_random),0,"F"); class_addbang(random_class, random_bang); class_addmethod2(random_class, random_seed,"seed","f"); *************** *** 1000,1005 **** } static void loadbang_setup() { ! loadbang_class = class_new(gensym("loadbang"), (t_newmethod)loadbang_new, 0, ! sizeof(t_loadbang), CLASS_NOINLET, 0); class_addmethod2(loadbang_class, loadbang_loadbang, "loadbang",""); } --- 986,990 ---- } static void loadbang_setup() { ! loadbang_class = class_new2("loadbang",loadbang_new,0,sizeof(t_loadbang),CLASS_NOINLET,""); class_addmethod2(loadbang_class, loadbang_loadbang, "loadbang",""); } *************** *** 1021,1027 **** } static void namecanvas_setup() { ! namecanvas_class = class_new(gensym("namecanvas"), ! (t_newmethod)namecanvas_new, (t_method)namecanvas_free, ! sizeof(t_namecanvas), CLASS_NOINLET, A_DEFSYM, 0); }
--- 1006,1010 ---- } static void namecanvas_setup() { ! namecanvas_class = class_new2("namecanvas",namecanvas_new,namecanvas_free,sizeof(t_namecanvas),CLASS_NOINLET,"S"); }
*************** *** 1088,1092 **** } static void cputime_setup() { ! cputime_class = class_new(gensym("cputime"), (t_newmethod)cputime_new, 0, sizeof(t_cputime), 0, 0); class_addbang(cputime_class, cputime_bang); class_addmethod2(cputime_class, cputime_bang2, "bang2",""); --- 1071,1075 ---- } static void cputime_setup() { ! cputime_class = class_new2("cputime",cputime_new,0,sizeof(t_cputime),0,""); class_addbang(cputime_class, cputime_bang); class_addmethod2(cputime_class, cputime_bang2, "bang2",""); *************** *** 1111,1115 **** } static void realtime_setup() { ! realtime_class = class_new(gensym("realtime"), (t_newmethod)realtime_new, 0, sizeof(t_realtime), 0, 0); class_addbang(realtime_class, realtime_bang); class_addmethod2(realtime_class, realtime_bang2, "bang2",""); --- 1094,1098 ---- } static void realtime_setup() { ! realtime_class = class_new2("realtime",realtime_new,0,sizeof(t_realtime),0,""); class_addbang(realtime_class, realtime_bang); class_addmethod2(realtime_class, realtime_bang2, "bang2",""); *************** *** 1142,1146 **** } static void print_setup() { ! print_class = class_new(gensym("print"), (t_newmethod)print_new, 0, sizeof(t_print), 0, A_DEFSYM, 0); class_addbang(print_class, print_bang); class_addfloat(print_class, print_float); --- 1125,1129 ---- } static void print_setup() { ! print_class = class_new2("print",print_new,0,sizeof(t_print),0,"S"); class_addbang(print_class, print_bang); class_addfloat(print_class, print_float); *************** *** 1270,1274 **** t_symbol *s = gensym("operators"); #define BINOPDECL(NAME,SYM) \ ! NAME##_class = class_new(gensym(SYM), (t_newmethod)NAME##_new, 0, sizeof(t_binop), 0, A_DEFFLOAT, 0); \ class_addbang(NAME##_class, NAME##_bang); \ class_addfloat(NAME##_class, (t_method)NAME##_float); \ --- 1253,1257 ---- t_symbol *s = gensym("operators"); #define BINOPDECL(NAME,SYM) \ ! NAME##_class = class_new2(SYM,NAME##_new,0,sizeof(t_binop),0,"F"); \ class_addbang(NAME##_class, NAME##_bang); \ class_addfloat(NAME##_class, (t_method)NAME##_float); \ *************** *** 1306,1310 ****
#define FUNCDECL(NAME,SYM) \ ! NAME##_class = class_new(gensym(SYM), NAME##_new, 0, sizeof(t_object), 0, 0); \ class_addfloat(NAME##_class, (t_method)NAME##_float); \ class_sethelpsymbol(NAME##_class,s); --- 1289,1293 ----
#define FUNCDECL(NAME,SYM) \ ! NAME##_class = class_new2(SYM,NAME##_new,0,sizeof(t_object),0,""); \ class_addfloat(NAME##_class, (t_method)NAME##_float); \ class_sethelpsymbol(NAME##_class,s); *************** *** 1320,1325 **** FUNCDECL(abs,"abs");
! clip_class = class_new(gensym("clip"), (t_newmethod)clip_new, 0, ! sizeof(t_clip), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(clip_class, clip_float); class_addbang(clip_class, clip_bang); --- 1303,1307 ---- FUNCDECL(abs,"abs");
! clip_class = class_new2("clip",clip_new,0,sizeof(t_clip),0,"FF"); class_addfloat(clip_class, clip_float); class_addbang(clip_class, clip_bang); *************** *** 1340,1344 **** static void pdint_float(t_pdint *x, t_float f) {x->f = f; pdint_bang(x);} 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); --- 1322,1326 ---- static void pdint_float(t_pdint *x, t_float f) {x->f = f; pdint_bang(x);} void pdint_setup() { ! pdint_class = class_new2("int",pdint_new,0,sizeof(t_pdint),0,"F"); class_addcreator2("i",pdint_new,"F"); class_addbang(pdint_class, pdint_bang); *************** *** 1362,1366 **** static void pdfloat_float(t_pdfloat *x, t_float f) {x->f=f; pdfloat_bang(x);} 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); --- 1344,1348 ---- static void pdfloat_float(t_pdfloat *x, t_float f) {x->f=f; pdfloat_bang(x);} void pdfloat_setup() { ! pdfloat_class = class_new2("float",pdfloat_new,0,sizeof(t_pdfloat),0,"F"); class_addcreator2("f",pdfloat_new2,"F"); class_addbang(pdfloat_class, pdfloat_bang); *************** *** 1395,1400 **** } void pdsymbol_setup() { ! pdsymbol_class = class_new(gensym("symbol"), (t_newmethod)pdsymbol_new, 0, ! sizeof(t_pdsymbol), 0, A_SYMBOL, 0); class_addbang(pdsymbol_class, pdsymbol_bang); class_addsymbol(pdsymbol_class, pdsymbol_symbol); --- 1377,1381 ---- } void pdsymbol_setup() { ! pdsymbol_class = class_new2("symbol",pdsymbol_new,0,sizeof(t_pdsymbol),0,"S"); class_addbang(pdsymbol_class, pdsymbol_bang); class_addsymbol(pdsymbol_class, pdsymbol_symbol); *************** *** 1414,1418 **** static void bang_bang(t_bang *x) {outlet_bang(x->outlet);} 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); --- 1395,1399 ---- static void bang_bang(t_bang *x) {outlet_bang(x->outlet);} void bang_setup() { ! bang_class = class_new2("bang",bang_new,0,sizeof(t_bang),0,""); class_addcreator2("b",bang_new2,""); class_addbang(bang_class, bang_bang); *************** *** 1448,1452 **** } 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); --- 1429,1433 ---- } static void send_setup() { ! send_class = class_new2("send",send_new,0,sizeof(t_send),0,"S"); class_addcreator2("s",send_new,"S"); class_addbang(send_class, send_bang); *************** *** 1483,1488 **** static void receive_free(t_receive *x) {pd_unbind(x, x->sym);} static void receive_setup() { ! 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); --- 1464,1468 ---- static void receive_free(t_receive *x) {pd_unbind(x, x->sym);} static void receive_setup() { ! receive_class = class_new2("receive",receive_new,receive_free,sizeof(t_receive),CLASS_NOINLET,"S"); class_addcreator2("r",receive_new,"S"); class_addbang(receive_class, receive_bang);