Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26250
Modified Files: Tag: desiredata desire.c Log Message: removed useless gensym
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.117 retrieving revision 1.1.2.217.2.118 diff -C2 -d -r1.1.2.217.2.117 -r1.1.2.217.2.118 *** desire.c 9 Jan 2007 17:06:26 -0000 1.1.2.217.2.117 --- desire.c 9 Jan 2007 22:31:15 -0000 1.1.2.217.2.118 *************** *** 1504,1508 **** t_symbol *arraytype; t_template *t = template_findbyname(a->templatesym); ! if (!template_find_field(t, gensym("y"), &yonset, &type, &arraytype) || type != DT_FLOAT) return 0; *yonsetp = yonset; --- 1504,1508 ---- t_symbol *arraytype; t_template *t = template_findbyname(a->templatesym); ! if (!template_find_field(t,&s_y,&yonset,&type,&arraytype) || type != DT_FLOAT) return 0; *yonsetp = yonset; *************** *** 3661,3666 **** static void scalar_getbasexy(t_scalar *x, float *basex, float *basey) { t_template *t = template_findbyname(x->t); ! *basex = template_getfloat(t, gensym("x"), x->v, 0); ! *basey = template_getfloat(t, gensym("y"), x->v, 0); }
--- 3661,3666 ---- static void scalar_getbasexy(t_scalar *x, float *basex, float *basey) { t_template *t = template_findbyname(x->t); ! *basex = template_getfloat(t,&s_x,x->v,0); ! *basey = template_getfloat(t,&s_y,x->v,0); }
*************** *** 3673,3679 **** int xonset, yonset, xtype, ytype, gotx, goty; TEMPLATE_CHECK(z,templatesym,) ! gotx = template_find_field(t, gensym("x"), &xonset, &xtype, &zz); if (gotx && (xtype != DT_FLOAT)) gotx = 0; ! goty = template_find_field(t, gensym("y"), &yonset, &ytype, &zz); if (goty && (ytype != DT_FLOAT)) goty = 0; if (gotx) *(t_float *)(((char *)(x->v)) + xonset) += --- 3673,3679 ---- int xonset, yonset, xtype, ytype, gotx, goty; TEMPLATE_CHECK(z,templatesym,) ! gotx = template_find_field(t,&s_x,&xonset,&xtype,&zz); if (gotx && (xtype != DT_FLOAT)) gotx = 0; ! goty = template_find_field(t,&s_y,&yonset,&ytype,&zz); if (goty && (ytype != DT_FLOAT)) goty = 0; if (gotx) *(t_float *)(((char *)(x->v)) + xonset) += *************** *** 3717,3722 **** float xloc, float yloc, int xpix, int ypix, int shift, int alt, int dbl, int doit) { t_canvas *templatecanvas = template_findcanvas(t); ! float basex = template_getfloat(t, gensym("x"), data, 0); ! float basey = template_getfloat(t, gensym("y"), data, 0); canvas_each(y,templatecanvas) { int hit = pd_getparentwidget(y)->w_parentclickfn(y, owner, data, t, sc, ap, basex+xloc, basey+yloc, --- 3717,3722 ---- float xloc, float yloc, int xpix, int ypix, int shift, int alt, int dbl, int doit) { t_canvas *templatecanvas = template_findcanvas(t); ! float basex = template_getfloat(t,&s_x,data,0); ! float basey = template_getfloat(t,&s_y,data,0); canvas_each(y,templatecanvas) { int hit = pd_getparentwidget(y)->w_parentclickfn(y, owner, data, t, sc, ap, basex+xloc, basey+yloc, *************** *** 4577,4582 **** int defstyle = PLOTSTYLE_POLY; x->canvas = canvas_getcurrent(); ! slot_setfloat_var(&x->xpoints, gensym("x")); ! slot_setfloat_var(&x->ypoints, gensym("y")); slot_setfloat_var(&x->wpoints, gensym("w")); slot_setfloat_const(&x->vis, 1); --- 4577,4582 ---- int defstyle = PLOTSTYLE_POLY; x->canvas = canvas_getcurrent(); ! slot_setfloat_var(&x->xpoints,&s_x); ! slot_setfloat_var(&x->ypoints,&s_y); slot_setfloat_var(&x->wpoints, gensym("w")); slot_setfloat_const(&x->vis, 1); *************** *** 5227,5236 ****
static t_class *get_class; - struct t_getvariable { t_symbol *sym; t_outlet *outlet; }; - struct t_get : t_object { t_symbol *templatesym; --- 5227,5234 ---- *************** *** 5238,5242 **** t_getvariable *variables; }; - static void *get_new(t_symbol *why, int argc, t_atom *argv) { t_get *x = (t_get *)pd_new(get_class); --- 5236,5239 ---- *************** *** 5274,5280 **** }
! static void get_free(t_get *x) { ! free(x->variables); ! }
/* ---------------------- set ----------------------------- */ --- 5271,5275 ---- }
! static void get_free(t_get *x) {free(x->variables);}
/* ---------------------- set ----------------------------- */ *************** *** 5708,5712 **** float fp,fr; int scale; - t_outlet *out_rms, *out_peak; };
--- 5703,5706 ---- *************** *** 7001,7013 ****
static void vu_float0(t_vu *x, t_floatarg v) { ! SET(rms, vuify(x,v)); SET(fr,vu_round(v)); outlet_float(x->out_rms, x->fr); sys_mgui(x,"rms=","i",x->rms);} static void vu_float1(t_vu *x, t_floatarg v) { ! SET(peak,vuify(x,v)); SET(fp,vu_round(v)); outlet_float(x->out_peak,x->fp); sys_mgui(x,"peak=","i",x->peak);}
static void vu_bang(t_vu *x) { ! outlet_float(x->out_peak, x->fp); ! outlet_float(x->out_rms, x->fr); }
--- 6995,7007 ----
static void vu_float0(t_vu *x, t_floatarg v) { ! SET(rms, vuify(x,v)); SET(fr,vu_round(v)); outlet_float(x->out(0), x->fr); sys_mgui(x,"rms=","i",x->rms);} static void vu_float1(t_vu *x, t_floatarg v) { ! SET(peak,vuify(x,v)); SET(fp,vu_round(v)); outlet_float(x->out(1),x->fp); sys_mgui(x,"peak=","i",x->peak);}
static void vu_bang(t_vu *x) { ! outlet_float(x->out(1), x->fp); ! outlet_float(x->out(0), x->fr); }
*************** *** 7036,7041 **** static void *vu_new(t_symbol *s, int argc, t_atom *argv) { t_vu *x = (t_vu *)iemgui_new(vu_class); ! SET(out_rms ,outlet_new(x, &s_float)); ! SET(out_peak,outlet_new(x, &s_float)); SET(bcol,0x000000); SET(h,IEM_VU_STEPS*3); --- 7030,7035 ---- static void *vu_new(t_symbol *s, int argc, t_atom *argv) { t_vu *x = (t_vu *)iemgui_new(vu_class); ! outlet_new(x, &s_float); ! outlet_new(x, &s_float); SET(bcol,0x000000); SET(h,IEM_VU_STEPS*3);