Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29602
Modified Files: Tag: devel_0_39 desire.c Log Message: please help me! cosmic bug in the following code
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.43 retrieving revision 1.1.2.44 diff -C2 -d -r1.1.2.43 -r1.1.2.44 *** desire.c 29 Oct 2005 16:01:06 -0000 1.1.2.43 --- desire.c 29 Oct 2005 17:16:10 -0000 1.1.2.44 *************** *** 25,28 **** --- 25,30 ----
#define L fprintf(stderr,"%s:%d in %s\n",__FILE__,__LINE__,__PRETTY_FUNCTION__); + #define LS fprintf(stderr,"%s:%d in %s (self=%lx\n",__FILE__,__LINE__,__PRETTY_FUNCTION__,(long)self);\ + fprintf(stderr,"class=%s)\n",((t_gobj *)self)->g_pd->c_name->s_name); #define sys_vgui(args...) do { \ fprintf(stderr,"\e[0;1;31m"); \ *************** *** 91,94 **** --- 93,97 ---- for (i=0; i<d->nobs; i++) { t_gobj *obs = d->obs[i]; + fprintf(stderr,"obs=%lx\n",(long)obs); t_notice ice = obs->g_pd->c_notice; if (ice) ice(obs,origin,argc,argv); *************** *** 108,112 ****
t_queue *queue_new (void) { ! t_queue *self = (t_queue *)malloc(sizeof(t_queue)); self->start = self->len = 0; return self; --- 111,115 ----
t_queue *queue_new (void) { ! t_queue *self = (t_queue *)getbytes(sizeof(t_queue)); self->start = self->len = 0; return self; *************** *** 147,154 ****
static t_class *manager_class; ! t_manager *manager;
! void manager_call (void *foo) {L t_manager *self = (t_manager *)foo; while (!queue_empty(self->q)) { t_gobj *o = (t_gobj *)queue_get(self->q); --- 150,158 ----
static t_class *manager_class; ! static t_manager *manager;
! void manager_call (void *foo) { t_manager *self = (t_manager *)foo; + LS while (!queue_empty(self->q)) { t_gobj *o = (t_gobj *)queue_get(self->q); *************** *** 160,165 **** }
! void manager_notice (t_gobj *self_, t_gobj *origin, int argc, t_atom *argv) {L t_manager *self = (t_manager *)self; t_appendix *a = (t_appendix *)origin->g_adix; if (!a->dirtyc) { --- 164,170 ---- }
! void manager_notice (t_gobj *self_, t_gobj *origin, int argc, t_atom *argv) { t_manager *self = (t_manager *)self; + LS t_appendix *a = (t_appendix *)origin->g_adix; if (!a->dirtyc) { *************** *** 170,175 **** }
! t_manager *manager_new (t_symbol *s, int argc, t_atom *argv) {L t_manager *self = (t_manager *)pd_new(manager_class); self->super.g_adix = appendix_new((t_gobj *)self); self->q = queue_new(); --- 175,181 ---- }
! t_manager *manager_new (t_symbol *s, int argc, t_atom *argv) { t_manager *self = (t_manager *)pd_new(manager_class); + LS self->super.g_adix = appendix_new((t_gobj *)self); self->q = queue_new(); *************** *** 179,183 **** }
! void manager_free (t_manager *self) {L clock_free(self->clock); queue_free(self->q); --- 185,190 ---- }
! void manager_free (t_manager *self) { ! LS clock_free(self->clock); queue_free(self->q); *************** *** 13407,13415 **** t_canvas *self = (t_canvas *)x; post("canvas_notice(%p,%p,%d,...): havewindow=%d mapped=%d",x,origin,argc,self->gl_havewindow,self->gl_mapped); ! // if (self->gl_havewindow /* && self->gl_mapped */) { ! // manager_notice(manager,origin,argc,argv); ! // } else { ! gobj_changed3(self,origin,argc,argv); ! // } }
--- 13414,13418 ---- t_canvas *self = (t_canvas *)x; post("canvas_notice(%p,%p,%d,...): havewindow=%d mapped=%d",x,origin,argc,self->gl_havewindow,self->gl_mapped); ! gobj_changed3(self,origin,argc,argv); }
*************** *** 13514,13518 **** void desire_setup(void) { manager_class = class_new(gensym("__manager"), (t_newmethod)manager_new, ! (t_method)manager_free, sizeof(t_manager), CLASS_NOINLET, A_GIMME, 0); class_setnotice(manager_class,manager_notice); manager = manager_new(0,0,0); --- 13517,13521 ---- void desire_setup(void) { manager_class = class_new(gensym("__manager"), (t_newmethod)manager_new, ! (t_method)manager_free, sizeof(t_manager), CLASS_GOBJ, A_GIMME, 0); class_setnotice(manager_class,manager_notice); manager = manager_new(0,0,0);