Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25561
Modified Files: Tag: desiredata m_obj.c m_pd.h Log Message: added a wire_save that doesn't really save the wire yet, just the #V.
Index: m_pd.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v retrieving revision 1.4.4.11.2.33.2.6 retrieving revision 1.4.4.11.2.33.2.7 diff -C2 -d -r1.4.4.11.2.33.2.6 -r1.4.4.11.2.33.2.7 *** m_pd.h 8 Dec 2006 05:43:07 -0000 1.4.4.11.2.33.2.6 --- m_pd.h 13 Dec 2006 01:17:38 -0000 1.4.4.11.2.33.2.7 *************** *** 178,181 **** --- 178,182 ---- struct _gobj *master; /* this is the thing that this appendix is an appendage of */ struct _gobj *next; /* big hack. this is the donut hole as cut from _gobj */ + t_canvas *canvas; /* the holder of this object */ /* actual observable */ int nobs; /* number of spies */ *************** *** 192,195 **** --- 193,197 ---- t_appendix *appendix_new (struct _gobj *master); void appendix_free(struct _gobj *self); + void appendix_save (struct _gobj *master, t_binbuf *b);
#ifdef PD_PLUSPLUS_FACE *************** *** 202,207 **** #endif /* g_next is moved out to keep ABI compat */ ! t_appendix *g_adix; /* voyeurism (observable/observer/etc) */ ! #define g_next g_adix->next } t_gobj;
--- 204,210 ---- #endif /* g_next is moved out to keep ABI compat */ ! t_appendix *dix; /* voyeurism (observable/observer/etc) */ ! #define g_adix dix ! #define g_next dix->next } t_gobj;
Index: m_obj.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_obj.c,v retrieving revision 1.2.4.3.2.10.2.2 retrieving revision 1.2.4.3.2.10.2.3 diff -C2 -d -r1.2.4.3.2.10.2.2 -r1.2.4.3.2.10.2.3 *** m_obj.c 8 Dec 2006 04:46:18 -0000 1.2.4.3.2.10.2.2 --- m_obj.c 13 Dec 2006 01:17:38 -0000 1.2.4.3.2.10.2.3 *************** *** 361,367 **** --- 361,375 ---- pd_free((t_pd *)self); } + void wire_save (t_wire *self, t_binbuf *b) { + t_canvas *c = self->oc_gobj.dix->canvas; + /*binbuf_addv(b, "ssiiii;", gensym("#X"), gensym("connect"), + canvas_getindex(c,t.from), t.outlet, canvas_getindex(c,t.to), t.inlet);*/ + appendix_save(self,b); + } + void m_obj_setup(void) { wire_class = class_new(gensym("__wire"), (t_newmethod)wire_new, (t_method)wire_free, sizeof(t_wire), CLASS_GOBJ, A_GIMME, 0); + class_setsavefn(wire_class,(t_savefn)wire_save); }