[PD-cvs] pd/src builtins.c,1.1.2.22,1.1.2.23

Mathieu Bouchard matju at users.sourceforge.net
Sat Jun 30 07:03:46 CEST 2007


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

Modified Files:
      Tag: desiredata
	builtins.c 
Log Message:
bugfixes and removed debugging info


Index: builtins.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/builtins.c,v
retrieving revision 1.1.2.22
retrieving revision 1.1.2.23
diff -C2 -d -r1.1.2.22 -r1.1.2.23
*** builtins.c	30 Jun 2007 02:22:29 -0000	1.1.2.22
--- builtins.c	30 Jun 2007 05:03:43 -0000	1.1.2.23
***************
*** 3074,3077 ****
--- 3074,3078 ----
  }
  
+ /* warning: [unpost] is not reentrant yet. */
  static t_class *unpost_class;
  struct t_unpost : t_object {
***************
*** 3095,3110 ****
      char *p;
      for (;;) {
!         p = strchr(b+n,'\n');
          if (!p) break;
- 	fprintf(stderr,"pos=%d len=%d\n",b-current_unpost->buf,p-b);
- 	fprintf(stderr,"data=%.*s\n",p-b,b);
  	t_symbol *s = gensym2(b,p-b);
! 	fprintf(stderr," sym=%.*s\n",s->s_name);
          outlet_symbol(current_unpost->o1,s);
  	b=p+1;
      }
!     char *q = strdup(b); /* well i could use memmove, but i'm not supposed to use strcpy because of overlap */
!     strcpy(current_unpost->buf,q);
!     free(q);
  }
  void unpost_anything (t_unpost *x, t_symbol *s, int argc, t_atom *argv) {
--- 3096,3111 ----
      char *p;
      for (;;) {
!         p = strchr(b,'\n');
          if (!p) break;
  	t_symbol *s = gensym2(b,p-b);
! 	for (int i=0; i<s->n; i++) fprintf(stderr,"%c ",s->name[i]);
          outlet_symbol(current_unpost->o1,s);
  	b=p+1;
      }
!     if (b!=current_unpost->buf) {
!         char *q = strdup(b); /* well i could use memmove, but i'm not supposed to use strcpy because of overlap */
!         strcpy(current_unpost->buf,q);
!         free(q);
!     }
  }
  void unpost_anything (t_unpost *x, t_symbol *s, int argc, t_atom *argv) {





More information about the Pd-cvs mailing list