[PD-cvs] pd/src kernel.c, 1.1.2.65, 1.1.2.66 desire.c, 1.1.2.217.2.169, 1.1.2.217.2.170 d_ugen.c, 1.3.4.1.2.5.2.14, 1.3.4.1.2.5.2.15

Mathieu Bouchard matju at users.sourceforge.net
Thu Jul 19 19:54:55 CEST 2007


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

Modified Files:
      Tag: desiredata
	kernel.c desire.c d_ugen.c 
Log Message:
cleanup


Index: kernel.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v
retrieving revision 1.1.2.65
retrieving revision 1.1.2.66
diff -C2 -d -r1.1.2.65 -r1.1.2.66
*** kernel.c	19 Jul 2007 05:13:21 -0000	1.1.2.65
--- kernel.c	19 Jul 2007 17:54:50 -0000	1.1.2.66
***************
*** 1210,1214 ****
  #ifndef NEWHASH
  #define HASHSIZE 1024
! #else 
  #define HASHSIZE 65536
  #define HASHFACTOR 40503 /* donald knuth: (sqrt(5) - 1)/2*pow(2,16) */
--- 1210,1214 ----
  #ifndef NEWHASH
  #define HASHSIZE 1024
! #else
  #define HASHSIZE 65536
  #define HASHFACTOR 40503 /* donald knuth: (sqrt(5) - 1)/2*pow(2,16) */
***************
*** 2103,2108 ****
      int fd = binbuf_doopen(namebuf, 0);
      if (fd < 0) {error("open: %s: %s",namebuf,strerror(errno)); return 1;}
!     if ((length = lseek(fd, 0, SEEK_END)) < 0 || lseek(fd, 0, SEEK_SET) < 0 
!         || !(buf = (char *)malloc(length))) {
          error("lseek: %s: %s",namebuf,strerror(errno));
          close(fd);
--- 2103,2107 ----
      int fd = binbuf_doopen(namebuf, 0);
      if (fd < 0) {error("open: %s: %s",namebuf,strerror(errno)); return 1;}
!     if ((length = lseek(fd, 0, SEEK_END)) < 0 || lseek(fd, 0, SEEK_SET) < 0 || !(buf = (char *)malloc(length))) {
          error("lseek: %s: %s",namebuf,strerror(errno));
          close(fd);
***************
*** 2207,2220 ****
  }
  
! /* The following routine attempts to convert from max to pd or back.  The
! max to pd direction is working OK but you will need to make lots of 
! abstractions for objects like "gate" which don't exist in Pd.  conversion
! from Pd to Max hasn't been tested for patches with subpatches yet!  */
  
  #define MAXSTACK 1000
! 
! #define ISSYMBOL(a, b) ((a)->a_type == A_SYMBOL && \
!     !strcmp((a)->a_symbol->name, (b)))
! 
  #define GETF(i) atom_getfloatarg(i,natom,nextmess)
  static t_binbuf *binbuf_convert(t_binbuf *oldb, int maxtopd) {
--- 2206,2215 ----
  }
  
! /* The following routine attempts to convert from max to pd or back.  The max to pd direction is working OK
!    but you will need to make lots of abstractions for objects like "gate" which don't exist in Pd. Conversion
!    from Pd to Max hasn't been tested for patches with subpatches yet!  */
  
  #define MAXSTACK 1000
! #define ISSYMBOL(a, b) ((a)->a_type == A_SYMBOL && !strcmp((a)->a_symbol->name, (b)))
  #define GETF(i) atom_getfloatarg(i,natom,nextmess)
  static t_binbuf *binbuf_convert(t_binbuf *oldb, int maxtopd) {
***************
*** 2326,2330 ****
                      nobj++;
                  } else if (!strcmp(second, "user")) {
!                     binbuf_addv(newb,"ttffs;","#X","obj", GETF(3), GETF(4), atom_getsymbolarg(2, natom, nextmess)); 
                      nobj++;
                  } else if (!strcmp(second, "connect") || !strcmp(second, "fasten")) {
--- 2321,2325 ----
                      nobj++;
                  } else if (!strcmp(second, "user")) {
!                     binbuf_addv(newb,"ttffs;","#X","obj", GETF(3), GETF(4), atom_getsymbolarg(2, natom, nextmess));
                      nobj++;
                  } else if (!strcmp(second, "connect") || !strcmp(second, "fasten")) {
***************
*** 2361,2365 ****
                      else if (classname == gensym("bng"))      binbuf_addv(newb,"ttffff;","#P","button", GETF(2), GETF(3), GETF(5), 0.);
                      else if (classname == gensym("tgl"))      binbuf_addv(newb,"ttffff;","#P","toggle", GETF(2), GETF(3), GETF(5), 0.);
!                     else if (classname == gensym("vsl"))      binbuf_addv(newb,"ttffffff;","#P","slider", 
                      	GETF(2), GETF(3), GETF(5), GETF(6), (GETF(8)-GETF(7)) / (GETF(6)==1?1:GETF(6)-1), GETF(7));
                      else {
--- 2356,2360 ----
                      else if (classname == gensym("bng"))      binbuf_addv(newb,"ttffff;","#P","button", GETF(2), GETF(3), GETF(5), 0.);
                      else if (classname == gensym("tgl"))      binbuf_addv(newb,"ttffff;","#P","toggle", GETF(2), GETF(3), GETF(5), 0.);
!                     else if (classname == gensym("vsl"))      binbuf_addv(newb,"ttffffff;","#P","slider",
                      	GETF(2), GETF(3), GETF(5), GETF(6), (GETF(8)-GETF(7)) / (GETF(6)==1?1:GETF(6)-1), GETF(7));
                      else {

Index: d_ugen.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_ugen.c,v
retrieving revision 1.3.4.1.2.5.2.14
retrieving revision 1.3.4.1.2.5.2.15
diff -C2 -d -r1.3.4.1.2.5.2.14 -r1.3.4.1.2.5.2.15
*** d_ugen.c	19 Jul 2007 05:13:21 -0000	1.3.4.1.2.5.2.14
--- d_ugen.c	19 Jul 2007 17:54:53 -0000	1.3.4.1.2.5.2.15
***************
*** 12,24 ****
  */
  
! /* hacked to run subpatches with different samplerates
!  * only samplerates that are a power_of_2-multiple of the 
!  *
!  * mfg.gfd.uil
!  * IOhannes
!  *
!  * edited lines are marked with "IOhannes"
!  *
!  */
  
  #define PD_PLUSPLUS_FACE
--- 12,16 ----
  */
  
! /* hacked to run subpatches with different power-of-2 samplerates - mfg.gfd.uil IOhannes */
  
  #define PD_PLUSPLUS_FACE
***************
*** 26,30 ****
  #include <stdlib.h>
  #include <stdarg.h>
- #define pd_error(a,b...) error(b)
  
  /* T.Grill - include SIMD functionality */
--- 18,21 ----
***************
*** 52,56 ****
      t_float *out = (t_float *)w[1];
      int n = int(w[2]);
!     while (n--) *out++ = 0; 
      return w+3;
  }
--- 43,47 ----
      t_float *out = (t_float *)w[1];
      int n = int(w[2]);
!     while (n--) *out++ = 0;
      return w+3;
  }

Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.169
retrieving revision 1.1.2.217.2.170
diff -C2 -d -r1.1.2.217.2.169 -r1.1.2.217.2.170
*** desire.c	19 Jul 2007 08:14:36 -0000	1.1.2.217.2.169
--- desire.c	19 Jul 2007 17:54:50 -0000	1.1.2.217.2.170
***************
*** 3957,3963 ****
          canvas_redrawallfortemplate(t, 2);
          if (x->next) {
!             /* if we were first on the list, and there are others on
!                the list, make a new template corresponding to the new
!                first-on-list and replace the existing template with it. */
              t_template *z = template_new(&s_, x->next->argc, x->next->argv);
              template_conform(t, z);
--- 3957,3962 ----
          canvas_redrawallfortemplate(t, 2);
          if (x->next) {
!             /* if we were first on the list, and there are others on the list, make a new template corresponding
!                to the new first-on-list and replace the existing template with it. */
              t_template *z = template_new(&s_, x->next->argc, x->next->argv);
              template_conform(t, z);
***************
*** 3996,4007 ****
  };
  
! static void slot_setfloat_const(t_slot *fd, float f) {
!     fd->type = A_FLOAT;  fd->var = 0; fd->f = f;
!     fd->min = fd->max = fd->scrmin = fd->scrmax = fd->quantum = 0;
! }
  static void slot_setsymbol_const(t_slot *fd, t_symbol *s) {
!     fd->type = A_SYMBOL; fd->var = 0; fd->s = s;
!     fd->min = fd->max = fd->scrmin = fd->scrmax = fd->quantum = 0;
! }
  
  static void slot_setfloat_var(t_slot *fd, t_symbol *s) {
--- 3995,4002 ----
  };
  
! static void slot_setfloat_const( t_slot *fd, float f) {
!     fd->type = A_FLOAT;  fd->var = 0; fd->f = f; fd->min = fd->max = fd->scrmin = fd->scrmax = fd->quantum = 0;}
  static void slot_setsymbol_const(t_slot *fd, t_symbol *s) {
!     fd->type = A_SYMBOL; fd->var = 0; fd->s = s; fd->min = fd->max = fd->scrmin = fd->scrmax = fd->quantum = 0;}
  
  static void slot_setfloat_var(t_slot *fd, t_symbol *s) {





More information about the Pd-cvs mailing list