Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11341
Modified Files: Tag: devel_0_39 desire.c Log Message: .
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.196 retrieving revision 1.1.2.197 diff -C2 -d -r1.1.2.196 -r1.1.2.197 *** desire.c 23 Nov 2006 04:18:06 -0000 1.1.2.196 --- desire.c 23 Nov 2006 04:58:19 -0000 1.1.2.197 *************** *** 873,877 **** static void *subcanvas_new(t_symbol *s) { t_atom a[6]; ! t_canvas *x, *z = canvas_getcurrent(); if (!*s->s_name) s = gensym("/SUBPATCH/"); SETFLOAT(a, 0); --- 873,877 ---- static void *subcanvas_new(t_symbol *s) { t_atom a[6]; ! t_canvas *z = canvas_getcurrent(); if (!*s->s_name) s = gensym("/SUBPATCH/"); SETFLOAT(a, 0); *************** *** 881,885 **** SETSYMBOL(a+4, s); SETFLOAT(a+5, 1); ! x = canvas_new(0, 0, 6, a); x->owner = z; canvas_pop(x, 1); --- 881,885 ---- SETSYMBOL(a+4, s); SETFLOAT(a+5, 1); ! t_canvas *x = canvas_new(0, 0, 6, a); x->owner = z; canvas_pop(x, 1); *************** *** 906,911 **** static void *table_new(t_symbol *s, t_floatarg f) { t_atom a[9]; ! t_canvas *gl; ! t_canvas *x, *z = canvas_getcurrent(); if (s == &s_) { char tabname[255]; --- 906,910 ---- static void *table_new(t_symbol *s, t_floatarg f) { t_atom a[9]; ! t_canvas *z = canvas_getcurrent(); if (s == &s_) { char tabname[255]; *************** *** 921,930 **** SETSYMBOL(a+4, s); SETFLOAT(a+5, 0); ! x = canvas_new(0, 0, 6, a); x->owner = z; /* create a graph for the table */ ! gl = canvas_addcanvas((t_canvas*)x, &s_, 0, -1, (f > 1 ? f-1 : 1), 1, 50, 350, 550, 50); graph_array(gl, s, &s_float, f, 0); ! canvas_pop(x, 0); return x; } --- 920,929 ---- SETSYMBOL(a+4, s); SETFLOAT(a+5, 0); ! t_canvas *x = canvas_new(0, 0, 6, a); x->owner = z; /* create a graph for the table */ ! t_canvas *gl = canvas_addcanvas((t_canvas*)x, &s_, 0, -1, (f > 1 ? f-1 : 1), 1, 50, 350, 550, 50); graph_array(gl, s, &s_float, f, 0); ! canvas_pop(x, 0); return x; } *************** *** 2880,2884 **** int message, nline; t_template *t; - t_symbol *templatesym; t_scalar *sc; int nextmsg = *p_nextmsg; --- 2879,2882 ---- *************** *** 2889,2893 **** return 0; } ! templatesym = canvas_makebindsym(vec[nextmsg].a_w.w_symbol); *p_nextmsg = nextmsg + 1; if (!(t = template_findbyname(templatesym))) { --- 2887,2891 ---- return 0; } ! t_symbol *templatesym = canvas_makebindsym(vec[nextmsg].a_w.w_symbol); *p_nextmsg = nextmsg + 1; if (!(t = template_findbyname(templatesym))) { *************** *** 2926,2932 **** while (1) { t_template *newtemplate, *existtemplate; - t_symbol *templatesym; t_atom *templateargs = (t_atom *)getbytes(0); ! int ntemplateargs = 0, newnargs; nline = canvas_scanbinbuf(natoms, vec, &message, &nextmsg); if (nline < 2) break; --- 2924,2929 ---- while (1) { t_template *newtemplate, *existtemplate; t_atom *templateargs = (t_atom *)getbytes(0); ! int ntemplateargs = 0; nline = canvas_scanbinbuf(natoms, vec, &message, &nextmsg); if (nline < 2) break; *************** *** 2937,2945 **** continue; } ! templatesym = canvas_makebindsym(vec[message + 1].a_w.w_symbol); while (1) { nline = canvas_scanbinbuf(natoms, vec, &message, &nextmsg); if (nline != 2 && nline != 3) break; ! newnargs = ntemplateargs + nline; templateargs = (t_atom *)t_resizebytes(templateargs, sizeof(*templateargs) * ntemplateargs, --- 2934,2942 ---- continue; } ! t_symbol *templatesym = canvas_makebindsym(vec[message + 1].a_w.w_symbol); while (1) { nline = canvas_scanbinbuf(natoms, vec, &message, &nextmsg); if (nline != 2 && nline != 3) break; ! int newnargs = ntemplateargs + nline; templateargs = (t_atom *)t_resizebytes(templateargs, sizeof(*templateargs) * ntemplateargs, *************** *** 3230,3235 **** }
! /* call this recursively to collect all the template names for ! a canvas or for the selection. */ static void canvas_collecttemplatesfor(t_canvas *x, int *ntemplatesp, t_symbol ***templatevecp, int wholething) { --- 3227,3231 ---- }
! /* call this recursively to collect all the template names for a canvas or for the selection. */ static void canvas_collecttemplatesfor(t_canvas *x, int *ntemplatesp, t_symbol ***templatevecp, int wholething) { *************** *** 3857,3864 **** t_scalar *scalar_new(t_canvas *owner, t_symbol *templatesym) { t_scalar *x; - t_template *t; t_gpointer gp; gpointer_init(&gp); ! t = template_findbyname(templatesym); TEMPLATE_CHECK(owner,templatesym,0) x = (t_scalar *)getbytes(sizeof(t_scalar) + (t->n - 1) * sizeof(*x->sc_vec)); --- 3853,3859 ---- t_scalar *scalar_new(t_canvas *owner, t_symbol *templatesym) { t_scalar *x; t_gpointer gp; gpointer_init(&gp); ! t_template *t = template_findbyname(templatesym); TEMPLATE_CHECK(owner,templatesym,0) x = (t_scalar *)getbytes(sizeof(t_scalar) + (t->n - 1) * sizeof(*x->sc_vec)); *************** *** 5544,5552 ****
static void ptrobj_bang(t_ptrobj *x) { - t_symbol *templatesym; int n; t_typedout *to; if (!gpointer_check(&x->gp, 1)) {pd_error(x, "bang: empty pointer"); return;} ! templatesym = gpointer_gettemplatesym(&x->gp); for (n = x->ntypedout, to = x->typedout; n--; to++) if (to->type == templatesym) {outlet_pointer(to->outlet, &x->gp); return;} --- 5539,5546 ----
static void ptrobj_bang(t_ptrobj *x) { int n; t_typedout *to; if (!gpointer_check(&x->gp, 1)) {pd_error(x, "bang: empty pointer"); return;} ! t_symbol *templatesym = gpointer_gettemplatesym(&x->gp); for (n = x->ntypedout, to = x->typedout; n--; to++) if (to->type == templatesym) {outlet_pointer(to->outlet, &x->gp); return;}