Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32158
Modified Files: Tag: desiredata m_pd.h desire.c Log Message: te_width is dead
Index: m_pd.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v retrieving revision 1.4.4.11.2.33.2.10 retrieving revision 1.4.4.11.2.33.2.11 diff -C2 -d -r1.4.4.11.2.33.2.10 -r1.4.4.11.2.33.2.11 *** m_pd.h 13 Dec 2006 04:23:56 -0000 1.4.4.11.2.33.2.10 --- m_pd.h 13 Dec 2006 04:38:58 -0000 1.4.4.11.2.33.2.11 *************** *** 245,251 **** t_inlet *inlet; /* linked list of inlets */ short x,y; /* x&y location (within the toplevel) */ ! short width; /* requested width in chars, 0 if auto */ //unsigned int type:2; /* from defs below */ ! short garbage; } t_text, t_object;
--- 245,252 ---- t_inlet *inlet; /* linked list of inlets */ short x,y; /* x&y location (within the toplevel) */ ! //short width; /* requested width in chars, 0 if auto */ ! short unused; /* substitute for width */ //unsigned int type:2; /* from defs below */ ! short garbage; /* replacing a bitfield by this may be a problem on MSVC (?) */ } t_text, t_object;
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.62 retrieving revision 1.1.2.217.2.63 diff -C2 -d -r1.1.2.217.2.62 -r1.1.2.217.2.63 *** desire.c 13 Dec 2006 04:23:56 -0000 1.1.2.217.2.62 --- desire.c 13 Dec 2006 04:38:58 -0000 1.1.2.217.2.63 *************** *** 1359,1364 ****
extern t_class *text_class;
! static int is_dummy (t_text *x) {return x->_class==text_class && x->width==666;}
void canvas_connect(t_canvas *x, t_floatarg ffrom, t_floatarg foutlet, t_floatarg fto,t_floatarg finlet) { --- 1359,1365 ----
extern t_class *text_class; + extern t_class *dummy_class;
! static int is_dummy (t_text *x) {return x->_class==dummy_class;}
void canvas_connect(t_canvas *x, t_floatarg ffrom, t_floatarg foutlet, t_floatarg fto,t_floatarg finlet) { *************** *** 5873,5876 **** --- 5874,5878 ---- static t_symbol *sym_hdl, *sym_vdl, *sym_vradio, *sym_vsl, *sym_vslider;
+ t_class *dummy_class; /*static*/ t_class *text_class; static t_class *mresp_class; *************** *** 5883,5887 **** t_text *x = (t_text *)pd_new(text_class); t_atom at; - x->width = 0; x->binbuf = binbuf_new(); if (argc > 1) { --- 5885,5888 ---- *************** *** 5933,5937 **** /* make a "broken object", that is, one that should appear with a dashed contour. */ if (!x) { ! x = (t_text *)pd_new(text_class); pd_set_newest(x); } --- 5934,5938 ---- /* make a "broken object", that is, one that should appear with a dashed contour. */ if (!x) { ! x = (t_text *)pd_new(dummy_class); pd_set_newest(x); } *************** *** 5939,5943 **** x->x = xpix; x->y = ypix; - x->width = 666; canvas_add(gl,x); if (x->_class== vinlet_class) canvas_resortinlets(canvas_getcanvas(gl)); --- 5940,5943 ---- *************** *** 5955,5959 ****
void canvas_objfor(t_canvas *gl, t_text *x, int argc, t_atom *argv) { - x->width = 0; x->binbuf = binbuf_new(); x->x = atom_getintarg(0, argc, argv); --- 5955,5958 ---- *************** *** 6019,6023 **** x->mresp.mr_pd._class = mresp_class; x->mresp.outlet = outlet_new(x,&s_float); - x->width = 0; /* don't know it yet. */ x->binbuf = binbuf_new(); x->canvas = gl; --- 6018,6021 ---- *************** *** 6044,6047 **** --- 6042,6046 ---- char wherelabel; /* 0-3 for left, right, up, down */ t_symbol *expanded_to; /* snd after $0, $1, ... expansion */ + short width; };
*************** *** 6171,6175 **** t_symbol *sel = g->atom.a_type==A_SYMBOL? gensym("symbolatom") : gensym("floatatom"); binbuf_addv(b, "ssii", gensym("#X"), sel, (t_int)x->x, (t_int)x->y); ! binbuf_addv(b, "iffi", (t_int)x->width, g->min, g->max, (t_int)g->wherelabel); binbuf_addv(b, "sss", gatom_escapit(g->label), gatom_escapit(g->rcv), gatom_escapit(g->snd)); } else if (x->_class == text_class) { --- 6170,6174 ---- t_symbol *sel = g->atom.a_type==A_SYMBOL? gensym("symbolatom") : gensym("floatatom"); binbuf_addv(b, "ssii", gensym("#X"), sel, (t_int)x->x, (t_int)x->y); ! binbuf_addv(b, "iffi", (t_int)g->width, g->min, g->max, (t_int)g->wherelabel); binbuf_addv(b, "sss", gatom_escapit(g->label), gatom_escapit(g->rcv), gatom_escapit(g->snd)); } else if (x->_class == text_class) { *************** *** 6284,6288 **** static void g_text_setup(void) { t_class *c; ! text_class = class_new(gensym("text"), 0, 0, sizeof(t_text), CLASS_NOINLET|CLASS_PATCHABLE, 0);
c = mresp_class = class_new(gensym("messresponder"), 0, 0, --- 6283,6288 ---- static void g_text_setup(void) { t_class *c; ! text_class = class_new(gensym("text"), 0, 0, sizeof(t_text), CLASS_NOINLET|CLASS_PATCHABLE, 0); ! dummy_class = class_new(gensym("dummy"), 0, 0, sizeof(t_text), CLASS_NOINLET|CLASS_PATCHABLE, 0);
c = mresp_class = class_new(gensym("messresponder"), 0, 0,