Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16807
Modified Files: Tag: desiredata builtins.c Log Message: whatever
Index: builtins.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/builtins.c,v retrieving revision 1.1.2.24 retrieving revision 1.1.2.25 diff -C2 -d -r1.1.2.24 -r1.1.2.25 *** builtins.c 30 Jun 2007 05:57:28 -0000 1.1.2.24 --- builtins.c 9 Jul 2007 17:42:51 -0000 1.1.2.25 *************** *** 3074,3077 **** --- 3074,3080 ---- }
+ /* ---------------------------------------------------------------- */ + /* new desiredata classes are below this point. */ + /* warning: [unpost] is not reentrant yet. */ static t_class *unpost_class; *************** *** 3118,3126 **** }
! static void unpost_setup() { unpost_class = class_new2("unpost",unpost_new,0,sizeof(t_unpost),0,""); class_addanything(unpost_class, unpost_anything); }
void builtins_setup() { t_symbol *s = gensym("acoustics.pd"); --- 3121,3164 ---- }
! struct t_unparse : t_object {}; ! static t_class *unparse_class; ! void *unparse_new (t_symbol *s) { ! t_unparse *x = (t_unparse *)pd_new(unparse_class); ! outlet_new(x,&s_symbol); ! } ! void unparse_list (t_unparse *x, t_symbol *s, int argc, t_atom *argv) { ! char buf[MAXPDSTRING]; /* bugger overflow. */ ! int j=0; ! for (int i=0; i<argc; i++) { ! atom_string(argv+i,buf+j,MAXPDSTRING); ! j+=strlen(buf+j); ! buf[j++]=' '; ! } ! buf[j]=0; ! } ! ! struct t_parse : t_object {}; ! static t_class *parse_class; ! void *parse_new (t_symbol *s) { ! t_parse *x = (t_parse *)pd_new(parse_class); ! outlet_new(x,&s_list); ! return x; ! } ! void parse_symbol (t_unpost *x, t_symbol *s) { ! t_binbuf *b = binbuf_new(); ! binbuf_text(b,s->name,s->n); ! outlet_anything(x->outlet,&s_list,b->n,b->v); ! binbuf_free(b); ! } ! static void matju_setup() { unpost_class = class_new2("unpost",unpost_new,0,sizeof(t_unpost),0,""); class_addanything(unpost_class, unpost_anything); + parse_class = class_new2("parse",parse_new,0,sizeof(t_parse),0,""); + class_addsymbol(parse_class, parse_symbol); }
+ /* end of new desiredata classes */ + /* ---------------------------------------------------------------- */ + void builtins_setup() { t_symbol *s = gensym("acoustics.pd"); *************** *** 3161,3189 **** 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"); ! class_addmethod2(qlist_class,qlist_set, "set","*"); ! class_addmethod2(qlist_class,qlist_clear, "clear",""); ! class_addmethod2(qlist_class,qlist_add, "add","*"); ! class_addmethod2(qlist_class,qlist_add2, "add2","*"); ! class_addmethod2(qlist_class,qlist_add, "append","*"); ! class_addmethod2(qlist_class,qlist_read, "read","sS"); ! class_addmethod2(qlist_class,qlist_write, "write","sS"); ! class_addmethod2(qlist_class,qlist_print, "print","S"); ! class_addmethod2(qlist_class,qlist_tempo, "tempo","f"); ! 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","*"); ! class_addmethod2(textfile_class,qlist_clear, "clear",""); ! class_addmethod2(textfile_class,qlist_add, "add","*"); ! class_addmethod2(textfile_class,qlist_add2, "add2","*"); ! class_addmethod2(textfile_class,qlist_add, "append","*"); ! class_addmethod2(textfile_class,qlist_read, "read","sS"); ! class_addmethod2(textfile_class,qlist_write, "write","sS"); ! class_addmethod2(textfile_class,qlist_print, "print","S"); ! class_addbang(textfile_class, textfile_bang); netsend_setup(); netreceive_setup(); --- 3199,3228 ---- value_setup();
! t_class *c; ! qlist_class = c = class_new2("qlist",qlist_new,qlist_free,sizeof(t_qlist),0,""); ! class_addmethod2(c,qlist_rewind, "rewind",""); ! class_addmethod2(c,qlist_next, "next","F"); ! class_addmethod2(c,qlist_set, "set","*"); ! class_addmethod2(c,qlist_clear, "clear",""); ! class_addmethod2(c,qlist_add, "add","*"); ! class_addmethod2(c,qlist_add2, "add2","*"); ! class_addmethod2(c,qlist_add, "append","*"); ! class_addmethod2(c,qlist_read, "read","sS"); ! class_addmethod2(c,qlist_write, "write","sS"); ! class_addmethod2(c,qlist_print, "print","S"); ! class_addmethod2(c,qlist_tempo, "tempo","f"); ! class_addbang(c,qlist_bang);
! textfile_class = c = class_new2("textfile",textfile_new,textfile_free,sizeof(t_textfile),0,""); ! class_addmethod2(c,textfile_rewind, "rewind",""); ! class_addmethod2(c,qlist_set, "set","*"); ! class_addmethod2(c,qlist_clear, "clear",""); ! class_addmethod2(c,qlist_add, "add","*"); ! class_addmethod2(c,qlist_add2, "add2","*"); ! class_addmethod2(c,qlist_add, "append","*"); ! class_addmethod2(c,qlist_read, "read","sS"); ! class_addmethod2(c,qlist_write, "write","sS"); ! class_addmethod2(c,qlist_print, "print","S"); ! class_addbang(c,textfile_bang); netsend_setup(); netreceive_setup(); *************** *** 3198,3201 **** arithmetic_setup(); midi_setup(); ! unpost_setup(); } --- 3237,3240 ---- arithmetic_setup(); midi_setup(); ! matju_setup(); }