Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20548
Modified Files: Tag: desiredata builtins.c Log Message: added [tracecall]
Index: builtins.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/builtins.c,v retrieving revision 1.1.2.28 retrieving revision 1.1.2.29 diff -C2 -d -r1.1.2.28 -r1.1.2.29 *** builtins.c 11 Jul 2007 19:56:55 -0000 1.1.2.28 --- builtins.c 15 Jul 2007 05:39:51 -0000 1.1.2.29 *************** *** 3139,3142 **** --- 3139,3160 ---- binbuf_free(b); } + + struct t_tracecall : t_object {}; + static t_class *tracecall_class; + void *tracecall_new (t_symbol *s) { + t_tracecall *x = (t_tracecall *)pd_new(tracecall_class); + outlet_new(x,&s_list); + return x; + } + void tracecall_anything (t_tracecall *x, t_symbol *dummy, int dum, t_atom *my) { + t_atom a[2]; + for (int i=pd_stackn-1; i>=0; i--) { + SETSYMBOL( &a[0],pd_stack[i].self->_class->name); + SETSYMBOL( &a[1],pd_stack[i].s); + //SETPOINTER(&a[2],pd_stack[i].self); + outlet_list(x->outlet,&s_list,2,a); + } + } + static void matju_setup() { unpost_class = class_new2("unpost",unpost_new,0,sizeof(t_unpost),0,""); *************** *** 3144,3147 **** --- 3162,3167 ---- parse_class = class_new2("parse",parse_new,0,sizeof(t_parse),0,""); class_addsymbol(parse_class, parse_symbol); + tracecall_class = class_new2("tracecall",tracecall_new,0,sizeof(t_tracecall),0,""); + class_addanything(tracecall_class,tracecall_anything); }