[PD-cvs] pd/src desire.c,1.1.2.105,1.1.2.106

Mathieu Bouchard matju at users.sourceforge.net
Sun Aug 20 02:30:25 CEST 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24895

Modified Files:
      Tag: devel_0_39
	desire.c 
Log Message:
fixed glist_add trace prints, so that it doesn't crash when binbuf is invalid.


Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.105
retrieving revision 1.1.2.106
diff -C2 -d -r1.1.2.105 -r1.1.2.106
*** desire.c	17 Aug 2006 23:14:37 -0000	1.1.2.105
--- desire.c	20 Aug 2006 00:30:23 -0000	1.1.2.106
***************
*** 4945,4953 ****
  void canvas_drawredrect(t_canvas *x, int doit);
  
  void glist_add(t_glist *x, t_gobj *y)
  {
      char *buf; int bufn;
!     binbuf_gettext(((t_text *)y)->te_binbuf,&buf,&bufn);
!     printf("glist_add %p %p [%.*s]\n",x,y,bufn,buf);
      free(buf);
      gobj_subscribe(y,(t_gobj *)x);
--- 4945,4968 ----
  void canvas_drawredrect(t_canvas *x, int doit);
  
+ struct _binbuf
+ {
+     int b_n;
+     t_atom *b_vec;
+ };
+ 
  void glist_add(t_glist *x, t_gobj *y)
  {
      char *buf; int bufn;
!     if (!y->g_pd->c_patchable) {
! 	printf("glist_add %p %p class=%s (non-t_text)\n",x,y,y->g_pd->c_name->s_name);
!     } else {
! 	t_binbuf *bb = ((t_text *)y)->te_binbuf;
! 	if (bb->b_vec) {
! 	    binbuf_gettext(bb,&buf,&bufn);
! 	    printf("glist_add %p %p [%.*s]\n",x,y,bufn,buf);
! 	} else {
! 	    printf("glist_add %p %p class=%s (binbuf without b_vec !)\n",x,y,y->g_pd->c_name->s_name);
! 	}
!     }
      free(buf);
      gobj_subscribe(y,(t_gobj *)x);
***************
*** 11819,11826 ****
  }
  
! static void *bng_new(t_symbol *s, int argc, t_atom *argv)
! {
      t_bng *x = (t_bng *)iemgui_new(bng_class);
-     post("@@@@@@@ bng_new @@@@@@");
      x->ftbreak = 250;
      x->fthold = 50;
--- 11834,11839 ----
  }
  
! static void *bng_new(t_symbol *s, int argc, t_atom *argv) {
      t_bng *x = (t_bng *)iemgui_new(bng_class);
      x->ftbreak = 250;
      x->fthold = 50;





More information about the Pd-cvs mailing list