[PD-cvs] externals/grill/pool/source pool.cpp,1.18,1.19

Thomas Grill xovo at users.sourceforge.net
Mon Aug 22 21:21:35 CEST 2005


Update of /cvsroot/pure-data/externals/grill/pool/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1640/source

Modified Files:
	pool.cpp 
Log Message:
file loading: fixed recognition of stringified directory names


Index: pool.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/pool/source/pool.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** pool.cpp	7 Jun 2005 14:14:51 -0000	1.18
--- pool.cpp	22 Aug 2005 19:21:31 -0000	1.19
***************
*** 468,472 ****
  
  
! static char *ReadAtom(char *c,A *a)
  {
  	// skip leading whitespace
--- 468,472 ----
  
  
! static const char *ReadAtom(const char *c,A &a)
  {
  	// skip leading whitespace
***************
*** 523,538 ****
      if(!issymbol && !*endp && endp != tmp) { 
  #endif
!         if(a) {
!             int ires = (int)fres; // try a cast
!             if(fres == ires)
!                 flext::SetInt(*a,ires);
!             else
!                 flext::SetFloat(*a,fres);
!         }
      }
      // no, it's a symbol
!     else {
!         if(a) flext::SetString(*a,tmp);
!     }
  
  	return c;
--- 523,535 ----
      if(!issymbol && !*endp && endp != tmp) { 
  #endif
!         int ires = (int)fres; // try a cast
!         if(fres == ires)
!             flext::SetInt(a,ires);
!         else
!             flext::SetFloat(a,fres);
      }
      // no, it's a symbol
!     else
!         flext::SetString(a,tmp);
  
  	return c;
***************
*** 544,549 ****
      int cnt = 0;
      t_atom atoms[MAXATOMS];
!     for(char *t = tmp; *t && cnt < MAXATOMS; ++cnt) {
! 		t = ReadAtom(t,&atoms[cnt]);
          if(!t) break;
      }
--- 541,546 ----
      int cnt = 0;
      t_atom atoms[MAXATOMS];
!     for(const char *t = tmp; *t && cnt < MAXATOMS; ++cnt) {
! 		t = ReadAtom(t,atoms[cnt]);
          if(!t) break;
      }
***************
*** 818,821 ****
--- 815,819 ----
                      else {
                          t_atom &dkey = d[d.Count()-1];
+                         FLEXT_ASSERT(IsSymbol(dkey));
                          const char *ds = GetString(dkey);
                          FLEXT_ASSERT(ds);
***************
*** 823,827 ****
                              post("pool - XML load: dir key already given, ignoring new key");
                          else
!                             SetString(dkey,s.c_str());
                          ret = true;
                      }
--- 821,826 ----
                              post("pool - XML load: dir key already given, ignoring new key");
                          else
!                             ReadAtom(s.c_str(),dkey);
! 
                          ret = true;
                      }





More information about the Pd-cvs mailing list