[PD-cvs] pd/src CHANGELOG.txt, 1.3, 1.4 configure.in, 1.17, 1.18 g_all_guis.c, 1.8, 1.9 g_canvas.c, 1.13, 1.14 g_editor.c, 1.15, 1.16 g_readwrite.c, 1.5, 1.6 g_rtext.c, 1.5, 1.6 g_template.c, 1.14, 1.15 g_text.c, 1.12, 1.13 m_atom.c, 1.3, 1.4 m_binbuf.c, 1.7, 1.8 m_class.c, 1.5, 1.6 makefile.in, 1.10, 1.11 makefile.nt, 1.8, 1.9 notes.txt, 1.25, 1.26 s_audio_pablio.h, 1.2, 1.3 s_audio_paring.c, 1.2, 1.3 s_audio_paring.h, 1.2, 1.3 s_loader.c, 1.8, 1.9 s_main.c, 1.23, 1.24 s_path.c, 1.8, 1.9 s_stuff.h, 1.8, 1.9 u_main.tk, 1.19, 1.20 x_interface.c, 1.2, 1.3

Miller Puckette millerpuckette at users.sourceforge.net
Fri Aug 11 22:09:09 CEST 2006


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

Modified Files:
	CHANGELOG.txt configure.in g_all_guis.c g_canvas.c g_editor.c 
	g_readwrite.c g_rtext.c g_template.c g_text.c m_atom.c 
	m_binbuf.c m_class.c makefile.in makefile.nt notes.txt 
	s_audio_pablio.h s_audio_paring.c s_audio_paring.h s_loader.c 
	s_main.c s_path.c s_stuff.h u_main.tk x_interface.c 
Log Message:
Fixed to compile correctly on macosx 10.3, 10.4 and Windows.



Index: m_binbuf.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_binbuf.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** m_binbuf.c	3 Jun 2006 19:13:07 -0000	1.7
--- m_binbuf.c	11 Aug 2006 20:09:07 -0000	1.8
***************
*** 77,82 ****
                  /* it's an atom other than a comma or semi */
              char c;
!             int floatstate = 0, slash = 0, lastslash = 0,
!                 firstslash = (*textp == '\\');
              bufp = buf;
              do
--- 77,81 ----
                  /* it's an atom other than a comma or semi */
              char c;
!             int floatstate = 0, slash = 0, lastslash = 0, dollar = 0;
              bufp = buf;
              do
***************
*** 143,146 ****
--- 142,148 ----
                      }
                  }
+                 if (!lastslash && c == '$' && (textp != etext && 
+                     textp[0] >= '0' && textp[0] <= '9'))
+                         dollar = 1;
                  if (!slash) bufp++;
              }
***************
*** 152,173 ****
              post("binbuf_text: buf %s", buf);
  #endif
!             if (*buf == '$' && buf[1] >= '0' && buf[1] <= '9' && !firstslash)
              {
!                 for (bufp = buf+2; *bufp; bufp++)
                      if (*bufp < '0' || *bufp > '9')
!                 {
!                     SETDOLLSYM(ap, gensym(buf));
!                     goto didit;
!                 }
!                 SETDOLLAR(ap, atoi(buf+1));
!             didit: ;
!             }
!             else
!             {
!                 if (floatstate == 2 || floatstate == 4 || floatstate == 5 ||
!                     floatstate == 8)
!                         SETFLOAT(ap, atof(buf));
!                 else SETSYMBOL(ap, gensym(buf));
              }
          }
          ap++;
--- 154,176 ----
              post("binbuf_text: buf %s", buf);
  #endif
!             if (floatstate == 2 || floatstate == 4 || floatstate == 5 ||
!                 floatstate == 8)
!                     SETFLOAT(ap, atof(buf));
!                 /* LATER try to figure out how to mix "$" and "\$" correctly;
!                 here, the backslashes were already stripped so we assume all
!                 "$" chars are real dollars.  In fact, we only know at least one
!                 was. */
!             else if (dollar)
              {
!                 if (buf[0] != '$') 
!                     dollar = 0;
!                 for (bufp = buf+1; *bufp; bufp++)
                      if (*bufp < '0' || *bufp > '9')
!                         dollar = 0;
!                 if (dollar)
!                     SETDOLLAR(ap, atoi(buf+1));
!                 else post("dollsym %s", buf), SETDOLLSYM(ap, gensym(buf));
              }
+             else SETSYMBOL(ap, gensym(buf));
          }
          ap++;
***************
*** 353,366 ****
          if (argv->a_type == A_SYMBOL)
          {
!             char *str = argv->a_w.w_symbol->s_name;
              if (!strcmp(str, ";")) SETSEMI(ap);
              else if (!strcmp(str, ",")) SETCOMMA(ap);
!             else if (str[0] == '$' && str[1] >= '0' && str[1] <= '9')
              {
                  int dollsym = 0;
!                 char *str2;
!                 for (str2 = str + 2; *str2; str2++)
                      if (*str2 < '0' || *str2 > '9')
!                         dollsym = 1;
                  if (dollsym)
                      SETDOLLSYM(ap, gensym(str));
--- 356,374 ----
          if (argv->a_type == A_SYMBOL)
          {
!             char *str = argv->a_w.w_symbol->s_name, *str2;
              if (!strcmp(str, ";")) SETSEMI(ap);
              else if (!strcmp(str, ",")) SETCOMMA(ap);
!             else if ((str2 = strchr(str, '$')) && str2[1] >= '0'
!                 & str2[1] <= '9')
              {
                  int dollsym = 0;
!                 if (*str != '$')
!                     dollsym = 1;
!                 else for (str2 = str + 1; *str2; str2++)
                      if (*str2 < '0' || *str2 > '9')
!                 {
!                     dollsym = 1;
!                     break;
!                 }
                  if (dollsym)
                      SETDOLLSYM(ap, gensym(str));
***************
*** 483,502 ****
       */
      substr=strchr(str, '$');
!     if(substr){
!       strncat(buf2, str, (substr-str));
!       str=substr+1;
      }
  #endif
  
      while((next=binbuf_expanddollsym(str, buf, dollarnull, ac, av, tonew))>=0)
!       {
!       /*
!        * JMZ: i am not sure what this means, so i might have broken it
!        * it seems like that if "tonew" is set and the $arg cannot be expanded (or the dollarsym is in reality a A_DOLLAR)
!        * 0 is returned from binbuf_realizedollsym
!        * this happens, when expanding in a message-box, but does not happen when the A_DOLLSYM is the name of a subpatch
!        */
!         if(!tonew&&(0==next)&&(0==*buf)){
!           return 0; /* JMZ: this should mimick the original behaviour */
          }
  
--- 491,514 ----
       */
      substr=strchr(str, '$');
!     if(substr)
!     {
!         strncat(buf2, str, (substr-str));
!         str=substr+1;
      }
  #endif
  
      while((next=binbuf_expanddollsym(str, buf, dollarnull, ac, av, tonew))>=0)
!     {
!         /*
!         * JMZ: i am not sure what this means, so i might have broken it
!         * it seems like that if "tonew" is set and the $arg cannot be expanded
!         * (or the dollarsym is in reality a A_DOLLAR)
!         * 0 is returned from binbuf_realizedollsym
!         * this happens, when expanding in a message-box, but does not happen
!         * when the A_DOLLSYM is the name of a subpatch
!         */
!         if(!tonew&&(0==next)&&(0==*buf))
!         {
!             return 0; /* JMZ: this should mimick the original behaviour */
          }
  
***************
*** 504,516 ****
          str+=next;
          substr=strchr(str, '$');
!         if(substr){
!           strncat(buf2, str, (substr-str));
!           str=substr+1;
!         } else {
!           strcat(buf2, str);
! 
!           return gensym(buf2);
          }
!       }
      return (gensym(buf2));
  }
--- 516,531 ----
          str+=next;
          substr=strchr(str, '$');
!         if(substr)
!         {
!             strncat(buf2, str, (substr-str));
!             str=substr+1;
!         } 
!         else
!         {
!             strcat(buf2, str);
!             goto done;
          }
!     }
! done:
      return (gensym(buf2));
  }

Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** u_main.tk	3 Jun 2006 19:13:07 -0000	1.19
--- u_main.tk	11 Aug 2006 20:09:07 -0000	1.20
***************
*** 1784,1794 ****
  #       puts stderr [concat escape $sym $ret]
          } else {
!             if {[string equal -length 1 $sym "$"]} {
!                 set ret [string replace $sym 0 0 "#"]
! #               puts stderr [concat unescape $sym $ret]
!             } else {
!                 set ret $sym
! #               puts stderr [concat escape $sym "no change"]
!             }
          }
      }
--- 1784,1789 ----
  #       puts stderr [concat escape $sym $ret]
          } else {
!             set ret [string map {"$" "#"} $sym]
! #            puts stderr [concat unescape $sym $ret]
          }
      }
***************
*** 1801,1811 ****
  #       puts stderr [concat unescape $sym $ret]
      } else {
!         if {[string equal -length 1 $sym "#"]} {
!             set ret [string replace $sym 0 0 "$"]
! #           puts stderr [concat unescape $sym $ret]
!         } else {
!             set ret $sym
! #           puts stderr [concat unescape $sym "no change"]
!         }
      }
      concat $ret
--- 1796,1801 ----
  #       puts stderr [concat unescape $sym $ret]
      } else {
!         set ret [string map {"#" "$"} $sym]
! #        puts stderr [concat unescape $sym $ret]
      }
      concat $ret

Index: s_path.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_path.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** s_path.c	31 Dec 2005 20:55:25 -0000	1.8
--- s_path.c	11 Aug 2006 20:09:07 -0000	1.9
***************
*** 13,17 ****
  /* #define DEBUG(x) x */
  #define DEBUG(x)
- void readsf_banana( void);    /* debugging */
  
  #include <stdlib.h>
--- 13,16 ----
***************
*** 85,89 ****
  /* add a single item to a namelist.  If "allowdup" is true, duplicates
  may be added; othewise they're dropped.  */
!   
  t_namelist *namelist_append(t_namelist *listwas, const char *s, int allowdup)
  {
--- 84,88 ----
  /* add a single item to a namelist.  If "allowdup" is true, duplicates
  may be added; othewise they're dropped.  */
! 
  t_namelist *namelist_append(t_namelist *listwas, const char *s, int allowdup)
  {

Index: s_stuff.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_stuff.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** s_stuff.h	31 Dec 2005 20:55:25 -0000	1.8
--- s_stuff.h	11 Aug 2006 20:09:07 -0000	1.9
***************
*** 47,51 ****
  
  /* s_loader.c */
! int sys_load_lib(char *dirname, char *filename, char *altname);
  
  /* s_audio.c */
--- 47,51 ----
  
  /* s_loader.c */
! int sys_load_lib(char *dirname, char *filename);
  
  /* s_audio.c */

Index: CHANGELOG.txt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/CHANGELOG.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CHANGELOG.txt	18 May 2005 04:28:50 -0000	1.3
--- CHANGELOG.txt	11 Aug 2006 20:09:07 -0000	1.4
***************
*** 2,5 ****
--- 2,13 ----
  user appears in the "release notes" instead.
  
+ 0.40.0
+ 
+ 0.39.0
+ 
+ canvas_dspstate and signalinlet_new() exported to m_pd.h
+ 
+ new function verbose() added to m_pd.h 
+ 
  0.38.0
  

Index: g_rtext.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_rtext.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** g_rtext.c	2 Jul 2005 05:03:06 -0000	1.5
--- g_rtext.c	11 Aug 2006 20:09:07 -0000	1.6
***************
*** 313,317 ****
                  s2 < ebuf; s1++, s2++)
                      *s1 = *s2;
!             t_resizebytes(x->x_buf, bufsize, text->te_width);
              bufsize = text->te_width;
              goto done;
--- 313,317 ----
                  s2 < ebuf; s1++, s2++)
                      *s1 = *s2;
!             x->x_buf = t_resizebytes(x->x_buf, bufsize, text->te_width);
              bufsize = text->te_width;
              goto done;
***************
*** 319,323 ****
                  /* give up and bash it to "+" or "-" */
              x->x_buf[0] = (atomp->a_w.w_float < 0 ? '-' : '+');
!             t_resizebytes(x->x_buf, bufsize, 1);
              bufsize = 1;
          }
--- 319,323 ----
                  /* give up and bash it to "+" or "-" */
              x->x_buf[0] = (atomp->a_w.w_float < 0 ? '-' : '+');
!             x->x_buf = t_resizebytes(x->x_buf, bufsize, 1);
              bufsize = 1;
          }
***************
*** 325,329 ****
          {
              x->x_buf[text->te_width - 1] = '>';
!             t_resizebytes(x->x_buf, bufsize, text->te_width);
              bufsize = text->te_width;
          }
--- 325,329 ----
          {
              x->x_buf[text->te_width - 1] = '>';
!             x->x_buf = t_resizebytes(x->x_buf, bufsize, text->te_width);
              bufsize = text->te_width;
          }

Index: m_class.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_class.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** m_class.c	31 Dec 2005 20:55:25 -0000	1.5
--- m_class.c	11 Aug 2006 20:09:07 -0000	1.6
***************
*** 515,554 ****
  int pd_setloadingabstraction(t_symbol *sym);
  
- 
- /* replace everything but [a-zA-Z0-9_] by "0x%x" */
- static char*alternative_classname(char*classname)
- {
-   char *altname=(char*)getbytes(sizeof(char)*MAXPDSTRING);
-   int count=0;
-   int i=0;
-   for(i=0; i<MAXPDSTRING; i++)
-     altname[i]=0;
-   i=0;
-   while(*classname)
-     {
-       char c=*classname;
-       if((c>=48 && c<=57)|| /* [0-9] */
-          (c>=65 && c<=90)|| /* [A-Z] */
-          (c>=97 && c<=122)||/* [a-z] */
-          (c==95)) /* [_] */
-         {
-           altname[i]=c;
-           i++;
-         }
-       else /* a "bad" character */
-         {
-           sprintf(altname+i, "0x%02x", c);
-           i+=4;
-           count++;
-         }
-       classname++;
-     }
-   if(count>0)return altname;
-   /* seems like the given classname is fine as can be */
-   freebytes(altname, sizeof(char)*MAXPDSTRING);
-   return 0;
- }
- 
- 
      /* this routine is called when a new "object" is requested whose class Pd
      doesn't know.  Pd tries to load it as an extern, then as an abstraction. */
--- 515,518 ----
***************
*** 559,567 ****
      int fd;
      char dirbuf[MAXPDSTRING], *nameptr;
-     char *altname=alternative_classname(s->s_name);
      if (tryingalready) return;
      newest = 0;
      class_loadsym = s;
!     if (sys_load_lib(dir->s_name, s->s_name, altname))
      {
          tryingalready = 1;
--- 523,530 ----
      int fd;
      char dirbuf[MAXPDSTRING], *nameptr;
      if (tryingalready) return;
      newest = 0;
      class_loadsym = s;
!     if (sys_load_lib(dir->s_name, s->s_name))
      {
          tryingalready = 1;
***************
*** 574,579 ****
      if ((fd = open_via_path(dir->s_name, s->s_name, ".pd",
          dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0 ||
-         (altname && (fd = open_via_path(dir->s_name, altname, ".pd",
-               dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0) ||
              (fd = open_via_path(dir->s_name, s->s_name, ".pat",
                  dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0)
--- 537,540 ----

Index: g_readwrite.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_readwrite.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** g_readwrite.c	2 Jul 2005 05:03:06 -0000	1.5
--- g_readwrite.c	11 Aug 2006 20:09:07 -0000	1.6
***************
*** 3,10 ****
  * WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */
  
! /* this file reads and writes the "data" portions of a canvas to a file.
! See also canvas_saveto(), etc., in g_editor.c.  The data portion is a
! collection of "scalar" objects.  Routines here can save collections of
! scalars into a file and reload them; also, support is included here for
  */
  
--- 3,13 ----
  * WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */
  
! /* 
! Routines to read and write canvases to files:
! canvas_savetofile() writes a root canvas to a "pd" file.  (Reading "pd" files
! is done simply by passing the contents to the pd message interpreter.)
! Alternatively, the  glist_read() and glist_write() routines read and write
! "data" from and to files (reading reads into an existing canvas), using a
! file format as in the dialog window for data.
  */
  
***************
*** 15,18 ****
--- 18,24 ----
  #include <string.h>
  
+ static t_class *declare_class;
+ static void canvas_savedeclarationsto(t_canvas *x, t_binbuf *b);
+ 
      /* the following routines read "scalars" from a file into a canvas. */
  
***************
*** 567,570 ****
--- 573,582 ----
      if (x->gl_owner && !x->gl_env)
      {
+         /* have to go to original binbuf to find out how we were named. */
+         t_binbuf *bz = binbuf_new();
+         t_symbol *patchsym;
+         binbuf_addbinbuf(bz, x->gl_obj.ob_binbuf);
+         patchsym = atom_getsymbolarg(1, binbuf_getnatom(bz), binbuf_getvec(bz));
+         binbuf_free(bz);
          binbuf_addv(b, "ssiiiisi;", gensym("#N"), gensym("canvas"),
              (int)(x->gl_screenx1),
***************
*** 572,580 ****
              (int)(x->gl_screenx2 - x->gl_screenx1),
              (int)(x->gl_screeny2 - x->gl_screeny1),
!             (*x->gl_name->s_name ? x->gl_name: gensym("(subpatch)")),
              x->gl_mapped);
      }
          /* root or abstraction */
!     else binbuf_addv(b, "ssiiiii;", gensym("#N"), gensym("canvas"),
              (int)(x->gl_screenx1),
              (int)(x->gl_screeny1),
--- 584,594 ----
              (int)(x->gl_screenx2 - x->gl_screenx1),
              (int)(x->gl_screeny2 - x->gl_screeny1),
!             (patchsym != &s_ ? patchsym: gensym("(subpatch)")),
              x->gl_mapped);
      }
          /* root or abstraction */
!     else 
!     {
!         binbuf_addv(b, "ssiiiii;", gensym("#N"), gensym("canvas"),
              (int)(x->gl_screenx1),
              (int)(x->gl_screeny1),
***************
*** 582,586 ****
              (int)(x->gl_screeny2 - x->gl_screeny1),
                  (int)x->gl_font);
! 
      for (y = x->gl_list; y; y = y->g_next)
          gobj_save(y, b);
--- 596,601 ----
              (int)(x->gl_screeny2 - x->gl_screeny1),
                  (int)x->gl_font);
!         canvas_savedeclarationsto(x, b);
!     }
      for (y = x->gl_list; y; y = y->g_next)
          gobj_save(y, b);
***************
*** 715,718 ****
--- 730,790 ----
  }
  
+ /* ------------------------------- declare ------------------------ */
+ 
+ /* put "declare" objects in a patch to tell it about the environment in
+ which objects should be created in this canvas.  This includes directories to
+ search ("-path", "-stdpath") and object libraries to load
+ ("-lib" and "-stdlib").  These must be set before the patch containing
+ the "declare" object is filled in with its contents; so when the patch is
+ saved,  we throw early messages to the canvas to set the environment
+ before any objects are created in it. */
+ 
+ 
+ typedef struct _declare
+ {
+     t_object x_obj;
+     t_canvas *x_canvas;
+     int x_useme;
+ } t_declare;
+ 
+ static void *declare_new(t_symbol *s, int argc, t_atom *argv)
+ {
+     t_declare *x = (t_declare *)pd_new(declare_class);
+     x->x_useme = 1;
+     x->x_canvas = canvas_getcurrent();
+         /* LATER update environment and/or load libraries */
+     return (x);
+ }
+ 
+ static void declare_free(t_declare *x)
+ {
+     x->x_useme = 0;
+         /* LATER update environment */
+ }
+ 
+ static void canvas_savedeclarationsto(t_canvas *x, t_binbuf *b)
+ {
+     t_gobj *y;
+ 
+     for (y = x->gl_list; y; y = y->g_next)
+     {
+         if (pd_class(&y->g_pd) == declare_class)
+         {
+             binbuf_addv(b, "s", gensym("#X"));
+             binbuf_addbinbuf(b, ((t_declare *)y)->x_obj.te_binbuf);
+             binbuf_addv(b, ";");
+         }
+         else if (pd_class(&y->g_pd) == canvas_class)
+             canvas_savedeclarationsto((t_canvas *)y, b);
+     }
+ }
+ 
+ static void canvas_declare(t_canvas *x, t_symbol *s, int argc, t_atom *argv)
+ {
+     startpost("declare:: %s", s->s_name);
+     postatom(argc, argv);
+     endpost();
+ }
+ 
  
  void g_readwrite_setup(void)
***************
*** 728,731 ****
--- 800,805 ----
      class_addmethod(canvas_class, (t_method)canvas_saveto,
          gensym("saveto"), A_CANT, 0);
+     class_addmethod(canvas_class, (t_method)canvas_declare,
+         gensym("declare"), A_GIMME, 0);
  /* ------------------ from the menu ------------------------- */
      class_addmethod(canvas_class, (t_method)canvas_menusave,
***************
*** 733,735 ****
--- 807,813 ----
      class_addmethod(canvas_class, (t_method)canvas_menusaveas,
          gensym("menusaveas"), 0);
+ /*---------------------------- declare ------------------- */
+     declare_class = class_new(gensym("declare"), (t_newmethod)declare_new,
+         (t_method)declare_free, sizeof(t_declare), CLASS_NOINLET, A_GIMME, 0);
+ 
  }

Index: x_interface.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_interface.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** x_interface.c	6 Sep 2004 20:20:36 -0000	1.2
--- x_interface.c	11 Aug 2006 20:09:07 -0000	1.3
***************
*** 42,46 ****
  {
      int i;
-     char buf[80];
      if (argc && argv->a_type != A_SYMBOL) startpost("%s:", x->x_sym->s_name);
      else startpost("%s: %s", x->x_sym->s_name,
--- 42,45 ----
***************
*** 54,58 ****
  {
      int i;
-     char buf[80];
      startpost("%s: %s", x->x_sym->s_name, s->s_name);
      postatom(argc, argv);
--- 53,56 ----

Index: g_template.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_template.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** g_template.c	3 Jun 2006 19:13:07 -0000	1.14
--- g_template.c	11 Aug 2006 20:09:07 -0000	1.15
***************
*** 1635,1640 ****
          &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style,
          &vis, &scalarvis, &xfielddesc, &yfielddesc, &wfielddesc) ||
!             (vis == 0) || 
!             array_getfields(elemtemplatesym, &elemtemplatecanvas,
                  &elemtemplate, &elemsize, xfielddesc, yfielddesc, wfielddesc,
                  &xonset, &yonset, &wonset))
--- 1635,1640 ----
          &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style,
          &vis, &scalarvis, &xfielddesc, &yfielddesc, &wfielddesc) ||
!             ((vis == 0) && tovis) /* FIXME - why is 'tovis' flag necessary? */
!             || array_getfields(elemtemplatesym, &elemtemplatecanvas,
                  &elemtemplate, &elemsize, xfielddesc, yfielddesc, wfielddesc,
                  &xonset, &yonset, &wonset))

Index: m_atom.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_atom.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** m_atom.c	3 Jun 2006 19:13:07 -0000	1.3
--- m_atom.c	11 Aug 2006 20:09:07 -0000	1.4
***************
*** 121,125 ****
          break;
      case A_DOLLSYM:
!         snprintf(buf, bufsize-1, "%s", a->a_w.w_symbol->s_name);
          buf[bufsize-1] = 0;
          break;
--- 121,125 ----
          break;
      case A_DOLLSYM:
!         strncpy(buf, a->a_w.w_symbol->s_name, bufsize);
          buf[bufsize-1] = 0;
          break;

Index: g_all_guis.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_all_guis.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** g_all_guis.c	16 Aug 2005 04:06:28 -0000	1.8
--- g_all_guis.c	11 Aug 2006 20:09:07 -0000	1.9
***************
*** 148,175 ****
  }
  
! t_symbol *iemgui_raute2dollar(t_symbol *s)
  {
!     if (s->s_name[0] == '#')
      {
!         char buf[MAXPDSTRING];
!         strncpy(buf, s->s_name, MAXPDSTRING);
!         buf[MAXPDSTRING-1] = 0;
!         buf[0] = '$';
!         return (gensym(buf));
      }
!     else return (s);
  }
  
! t_symbol *iemgui_dollar2raute(t_symbol *s)
  {
!     if (s->s_name[0] == '$')
      {
!         char buf[MAXPDSTRING];
!         strncpy(buf, s->s_name, MAXPDSTRING);
!         buf[MAXPDSTRING-1] = 0;
!         buf[0] = '#';
!         return (gensym(buf));
      }
!     else return (s);
  }
  
--- 148,179 ----
  }
  
! t_symbol *iemgui_dollar2raute(t_symbol *s)
  {
!     char buf[MAXPDSTRING+1], *s1, *s2;
!     if (strlen(s->s_name) >= MAXPDSTRING)
!         return (s);
!     for (s1 = s->s_name, s2 = buf; ; s1++, s2++)
      {
!         if (*s1 == '$')
!             *s2 = '#';
!         else if (!(*s2 = *s1))
!             break;
      }
!     return(gensym(buf));
  }
  
! t_symbol *iemgui_raute2dollar(t_symbol *s)
  {
!     char buf[MAXPDSTRING+1], *s1, *s2;
!     if (strlen(s->s_name) >= MAXPDSTRING)
!         return (s);
!     for (s1 = s->s_name, s2 = buf; ; s1++, s2++)
      {
!         if (*s1 == '#')
!             *s2 = '$';
!         else if (!(*s2 = *s1))
!             break;
      }
!     return(gensym(buf));
  }
  

Index: makefile.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** makefile.in	3 Jun 2006 19:13:07 -0000	1.10
--- makefile.in	11 Aug 2006 20:09:07 -0000	1.11
***************
*** 21,28 ****
  libpdbindir = $(libpddir)/bin
  
  MORECFLAGS = @MORECFLAGS@
! 
! INCLUDE = -I.
! GINCLUDE = $(INCLUDE) @GUIFLAGS@
  GLIB = @LIBS@
  
--- 21,27 ----
  libpdbindir = $(libpddir)/bin
  
+ CPPFLAGS = @CPPFLAGS@
  MORECFLAGS = @MORECFLAGS@
! GINCLUDE = $(CPPFLAGS) @GUIFLAGS@
  GLIB = @LIBS@
  
***************
*** 30,39 ****
  LIB =  @PDLIB@
  
- OPT_CFLAGS = @OPT_CFLAGS@
  WARN_CFLAGS = -Wall -W -Wstrict-prototypes \
      -Wno-unused -Wno-parentheses -Wno-switch
  ARCH_CFLAGS = -DPD 
  
! CFLAGS = @CFLAGS@ $(ARCH_CFLAGS) $(WARN_CFLAGS) $(OPT_CFLAGS) $(MORECFLAGS)
  
  # the sources
--- 29,37 ----
  LIB =  @PDLIB@
  
  WARN_CFLAGS = -Wall -W -Wstrict-prototypes \
      -Wno-unused -Wno-parentheses -Wno-switch
  ARCH_CFLAGS = -DPD 
  
! CFLAGS = @CFLAGS@ $(ARCH_CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(MORECFLAGS)
  
  # the sources
***************
*** 189,193 ****
  
  makefile.dependencies: makefile
! 	$(CC) $(INCLUDE) $(CFLAGS) -M $(SRC) > makefile.dependencies
  
  uninstall:
--- 187,191 ----
  
  makefile.dependencies: makefile
! 	$(CC) $(CPPFLAGS) -M $(SRC) > makefile.dependencies
  
  uninstall:

Index: makefile.nt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile.nt,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** makefile.nt	3 Jun 2006 19:13:07 -0000	1.8
--- makefile.nt	11 Aug 2006 20:09:07 -0000	1.9
***************
*** 32,36 ****
      s_loader.c s_path.c s_entry.c s_audio.c s_midi.c \
      d_ugen.c d_ctl.c d_arithmetic.c d_osc.c d_filter.c d_dac.c d_misc.c \
!     d_math.c d_fft.c d_mayer_fft.c d_fftroutine.c d_array.c d_global.c \
      d_delay.c d_resample.c \
      x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \
--- 32,36 ----
      s_loader.c s_path.c s_entry.c s_audio.c s_midi.c \
      d_ugen.c d_ctl.c d_arithmetic.c d_osc.c d_filter.c d_dac.c d_misc.c \
!     d_math.c d_fft.c d_fft_mayer.c d_fftroutine.c d_array.c d_global.c \
      d_delay.c d_resample.c \
      x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \

Index: notes.txt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/notes.txt,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** notes.txt	3 Jun 2006 19:13:07 -0000	1.25
--- notes.txt	11 Aug 2006 20:09:07 -0000	1.26
***************
*** 1,4 ****
--- 1,9 ----
  ---------------- dolist --------------------
  
+ fix:
+ look again at array vis/invis conundrum, g_template.c
+ subpatches appear at top left of screen regardless
+ $1-args not evaluated (z.pd)
+ 
  test:
  compile on various versions of linux
***************
*** 7,10 ****
--- 12,18 ----
    check the right-click-on-empty-canvas
    MIDI I/O (inc. sysex)
+ mac:
+   text paste broken
+   clicking on windows seems sometimes not to open them
  what does OSX do when jack is compiled into Pd but not installed??
  turn on paMacCore_ChangeDeviceParameters for mac (pa_mac_core.h)

Index: s_loader.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** s_loader.c	3 Jun 2006 19:13:07 -0000	1.8
--- s_loader.c	11 Aug 2006 20:09:07 -0000	1.9
***************
*** 24,65 ****
  typedef void (*t_xxx)(void);
  
! static char sys_dllextent[] = 
  #ifdef __FreeBSD__
!     ".pd_freebsd";
  #endif
! #ifdef IRIX
! #ifdef N32
!     ".pd_irix6";
  #else
!     ".pd_irix5";
! #endif
  #endif
- #ifdef __linux__
-     ".pd_linux";
  #endif
  #ifdef MACOSX
! #ifdef  __i386
!         ".pd_imac";
  #else
!     ".pd_darwin";
  #endif
  #endif
  #ifdef MSW
!     ".dll";
  #endif
  
  void class_set_extern_dir(t_symbol *s);
  
! static int sys_load_lib_alt(char *dirname, char *classname, char *altname)
  {
      char symname[MAXPDSTRING], filename[MAXPDSTRING], dirbuf[MAXPDSTRING],
!       classname2[MAXPDSTRING], *nameptr, *lastdot, 
!       altsymname[MAXPDSTRING];
      void *dlobj;
      t_xxx makeout = NULL;
!     int fd;
  #ifdef MSW
      HINSTANCE ntdll;
  #endif
  #if 0
      fprintf(stderr, "lib %s %s\n", dirname, classname);
--- 24,98 ----
  typedef void (*t_xxx)(void);
  
! /* naming convention for externs.  The names are kept distinct for those
! who wich to make "fat" externs compiled for many platforms.  Less specific
! fallbacks are provided, primarily for back-compatibility; these suffice if
! you are building a package which will run with a single set of compiled
! objects.  The specific name is the letter b, l, d, or m for  BSD, linux,
! darwin, or microsoft, followed by a more specific string, either "fat" for
! a fat binary or an indication of the instruction set. */
! 
  #ifdef __FreeBSD__
! static char sys_dllextent[] = ".b_i386", sys_dllextent2[] = ".pd_freebsd";
  #endif
! #ifdef __linux__
! #ifdef __ia64__
! static char sys_dllextent[] = ".l_ia64", sys_dllextent2[] = ".pd_linux";
  #else
! static char sys_dllextent[] = ".l_i386", sys_dllextent2[] = ".pd_linux";
  #endif
  #endif
  #ifdef MACOSX
! #ifdef __i386__
! static char sys_dllextent[] = ".d_fat", sys_dllextent2[] = ".pd_darwin";
  #else
! static char sys_dllextent[] = ".d_ppc", sys_dllextent2[] = ".pd_darwin";
  #endif
  #endif
  #ifdef MSW
! static char sys_dllextent[] = ".m_i386", sys_dllextent2[] = ".dll";
  #endif
  
  void class_set_extern_dir(t_symbol *s);
  
! static int sys_do_load_lib(char *dirname, char *classname)
  {
      char symname[MAXPDSTRING], filename[MAXPDSTRING], dirbuf[MAXPDSTRING],
!         *nameptr, altsymname[MAXPDSTRING];
      void *dlobj;
      t_xxx makeout = NULL;
!     int i, hexmunge = 0, fd;
  #ifdef MSW
      HINSTANCE ntdll;
  #endif
+     for (i = 0, nameptr = classname; i < MAXPDSTRING-7 && *nameptr; nameptr++)
+     {
+         char c = *nameptr;
+         if ((c>='0' && c<='9') || (c>='A' && c<='Z')||
+            (c>='a' && c<='z' )|| c == '_')
+         {
+             symname[i] = c;
+             i++;
+         }
+             /* trailing tilde becomes "_tilde" */
+         else if (c == '~' && nameptr[1] == 0)
+         {
+             strcpy(symname+i, "_tilde");
+             i += strlen(symname+i);
+         }
+         else /* anything you can't put in a C symbol is sprintf'ed in hex */
+         {
+             sprintf(symname+i, "0x%02x", c);
+             i += strlen(symname+i);
+             hexmunge = 1;
+         }
+     }
+     symname[i] = 0;
+     if (hexmunge)
+     {
+         memmove(symname+6, symname, strlen(symname+1));
+         strncpy(symname, "setup_", 6);
+     }
+     else strcat(symname, "_setup");
+ 
  #if 0
      fprintf(stderr, "lib %s %s\n", dirname, classname);
***************
*** 67,109 ****
          /* try looking in the path for (classname).(sys_dllextent) ... */
      if ((fd = open_via_path(dirname, classname, sys_dllextent,
!         dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
!     {
!             /* next try (classname)/(classname).(sys_dllextent) ... */
!         strncpy(classname2, classname, MAXPDSTRING);
!         filename[MAXPDSTRING-2] = 0;
!         strcat(classname2, "/");
!         strncat(classname2, classname, MAXPDSTRING-strlen(classname2));
!         filename[MAXPDSTRING-1] = 0;
!         if ((fd = open_via_path(dirname, classname2, sys_dllextent,
!             dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
!         {
!             /* next try (alternative_classname).(sys_dllextent) */
!             if (altname)
!             {
!                 if ((fd = open_via_path(dirname, altname, sys_dllextent,
!                     dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
!                 {
!                     /* next try 
!                         (alt_classname)/(alt_classname).(sys_dllextent) */
!                     strncpy(classname2, altname, MAXPDSTRING);
!                     filename[MAXPDSTRING-2] = 0;
!                     strcat(classname2, "/");
!                     strncat(classname2, altname,
!                         MAXPDSTRING-strlen(classname2));
!                     filename[MAXPDSTRING-1] = 0;
!                     if ((fd = open_via_path(dirname, classname2,
!                         sys_dllextent, dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
!                     {
!                         return 0;
!                     } 
!                 }
!             }
!           else return (0);
!         }
!     }
      close(fd);
      class_set_extern_dir(gensym(dirbuf));
  
!         /* refabricate the pathname */
      strncpy(filename, dirbuf, MAXPDSTRING);
      filename[MAXPDSTRING-2] = 0;
--- 100,127 ----
          /* try looking in the path for (classname).(sys_dllextent) ... */
      if ((fd = open_via_path(dirname, classname, sys_dllextent,
!         dirbuf, &nameptr, MAXPDSTRING, 1)) >= 0)
!             goto gotone;
!         /* same, with the more generic sys_dllextent2 */
!     if ((fd = open_via_path(dirname, classname, sys_dllextent2,
!         dirbuf, &nameptr, MAXPDSTRING, 1)) >= 0)
!             goto gotone;
!         /* next try (classname)/(classname).(sys_dllextent) ... */
!     strncpy(filename, classname, MAXPDSTRING);
!     filename[MAXPDSTRING-2] = 0;
!     strcat(filename, "/");
!     strncat(filename, classname, MAXPDSTRING-strlen(filename));
!     filename[MAXPDSTRING-1] = 0;
!     if ((fd = open_via_path(dirname, filename, sys_dllextent,
!         dirbuf, &nameptr, MAXPDSTRING, 1)) >= 0)
!             goto gotone;
!     if ((fd = open_via_path(dirname, filename, sys_dllextent2,
!         dirbuf, &nameptr, MAXPDSTRING, 1)) >= 0)
!             goto gotone;
!     return (0);
! gotone:
      close(fd);
      class_set_extern_dir(gensym(dirbuf));
  
!         /* rebuild the absolute pathname */
      strncpy(filename, dirbuf, MAXPDSTRING);
      filename[MAXPDSTRING-2] = 0;
***************
*** 111,143 ****
      strncat(filename, nameptr, MAXPDSTRING-strlen(filename));
      filename[MAXPDSTRING-1] = 0;
-         /* extract the setup function name */
-     if (lastdot = strrchr(nameptr, '.'))
-         *lastdot = 0;
- 
- #ifdef DIDFORMACOSX             /* no longer correct on macosx??? */
-     strcpy(symname, "_");
-     strcat(symname, nameptr);
-     if(altname)
-       {
-         strcpy(altsymname, "_setup_");
-         strcat(symname, altname);
-       }
- #else
-     strcpy(symname, nameptr);
-     if(altname)
-       {
-         strcpy(altsymname, "setup_");
-         strcat(altsymname, altname);
-       }
- #endif
  
-         /* if the last character is a tilde, replace with "_tilde" */
-     if (symname[strlen(symname) - 1] == '~')
-         strcpy(symname + (strlen(symname) - 1), "_tilde");
-         /* and append _setup to form the C setup function name */
-     strcat(symname, "_setup");
  #ifdef DL_OPEN
      dlobj = dlopen(filename, RTLD_NOW | RTLD_GLOBAL);
-         post("opened %x", dlobj);
      if (!dlobj)
      {
--- 129,135 ----
***************
*** 147,151 ****
      }
      makeout = (t_xxx)dlsym(dlobj,  symname);
-     if(!makeout)makeout = (t_xxx)dlsym(dlobj,  altsymname);
  #endif
  #ifdef MSW
--- 139,142 ----
***************
*** 159,195 ****
      }
      makeout = (t_xxx)GetProcAddress(ntdll, symname);  
-     if(!makeout)makeout = (t_xxx)GetProcAddress(ntdll, altsymname);  
- #endif
- #if defined(MACOSX) && !defined(DL_OPEN)
-     {
-         NSObjectFileImage image; 
-         void *ret;
-         NSSymbol s; 
-         if ( NSCreateObjectFileImageFromFile( filename, &image) != NSObjectFileImageSuccess )
-         {
-             post("%s: couldn't load", filename);
-             class_set_extern_dir(&s_);
-             return 0;
-         }
-         ret = NSLinkModule( image, filename, 
-                NSLINKMODULE_OPTION_BINDNOW |
-                NSLINKMODULE_OPTION_RETURN_ON_ERROR);
-                
-         if (ret == NULL) {
-                 int err;
-                 const char *fname, *errt;
-                 NSLinkEditErrors c;
-                 NSLinkEditError(&c, &err, &fname, &errt);
-                 post("link error %d %s %s", err, fname, errt);
-                 return 0;
-         }
-         s = NSLookupSymbolInModule(ret, symname); 
- 
-         if(!s)s=NSLookupSymbolInModule(ret, altsymname); 
- 
-         if (s)
-             makeout = (t_xxx)NSAddressOfSymbol( s);
-         else makeout = 0;
-     }
  #endif
  
--- 150,153 ----
***************
*** 197,202 ****
      {
          post("load_object: Symbol \"%s\" not found", symname);
-         if(altname)
-           post("load_object: Symbol \"%s\" not found", altsymname);
          class_set_extern_dir(&s_);
          return 0;
--- 155,158 ----
***************
*** 208,212 ****
  
  /* callback type definition */
! typedef int (*loader_t)(char *dirname, char *classname, char *altname);
  
  /* linked list of loaders */
--- 164,168 ----
  
  /* callback type definition */
! typedef int (*loader_t)(char *dirname, char *classname);
  
  /* linked list of loaders */
***************
*** 216,220 ****
  } loader_queue_t;
  
! static loader_queue_t loaders = {sys_load_lib_alt, NULL};
  
  /* register class loader function */
--- 172,176 ----
  } loader_queue_t;
  
! static loader_queue_t loaders = {sys_do_load_lib, NULL};
  
  /* register class loader function */
***************
*** 236,240 ****
  }
  
! int sys_load_lib(char *dirname, char *classname, char *altname)
  {
      int dspstate = canvas_suspend_dsp();
--- 192,196 ----
  }
  
! int sys_load_lib(char *dirname, char *classname)
  {
      int dspstate = canvas_suspend_dsp();
***************
*** 242,250 ****
      loader_queue_t *q;
      for(q = &loaders; q; q = q->next)
!         if(ok = q->loader(dirname, classname, altname)) break;
      canvas_resume_dsp(dspstate);
      return ok;
  }
  
- 
- 
--- 198,204 ----
      loader_queue_t *q;
      for(q = &loaders; q; q = q->next)
!         if(ok = q->loader(dirname, classname)) break;
      canvas_resume_dsp(dspstate);
      return ok;
  }
  

Index: g_text.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_text.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** g_text.c	31 Dec 2005 20:55:25 -0000	1.12
--- g_text.c	11 Aug 2006 20:09:07 -0000	1.13
***************
*** 31,36 ****
  /* ----------------- the "text" object.  ------------------ */
  
!     /* add a "text" object (comment) to a glist.  While this one goes for any glist,
!     the other 3 below are for canvases only.  (why?)  This is called
      without args if invoked from the GUI; otherwise at least x and y
      are provided.  */
--- 31,36 ----
  /* ----------------- the "text" object.  ------------------ */
  
!     /* add a "text" object (comment) to a glist.  While this one goes for any
!     glist, the other 3 below are for canvases only.  (why?)  This is called
      without args if invoked from the GUI; otherwise at least x and y
      are provided.  */
***************
*** 567,570 ****
--- 567,583 ----
  }
  
+     /* We need a list method because, since there's both an "inlet" and a
+     "nofirstin" flag, the standard list behavior gets confused. */
+ static void gatom_list(t_gatom *x, t_symbol *s, int argc, t_atom *argv)
+ {
+     if (!argc)
+         gatom_bang(x);
+     else if (argv->a_type == A_FLOAT)
+         gatom_float(x, argv->a_w.w_float);
+     else if (argv->a_type == A_SYMBOL)
+         gatom_symbol(x, argv->a_w.w_symbol);
+     else pd_error(x, "gatom_list: need float or symbol");
+ }
+ 
  static void gatom_motion(void *z, t_floatarg dx, t_floatarg dy)
  {
***************
*** 1350,1353 ****
--- 1363,1367 ----
      class_addfloat(gatom_class, gatom_float);
      class_addsymbol(gatom_class, gatom_symbol);
+     class_addlist(gatom_class, gatom_list);
      class_addmethod(gatom_class, (t_method)gatom_set, gensym("set"),
          A_GIMME, 0);

Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** s_main.c	3 Jun 2006 19:13:07 -0000	1.23
--- s_main.c	11 Aug 2006 20:09:07 -0000	1.24
***************
*** 222,226 ****
          /* load dynamic libraries specified with "-lib" args */
      for  (nl = sys_externlist; nl; nl = nl->nl_next)
!         if (!sys_load_lib(cwd, nl->nl_string, 0))
              post("%s: can't load library", nl->nl_string);
          /* open patches specifies with "-open" args */
--- 222,226 ----
          /* load dynamic libraries specified with "-lib" args */
      for  (nl = sys_externlist; nl; nl = nl->nl_next)
!         if (!sys_load_lib(cwd, nl->nl_string))
              post("%s: can't load library", nl->nl_string);
          /* open patches specifies with "-open" args */

Index: g_canvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** g_canvas.c	3 Jun 2006 19:13:07 -0000	1.13
--- g_canvas.c	11 Aug 2006 20:09:07 -0000	1.14
***************
*** 18,25 ****
  struct _canvasenvironment
  {
!     t_symbol *ce_dir;   /* directory patch lives in */
!     int ce_argc;        /* number of "$" arguments */
!     t_atom *ce_argv;    /* array of "$" arguments */
!     int ce_dollarzero;  /* value of "$0" */
  };
  
--- 18,26 ----
  struct _canvasenvironment
  {
!     t_symbol *ce_dir;      /* directory patch lives in */
!     int ce_argc;           /* number of "$" arguments */
!     t_atom *ce_argv;       /* array of "$" arguments */
!     int ce_dollarzero;     /* value of "$0" */
!     t_namelist *ce_path;   /* search path */
  };
  
***************
*** 182,191 ****
      t_symbol *ret;
      char *name = s->s_name;
!     if (*name == '$' && name[1] >= '0' && name[1] <= '9')
      {
          t_canvasenvironment *env = canvas_getenv(x);
          canvas_setcurrent(x);
!         ret = binbuf_realizedollsym(gensym(name+1),
!             env->ce_argc, env->ce_argv, 1);
          canvas_unsetcurrent(x);
      }
--- 183,191 ----
      t_symbol *ret;
      char *name = s->s_name;
!     if (strchr(name, '$'))
      {
          t_canvasenvironment *env = canvas_getenv(x);
          canvas_setcurrent(x);
!         ret = binbuf_realizedollsym(s, env->ce_argc, env->ce_argv, 1);
          canvas_unsetcurrent(x);
      }
***************
*** 338,343 ****
  
      /* make a new glist.  It will either be a "root" canvas or else
!     its parent will be a "text" object in another window... we don't
!     know which yet. */
  t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv)
  {
--- 338,343 ----
  
      /* make a new glist.  It will either be a "root" canvas or else
!     it appears as a "text" object in another window (canvas_getcurrnet() 
!     tells us which.) */
  t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv)
  {
***************
*** 982,987 ****
  {
      t_pd *z;
-         /* 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)
      {
--- 982,985 ----
***************
*** 989,1014 ****
          if (ap->a_type == A_SYMBOL)
          {
-             char *buf=ap->a_w.w_symbol->s_name, *bufp;
-             if (*buf == '$' && buf[1] >= '0' && buf[1] <= '9')
-             {
-                 for (bufp = buf+2; *bufp; bufp++)
-                     if (*bufp < '0' || *bufp > '9')
-                 {
-                     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_w.w_symbol,
!                 e->ce_argc, e->ce_argv, 1), 0); 
          }
-         else if (ap->a_type == A_SYMBOL)
-           canvas_rename(x, argv[3].a_w.w_symbol, 0);
      }
      canvas_pop(x, x->gl_willvis);
--- 987,994 ----
          if (ap->a_type == A_SYMBOL)
          {
              t_canvasenvironment *e = canvas_getenv(canvas_getcurrent());
              canvas_rename(x, binbuf_realizedollsym(ap->a_w.w_symbol,
!                 e->ce_argc, e->ce_argv, 1), 0);
          }
      }
      canvas_pop(x, x->gl_willvis);
***************
*** 1434,1437 ****
--- 1414,1418 ----
  }
  
+ 
  /* ------------------------------- setup routine ------------------------ */
  



Index: configure.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/configure.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** configure.in	3 Jun 2006 19:13:07 -0000	1.17
--- configure.in	11 Aug 2006 20:09:07 -0000	1.18
***************
*** 9,15 ****
  AC_SUBST(fftw, no)
  AC_SUBST(PDLIB)
  AC_SUBST(MORECFLAGS)
  AC_SUBST(EXT)
- AC_SUBST(OPT_CFLAGS)
  AC_SUBST(USE_DEBUG_CFLAGS, no)
  AC_SUBST(SYSSRC)
--- 9,15 ----
  AC_SUBST(fftw, no)
  AC_SUBST(PDLIB)
+ AC_SUBST(CPPFLAGS)
  AC_SUBST(MORECFLAGS)
  AC_SUBST(EXT)
  AC_SUBST(USE_DEBUG_CFLAGS, no)
  AC_SUBST(SYSSRC)
***************
*** 172,177 ****
      fi 
      EXT=pd_linux
!     MORECFLAGS="-DDL_OPEN -DPA_USE_OSS -DUNIX -DUNISTD\
!     	 -DUSEAPI_OSS \
          -I../portaudio/pa_common -I../portaudio/pablio \
          -I../portmidi/pm_common \
--- 172,177 ----
      fi 
      EXT=pd_linux
!     CPPFLAGS="-DDL_OPEN -DPA_USE_OSS -DUNIX -DUNISTD\
!     	-DUSEAPI_OSS \
          -I../portaudio/pa_common -I../portaudio/pablio \
          -I../portmidi/pm_common \
***************
*** 182,186 ****
      then
      	SYSSRC=$SYSSRC" s_audio_alsa.c s_audio_alsamm.c s_midi_alsa.c"
! 	MORECFLAGS=$MORECFLAGS" -DPA_USE_ALSA -DUSEAPI_ALSA"
  	LDFLAGS=$LDFLAGS" -lasound"
      fi
--- 182,186 ----
      then
      	SYSSRC=$SYSSRC" s_audio_alsa.c s_audio_alsamm.c s_midi_alsa.c"
! 	CPPFLAGS=$CPPFLAGS" -DPA_USE_ALSA -DUSEAPI_ALSA"
  	LDFLAGS=$LDFLAGS" -lasound"
      fi
***************
*** 191,195 ****
  
      then
!     	MORECFLAGS="-DUSEAPI_PORTAUDIO -DPA19 "$MORECFLAGS
  	SYSSRC="s_audio_pa.c \
      	s_audio_pablio.c     \
--- 191,195 ----
  
      then
!     	CPPFLAGS=$CPPFLAGS" -DUSEAPI_PORTAUDIO -DPA19"
  	SYSSRC="s_audio_pa.c \
      	s_audio_pablio.c     \
***************
*** 210,214 ****
  	then
  	    SYSSRC=$SYSSRC" ../portaudio/pa_linux_alsa/pa_linux_alsa.c"
! 	    MORECFLAGS=$MORECFLAGS" -Wno-error"
      	fi
      fi
--- 210,214 ----
  	then
  	    SYSSRC=$SYSSRC" ../portaudio/pa_linux_alsa/pa_linux_alsa.c"
! 	    CPPFLAGS=$CPPFLAGS" -Wno-error"
      	fi
      fi
***************
*** 221,227 ****
      if test x$USE_DEBUG_CFLAGS == "xyes";
      then
! 	OPT_CFLAGS="-g"
      else
! 	OPT_CFLAGS="-O6 -funroll-loops -fomit-frame-pointer"
      fi
      if test x$jack == "xyes";
--- 221,227 ----
      if test x$USE_DEBUG_CFLAGS == "xyes";
      then
! 	MORECFLAGS=$MORECFLAGS" -g"
      else
! 	MORECFLAGS=$MORECFLAGS" -O6 -funroll-loops -fomit-frame-pointer"
      fi
      if test x$jack == "xyes";
***************
*** 234,238 ****
      fi
  
!     echo OPT_CFLAGS --------------- $OPT_CFLAGS
      OSNUMBER=0
  
--- 234,238 ----
      fi
  
!     echo MORECFLAGS --------------- $MORECFLAGS
      OSNUMBER=0
  
***************
*** 245,254 ****
          -framework Carbon -framework CoreMIDI"
      EXT=pd_darwin
!     MORECFLAGS="-DDL_OPEN -DMACOSX -DUNISTD -I/usr/X11R6/include \
! 	 -I../portaudio/pa_common -I../portaudio/pablio \
  	-I../portmidi/pm_common -I../portmidi/pm_mac \
  	-I../portmidi/porttime \
- 	-Wno-error \
  	-DUSEAPI_PORTAUDIO -DPA19 -DPA_USE_COREAUDIO"
      SYSSRC="s_midi_pm.c s_audio_pa.c \
      	s_audio_pablio.c     \
--- 245,261 ----
          -framework Carbon -framework CoreMIDI"
      EXT=pd_darwin
!     CPPFLAGS="-DDL_OPEN -DMACOSX -DUNISTD -I/usr/X11R6/include \
! 	-I../portaudio/pa_common -I../portaudio/pablio \
  	-I../portmidi/pm_common -I../portmidi/pm_mac \
  	-I../portmidi/porttime \
  	-DUSEAPI_PORTAUDIO -DPA19 -DPA_USE_COREAUDIO"
+     if test `uname -r` = 7.9.0;
+     then
+         MORECFLAGS="-Wno-error"
+     	EXTERNTARGET=d_ppc
+     else
+         MORECFLAGS="-arch i386 -arch ppc -Wno-error"
+     	EXTERNTARGET=d_fat
+     fi
      SYSSRC="s_midi_pm.c s_audio_pa.c \
      	s_audio_pablio.c     \
***************
*** 293,307 ****
      if test x$USE_DEBUG_CFLAGS == "xyes";
      then
! 	OPT_CFLAGS="-g"
      else
! 	OPT_CFLAGS="-O2"
      fi
      OSNUMBER=2
-     if test `uname -m`  = i386;
-     then
-     	EXTERNTARGET=pd_imac
-     else
-     	EXTERNTARGET=pd_darwin
-     fi
      if test x$jack == "xyes";
      then
--- 300,308 ----
      if test x$USE_DEBUG_CFLAGS == "xyes";
      then
! 	MORECFLAGS=$MORECFLAGS" -g"
      else
! 	MORECFLAGS=$MORECFLAGS" -O2"
      fi
      OSNUMBER=2
      if test x$jack == "xyes";
      then


Index: g_editor.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** g_editor.c	3 Jun 2006 19:13:07 -0000	1.15
--- g_editor.c	11 Aug 2006 20:09:07 -0000	1.16
***************
*** 1961,1966 ****
          rtext_getseltext(x->gl_editor->e_textedfor, &buf, &bufsize);
  
! #ifdef UNIX
!             /* in X windows (i.e., UNIX) the selection already went to the
              clipboard when it was made; here we "copy" it to our own buffer
              as well, because, annoyingly, the clipboard will usually be 
--- 1961,1970 ----
          rtext_getseltext(x->gl_editor->e_textedfor, &buf, &bufsize);
  
! #if defined(MSW) || defined(MACOSX)
!             /* for Mac or Windows, copy the text to the clipboard here */
!         sys_vgui("clipboard clear\n", bufsize, buf);
!         sys_vgui("clipboard append {%.*s}\n", bufsize, buf);
! #else
!             /* in X windows the selection already went to the
              clipboard when it was made; here we "copy" it to our own buffer
              as well, because, annoyingly, the clipboard will usually be 
***************
*** 1971,1979 ****
          memcpy(canvas_textcopybuf, buf, bufsize);
          canvas_textcopybufsize = bufsize;
! #else /* UNIX */
!             /* otherwise just copy the text to the clipboard here */
!         sys_vgui("clipboard clear\n", bufsize, buf);
!         sys_vgui("clipboard append {%.*s}\n", bufsize, buf);
! #endif /* UNIX */
      }
  }
--- 1975,1979 ----
          memcpy(canvas_textcopybuf, buf, bufsize);
          canvas_textcopybufsize = bufsize;
! #endif
      }
  }
***************
*** 2125,2130 ****
      {
              /* simulate keystrokes as if the copy buffer were typed in. */
! #ifdef UNIX
!             /* in UNIX we kept the text in our own copy buffer */
          int i;
          for (i = 0; i < canvas_textcopybufsize; i++)
--- 2125,2133 ----
      {
              /* simulate keystrokes as if the copy buffer were typed in. */
! #if defined(MSW) || defined(MACOSX)
!             /* for Mac or Windows,  ask the GUI to send the clipboard down */
!         sys_gui("pdtk_pastetext\n");
! #else
!             /* in X windows we kept the text in our own copy buffer */
          int i;
          for (i = 0; i < canvas_textcopybufsize; i++)
***************
*** 2133,2141 ****
                  1, canvas_textcopybuf[i]&0xff, 0);
          }
! #else /* UNIX */
!             /* otherwise appeal to the GUI to send the clipboard down */
!         sys_gui("pdtk_pastetext\n");
! #endif /* UNIX */
! 
      }
      else
--- 2136,2140 ----
                  1, canvas_textcopybuf[i]&0xff, 0);
          }
! #endif
      }
      else





More information about the Pd-cvs mailing list