Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17837
Modified Files: Tag: devel_0_39 desire.c desire.h Log Message: renamed t_linetraverser fields
Index: desire.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.h,v retrieving revision 1.1.2.26 retrieving revision 1.1.2.27 diff -C2 -d -r1.1.2.26 -r1.1.2.27 *** desire.h 7 Sep 2006 00:28:22 -0000 1.1.2.26 --- desire.h 7 Sep 2006 00:38:15 -0000 1.1.2.27 *************** *** 168,176 **** /* structure for traversing all the connections in a glist */ typedef struct _linetraverser { ! t_canvas *tr_x; ! t_object *tr_ob; int tr_nout; int tr_outno; t_outlet *tr_outlet; ! t_object *tr_ob2; int tr_nin; int tr_inno; t_inlet *tr_inlet; ! t_outconnect *tr_nextoc; ! int tr_nextoutno; } t_linetraverser;
--- 168,176 ---- /* structure for traversing all the connections in a glist */ typedef struct _linetraverser { ! t_canvas *canvas; ! t_object *from; int tr_nout; int outlet; t_outlet *outletp; ! t_object *to; int tr_nin; int inlet; t_inlet *inletp; ! t_outconnect *next; ! int nextoutno; } t_linetraverser;
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.153 retrieving revision 1.1.2.154 diff -C2 -d -r1.1.2.153 -r1.1.2.154 *** desire.c 7 Sep 2006 00:28:21 -0000 1.1.2.153 --- desire.c 7 Sep 2006 00:38:14 -0000 1.1.2.154 *************** *** 411,442 ****
void linetraverser_start(t_linetraverser *t, t_canvas *x) { ! t->tr_ob = 0; ! t->tr_x = x; ! t->tr_nextoc = 0; ! t->tr_nextoutno = t->tr_nout = 0; }
t_outconnect *linetraverser_next(t_linetraverser *t) { ! t_outconnect *rval = t->tr_nextoc; int outno; while (!rval) { ! outno = t->tr_nextoutno; while (outno == t->tr_nout) { t_gobj *y; t_object *ob = 0; ! if (!t->tr_ob) y = t->tr_x->list; ! else y = t->tr_ob->ob_g.g_next; for (; y; y = y->g_next) if ((ob = pd_checkobject(&y->g_pd))) break; if (!ob) return 0; ! t->tr_ob = ob; t->tr_nout = obj_noutlets(ob); outno = 0; } ! t->tr_nextoutno = outno + 1; ! rval = obj_starttraverseoutlet(t->tr_ob, &t->tr_outlet, outno); ! t->tr_outno = outno; } ! t->tr_nextoc = obj_nexttraverseoutlet(rval, &t->tr_ob2, &t->tr_inlet, &t->tr_inno); ! t->tr_nin = obj_ninlets(t->tr_ob2); if (!t->tr_nin) bug("linetraverser_next"); return rval; --- 411,442 ----
void linetraverser_start(t_linetraverser *t, t_canvas *x) { ! t->from = 0; ! t->canvas = x; ! t->next = 0; ! t->nextoutno = t->tr_nout = 0; }
t_outconnect *linetraverser_next(t_linetraverser *t) { ! t_outconnect *rval = t->next; int outno; while (!rval) { ! outno = t->nextoutno; while (outno == t->tr_nout) { t_gobj *y; t_object *ob = 0; ! if (!t->from) y = t->canvas->list; ! else y = t->from->ob_g.g_next; for (; y; y = y->g_next) if ((ob = pd_checkobject(&y->g_pd))) break; if (!ob) return 0; ! t->from = ob; t->tr_nout = obj_noutlets(ob); outno = 0; } ! t->nextoutno = outno + 1; ! rval = obj_starttraverseoutlet(t->from, &t->outletp, outno); ! t->outlet = outno; } ! t->next = obj_nexttraverseoutlet(rval, &t->to, &t->inletp, &t->inlet); ! t->tr_nin = obj_ninlets(t->to); if (!t->tr_nin) bug("linetraverser_next"); return rval; *************** *** 500,505 **** canvas_setbounds(x, xloc, yloc, xloc + width, yloc + height); x->owner = owner; ! x->name = (*s->s_name ? s : ! (canvas_newfilename ? canvas_newfilename : gensym("Pd"))); if (strcmp(x->name->s_name, "Pd")) pd_bind((t_pd *)x, canvas_makebindsym(x->name)); --- 500,504 ---- canvas_setbounds(x, xloc, yloc, xloc + width, yloc + height); x->owner = owner; ! x->name = *s->s_name ? s : canvas_newfilename ? canvas_newfilename : gensym("Pd"); if (strcmp(x->name->s_name, "Pd")) pd_bind((t_pd *)x, canvas_makebindsym(x->name)); *************** *** 786,792 **** t_linetraverser t; t_outconnect *oc; glist_wire_each(oc,t,x) ! if ((t.tr_ob == text && t.tr_outlet == outp) || ! (t.tr_ob2 == text && t.tr_inlet == inp)) ! obj_disconnect(t.tr_ob, t.tr_outno, t.tr_ob2, t.tr_inno); }
--- 785,791 ---- t_linetraverser t; t_outconnect *oc; glist_wire_each(oc,t,x) ! if ((t.from == text && t.outletp == outp) || ! (t.to == text && t.inletp == inp)) ! obj_disconnect(t.from, t.outlet, t.to, t.inlet); }
*************** *** 794,799 **** t_linetraverser t; t_outconnect *oc; glist_wire_each(oc,t,x) ! if (t.tr_ob == text || t.tr_ob2 == text) ! obj_disconnect(t.tr_ob, t.tr_outno, t.tr_ob2, t.tr_inno); }
--- 793,798 ---- t_linetraverser t; t_outconnect *oc; glist_wire_each(oc,t,x) ! if (t.from == text || t.to == text) ! obj_disconnect(t.from, t.outlet, t.to, t.inlet); }
*************** *** 1034,1039 **** /* ... and all dsp interconnections */ glist_wire_each(oc,t,x) ! if (obj_issignaloutlet(t.tr_ob, t.tr_outno)) ! ugen_connect(dc, t.tr_ob, t.tr_outno, t.tr_ob2, t.tr_inno);
/* finally, sort them and add them to the DSP chain */ --- 1033,1038 ---- /* ... and all dsp interconnections */ glist_wire_each(oc,t,x) ! if (obj_issignaloutlet(t.from, t.outlet)) ! ugen_connect(dc, t.from, t.outlet, t.to, t.inlet);
/* finally, sort them and add them to the DSP chain */ *************** *** 1204,1213 **** t_linetraverser t; t_outconnect *oc; glist_wire_each(oc,t,x) { ! int from = canvas_getindex(x, &t.tr_ob->ob_g); ! int to = canvas_getindex(x, &t.tr_ob2->ob_g); ! if (from == from_ && t.tr_outno == outlet && ! to == to_ && t.tr_inno == inlet) { //sys_mgui(oc,"delete",""); ! obj_disconnect(t.tr_ob, t.tr_outno, t.tr_ob2, t.tr_inno); break; } --- 1203,1212 ---- t_linetraverser t; t_outconnect *oc; glist_wire_each(oc,t,x) { ! int from = canvas_getindex(x, &t.from->ob_g); ! int to = canvas_getindex(x, &t.to->ob_g); ! if (from == from_ && t.outlet == outlet && ! to == to_ && t.inlet == inlet) { //sys_mgui(oc,"delete",""); ! obj_disconnect(t.from, t.outlet, t.to, t.inlet); break; } *************** *** 1337,1342 **** t_linetraverser t; t_outconnect *oc; glist_wire_each(oc,t,x) ! if (t.tr_ob == ob1 && t.tr_outno == n1 && ! t.tr_ob2 == ob2 && t.tr_inno == n2) return 1; return 0; --- 1336,1341 ---- t_linetraverser t; t_outconnect *oc; glist_wire_each(oc,t,x) ! if (t.from == ob1 && t.outlet == n1 && ! t.to == ob2 && t.inlet == n2) return 1; return 0; *************** *** 1468,1479 **** binbuf_clear(b); glist_wire_each(oc,t,x) { ! /*int s1 = glist_isselected(x, &t.tr_ob->ob_g);*/ ! /*int s2 = glist_isselected(x, &t.tr_ob2->ob_g);*/ ! int s1 = o == (t_gobj *)t.tr_ob; ! int s2 = o == (t_gobj *)t.tr_ob2; if (s1 != s2) binbuf_addv(b, "ssiiii;", gensym("#X"), gensym("connect"), ! glist_getindex(x, &t.tr_ob->ob_g), t.tr_outno, ! glist_getindex(x, &t.tr_ob2->ob_g), t.tr_inno); } post("<canvas_stowconnections>"); --- 1467,1478 ---- binbuf_clear(b); glist_wire_each(oc,t,x) { ! /*int s1 = glist_isselected(x, &t.from->ob_g);*/ ! /*int s2 = glist_isselected(x, &t.to->ob_g);*/ ! int s1 = o == (t_gobj *)t.from; ! int s2 = o == (t_gobj *)t.to; if (s1 != s2) binbuf_addv(b, "ssiiii;", gensym("#X"), gensym("connect"), ! glist_getindex(x, &t.from->ob_g), t.outlet, ! glist_getindex(x, &t.to->ob_g), t.inlet); } post("<canvas_stowconnections>"); *************** *** 3583,3589 **** glist_each(y,x) gobj_save(y, b); glist_wire_each(oc,t,x) { ! int from = canvas_getindex(x, &t.tr_ob->ob_g); ! int to = canvas_getindex(x, &t.tr_ob2->ob_g); ! binbuf_addv(b, "ssiiii;", gensym("#X"), gensym("connect"), from, t.tr_outno, to, t.tr_inno); appendix_save((t_gobj *)oc,b); } --- 3582,3588 ---- glist_each(y,x) gobj_save(y, b); glist_wire_each(oc,t,x) { ! int from = canvas_getindex(x, &t.from->ob_g); ! int to = canvas_getindex(x, &t.to->ob_g); ! binbuf_addv(b, "ssiiii;", gensym("#X"), gensym("connect"), from, t.outlet, to, t.inlet); appendix_save((t_gobj *)oc,b); } *************** *** 7723,7728 **** bar=foo; *foo=0; glist_wire_each(oc,t,can) bar+=sprintf(bar,"{%ld %ld %ld %ld} ", ! (long)canvas_getindex(can,(t_gobj *)t.tr_ob), (long)t.tr_outno, ! (long)canvas_getindex(can,(t_gobj *)t.tr_ob2), (long)t.tr_inno); sys_mgui((t_gobj *)self,"wires=","S",foo); sys_mgui(self,"name=","s",can->name); --- 7722,7727 ---- bar=foo; *foo=0; glist_wire_each(oc,t,can) bar+=sprintf(bar,"{%ld %ld %ld %ld} ", ! (long)canvas_getindex(can,(t_gobj *)t.from), (long)t.outlet, ! (long)canvas_getindex(can,(t_gobj *)t.to), (long)t.inlet); sys_mgui((t_gobj *)self,"wires=","S",foo); sys_mgui(self,"name=","s",can->name);