[PD-cvs] pd/src desire.c, 1.1.2.217.2.88, 1.1.2.217.2.89 m_binbuf.c, 1.4.4.1.2.8.2.5, 1.4.4.1.2.8.2.6

Mathieu Bouchard matju at users.sourceforge.net
Wed Dec 20 06:03:56 CET 2006


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

Modified Files:
      Tag: desiredata
	desire.c m_binbuf.c 
Log Message:
more code about $0 and also hidetext


Index: m_binbuf.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_binbuf.c,v
retrieving revision 1.4.4.1.2.8.2.5
retrieving revision 1.4.4.1.2.8.2.6
diff -C2 -d -r1.4.4.1.2.8.2.5 -r1.4.4.1.2.8.2.6
*** m_binbuf.c	14 Dec 2006 02:20:35 -0000	1.4.4.1.2.8.2.5
--- m_binbuf.c	20 Dec 2006 05:03:54 -0000	1.4.4.1.2.8.2.6
***************
*** 7,11 ****
   * changed the canvas_restore in "g_canvas.c", so that it might accept $args as well (like "pd $0_test")
   * so you can make multiple & distinguishable templates
!  * 1511:forum::fr::uml�te:2001
   * change marked with    IOhannes
   */
--- 7,11 ----
   * changed the canvas_restore in "g_canvas.c", so that it might accept $args as well (like "pd $0_test")
   * so you can make multiple & distinguishable templates
!  * 1511:forum::für::umläute:2001
   * change marked with    IOhannes
   */
***************
*** 514,521 ****
       */
      substr=strchr(str, '$');
!     if(substr){
!       strncat(buf2, str, (substr-str));
!       str=substr+1;
!     }
  #endif
  
--- 514,521 ----
       */
      substr=strchr(str, '$');
!     if(!substr || substr-str >= MAXPDSTRING) return s;
! 
!     strncat(buf2, str, (substr-str));
!     str=substr+1;
  #endif
  
***************
*** 540,548 ****
  	} else {
  	  strcat(buf2, str);
- 
  	  return gensym(buf2);
  	}
        }
- 
      return (gensym(buf2));
  }
--- 540,546 ----
***************
*** 601,605 ****
  			if (!hash_exists(object_table,target)) {
  				error("%s target is not a currently valid pointer",s->s_name);
! 				return 0;
  			}
  		}
--- 599,603 ----
  			if (!hash_exists(object_table,target)) {
  				error("%s target is not a currently valid pointer",s->s_name);
! 				return;
  			}
  		}

Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.88
retrieving revision 1.1.2.217.2.89
diff -C2 -d -r1.1.2.217.2.88 -r1.1.2.217.2.89
*** desire.c	20 Dec 2006 04:38:07 -0000	1.1.2.217.2.88
--- desire.c	20 Dec 2006 05:03:52 -0000	1.1.2.217.2.89
***************
*** 442,449 ****
      t_symbol *ret;
      char *name = s->s_name;
!     if (*name == '$' && isdigit(name[1])) {
          t_canvasenvironment *env = canvas_getenv(x);
          pd_pushsym(x);
!         ret = binbuf_realizedollsym(gensym(name+1), env->argc, env->argv, 1);
          pd_popsym(x);
      } else ret = s;
--- 442,449 ----
      t_symbol *ret;
      char *name = s->s_name;
!     if (strchr(name,'$')) {
          t_canvasenvironment *env = canvas_getenv(x);
          pd_pushsym(x);
!         ret = binbuf_realizedollsym(s, env->argc, env->argv, 1);
          pd_popsym(x);
      } else ret = s;
***************
*** 790,813 ****
  
  void canvas_restore(t_canvas *x, t_symbol *s, int argc, t_atom *argv) {
-     /* this should be unnecessary, but sometimes the canvas's name gets
-        out of sync with the owning box's argument; this fixes that */
      if (argc > 3) {
          t_atom *ap=argv+3;
          if (ap->a_type == A_SYMBOL) {
-             char *buf=ap->a_symbol->s_name, *bufp;
-             if (*buf == '$' && isdigit(buf[1])) {
-                 for (bufp = buf+2; *bufp; bufp++) if (!isdigit(*bufp)) {
-                     SETDOLLSYM(ap, gensym(buf+1));
-                     goto didit;
-                 }
-                 SETDOLLAR(ap, atoi(buf+1));
-             didit: ;
-             }
-         }
-         if (ap->a_type == A_DOLLSYM) {
              t_canvasenvironment *e = canvas_getenv(canvas_getcurrent());
              canvas_rename(x, binbuf_realizedollsym(ap->a_symbol, e->argc, e->argv, 1), 0);
!         } else if (ap->a_type == A_SYMBOL)
!           canvas_rename(x, argv[3].a_symbol, 0);
      }
      canvas_pop(x, x->willvis);
--- 790,799 ----
  
  void canvas_restore(t_canvas *x, t_symbol *s, int argc, t_atom *argv) {
      if (argc > 3) {
          t_atom *ap=argv+3;
          if (ap->a_type == A_SYMBOL) {
              t_canvasenvironment *e = canvas_getenv(canvas_getcurrent());
              canvas_rename(x, binbuf_realizedollsym(ap->a_symbol, e->argc, e->argv, 1), 0);
!         }
      }
      canvas_pop(x, x->willvis);
***************
*** 948,956 ****
  /* return true if the "canvas" object should be treated as a text
     object.  This is true for abstractions but also for "table"s... */
  static int canvas_showtext(t_canvas *x) {
      t_atom *argv = x->binbuf? binbuf_getvec(  x->binbuf) : 0;
      int     argc = x->binbuf? binbuf_getnatom(x->binbuf) : 0;
      int isarray = argc && argv[0].a_type == A_SYMBOL && argv[0].a_symbol == gensym("graph");
!     return !isarray;
  }
  
--- 934,943 ----
  /* return true if the "canvas" object should be treated as a text
     object.  This is true for abstractions but also for "table"s... */
+ /* JMZ: add a flag to gop-abstractions to hide the title */
  static int canvas_showtext(t_canvas *x) {
      t_atom *argv = x->binbuf? binbuf_getvec(  x->binbuf) : 0;
      int     argc = x->binbuf? binbuf_getnatom(x->binbuf) : 0;
      int isarray = argc && argv[0].a_type == A_SYMBOL && argv[0].a_symbol == gensym("graph");
!     return x->hidetext ? 0 : !isarray;
  }
  





More information about the Pd-cvs mailing list