Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26490
Modified Files: Tag: desiredata m_pd.h desire.c Log Message: te_text 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.8 retrieving revision 1.4.4.11.2.33.2.9 diff -C2 -d -r1.4.4.11.2.33.2.8 -r1.4.4.11.2.33.2.9 *** m_pd.h 13 Dec 2006 02:53:02 -0000 1.4.4.11.2.33.2.8 --- m_pd.h 13 Dec 2006 04:22:48 -0000 1.4.4.11.2.33.2.9 *************** *** 245,249 **** 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 */ } t_text, t_object;
--- 245,250 ---- 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;
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.60 retrieving revision 1.1.2.217.2.61 diff -C2 -d -r1.1.2.217.2.60 -r1.1.2.217.2.61 *** desire.c 13 Dec 2006 03:03:27 -0000 1.1.2.217.2.60 --- desire.c 13 Dec 2006 04:22:48 -0000 1.1.2.217.2.61 *************** *** 518,522 **** int vis=0, font = owner?owner->font:42 /*sys_defaultfont*/; canvas_init(x); - x->type = T_OBJECT; if (!owner) canvas_addtolist(x); /* toplevel vs subwindow */ --- 518,521 ---- *************** *** 591,595 **** t_canvas *x = (t_canvas *)pd_new(canvas_class); canvas_init(x); - x->type = T_OBJECT; if (!*sym->s_name) { char buf[40]; --- 590,593 ---- *************** *** 1074,1078 **** t_object *ob = pd_checkobject(g); t_atom *argv; ! if (!ob || ob->type != T_OBJECT || binbuf_getnatom(ob->binbuf) < 2) continue; argv = binbuf_getvec(ob->binbuf); if (argv[0].a_type != A_SYMBOL || argv[1].a_type != A_SYMBOL || argv[0].a_symbol != s1) --- 1072,1076 ---- t_object *ob = pd_checkobject(g); t_atom *argv; ! if (!ob || /* ob->type != T_OBJECT || */ binbuf_getnatom(ob->binbuf) < 2) continue; argv = binbuf_getvec(ob->binbuf); if (argv[0].a_type != A_SYMBOL || argv[1].a_type != A_SYMBOL || argv[0].a_symbol != s1) *************** *** 1361,1366 **** extern t_class *text_class;
! static int is_dummy (t_text *x) { ! return x->_class==text_class && x->type==T_OBJECT;}
void canvas_connect(t_canvas *x, t_floatarg ffrom, t_floatarg foutlet, t_floatarg fto,t_floatarg finlet) { --- 1359,1363 ---- 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) { *************** *** 5886,5890 **** t_atom at; x->width = 0; - x->type = T_TEXT; x->binbuf = binbuf_new(); if (argc > 1) { --- 5883,5886 ---- *************** *** 5942,5947 **** x->x = xpix; x->y = ypix; ! x->width = 0; ! x->type = T_OBJECT; canvas_add(gl,x); if (x->_class== vinlet_class) canvas_resortinlets(canvas_getcanvas(gl)); --- 5938,5942 ---- x->x = xpix; x->y = ypix; ! x->width = 666; canvas_add(gl,x); if (x->_class== vinlet_class) canvas_resortinlets(canvas_getcanvas(gl)); *************** *** 5960,5964 **** void canvas_objfor(t_canvas *gl, t_text *x, int argc, t_atom *argv) { x->width = 0; - x->type = T_OBJECT; x->binbuf = binbuf_new(); x->x = atom_getintarg(0, argc, argv); --- 5955,5958 ---- *************** *** 6025,6029 **** x->mresp.outlet = outlet_new(x,&s_float); x->width = 0; /* don't know it yet. */ - x->type = T_MESSAGE; x->binbuf = binbuf_new(); x->canvas = gl; --- 6019,6022 ---- *************** *** 6138,6142 **** if (type == A_FLOAT) {x->width = 5; SETFLOAT(&x->atom, 0);} else {x->width = 10; SETSYMBOL(&x->atom, &s_symbol);} - x->type = T_ATOM; x->canvas = gl; SET(min,0); --- 6131,6134 ---- *************** *** 6171,6175 **** t_text *x = (t_text *)z; t_canvas *c = (t_canvas *)z; /* in case it is */ ! if (x->type == T_OBJECT) { if (zgetfn(x,gensym("saveto")) && !(x->_class==canvas_class && (canvas_isabstraction(c) || canvas_istable(c)))) { --- 6163,6179 ---- t_text *x = (t_text *)z; t_canvas *c = (t_canvas *)z; /* in case it is */ ! if (x->_class == message_class) { ! binbuf_addv(b, "ssii", gensym("#X"), gensym("msg"), (t_int)x->x, (t_int)x->y); ! binbuf_addbinbuf(b, x->binbuf); ! } else if (x->_class == gatom_class) { ! t_gatom *g = (t_gatom *)x; ! 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) { ! binbuf_addv(b, "ssii", gensym("#X"), gensym("text"), (t_int)x->x, (t_int)x->y); ! binbuf_addbinbuf(b, x->binbuf); ! } else { if (zgetfn(x,gensym("saveto")) && !(x->_class==canvas_class && (canvas_isabstraction(c) || canvas_istable(c)))) { *************** *** 6184,6199 **** /*bug("binbuf missing at #X restore !!!");*/ } - } else if (x->type == T_MESSAGE) { - binbuf_addv(b, "ssii", gensym("#X"), gensym("msg"), (t_int)x->x, (t_int)x->y); - binbuf_addbinbuf(b, x->binbuf); - } else if (x->type == T_ATOM) { - t_gatom *g = (t_gatom *)x; - 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 { /* comment */ - binbuf_addv(b, "ssii", gensym("#X"), gensym("text"), (t_int)x->x, (t_int)x->y); - binbuf_addbinbuf(b, x->binbuf); } binbuf_addv(b, ";"); --- 6188,6191 ---- *************** *** 6201,6205 ****
static void text_setto(t_text *x, t_canvas *canvas, char *buf, int bufsize) { ! if (x->type != T_OBJECT) { binbuf_text(x->binbuf, buf, bufsize); gobj_changed(x,"binbuf"); --- 6193,6197 ----
static void text_setto(t_text *x, t_canvas *canvas, char *buf, int bufsize) { ! if (x->_class == message_class || x->_class == gatom_class || x->_class == text_class) { binbuf_text(x->binbuf, buf, bufsize); gobj_changed(x,"binbuf"); *************** *** 6558,6562 **** sys_mgui(self,"folder=","s",canvas_getenv(can)->dir); } ! if (x->type == T_ATOM) { t_gatom *g = (t_gatom *)x; if (g->atom.a_type==A_SYMBOL) { --- 6550,6554 ---- sys_mgui(self,"folder=","s",canvas_getenv(can)->dir); } ! if (c==gatom_class) { t_gatom *g = (t_gatom *)x; if (g->atom.a_type==A_SYMBOL) {