Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27259
Modified Files:
Tag: desiredata
desire.c
Log Message:
fixed crash due to debugging messages
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.82
retrieving revision 1.1.2.217.2.83
diff -C2 -d -r1.1.2.217.2.82 -r1.1.2.217.2.83
*** desire.c 19 Dec 2006 19:22:36 -0000 1.1.2.217.2.82
--- desire.c 19 Dec 2006 20:08:40 -0000 1.1.2.217.2.83
***************
*** 212,222 ****
}
! #define DEBUG_QUEUE
void queue_put (t_queue *self, t_pd *stuff) {
#ifdef DEBUG_QUEUE
! t_binbuf *b = ((t_text *)stuff)->binbuf;
! if (b) {char *buf; int bufn; binbuf_gettext(b,&buf,&bufn); printf("queue_put [%.*s]\n",bufn,buf);}
! else {printf("queue_put (%s)\n",stuff->_class->c_name->s_name);}
#endif
if (self->len==QUEUE_SIZE) {bug("queue full"); return;}
--- 212,233 ----
}
! //#define DEBUG_QUEUE
!
! void pd_print (t_pd *self, char *header) {
! if (self->_class->c_patchable) {
! t_binbuf *b = ((t_text *)self)->binbuf;
! if (b) {
! char *buf; int bufn;
! binbuf_gettext(b,&buf,&bufn);
! printf("%s [%.*s]\n",header,bufn,buf);
! return;
! }
! }
! printf("%s (%s)\n",header,self->_class->c_name->s_name);
! }
void queue_put (t_queue *self, t_pd *stuff) {
#ifdef DEBUG_QUEUE
! pd_print(stuff,"queue_put");
#endif
if (self->len==QUEUE_SIZE) {bug("queue full"); return;}
***************
*** 234,245 ****
#ifdef DEBUG_QUEUE
post("queue_get: items in queue: %d",self->len);
! if (stuff) {
! t_binbuf *b = ((t_text *)stuff)->binbuf;
! if (b) {
! char *buf; int bufn;
! binbuf_gettext(b,&buf,&bufn);
! printf("queue_get [%.*s] %p\n",bufn,buf,stuff);
! } else printf("queue_get (%s)\n",stuff->_class->c_name->s_name);
! }
#endif
return stuff;
--- 245,249 ----
#ifdef DEBUG_QUEUE
post("queue_get: items in queue: %d",self->len);
! pd_print(stuff,"queue_get");
#endif
return stuff;