[PD-cvs] externals/grill/pool/source data.cpp,1.1,1.2 main.cpp,1.1,1.2 pool.cpp,1.2,1.3 pool.h,1.2,1.3

Thomas Grill xovo at users.sourceforge.net
Thu Apr 22 04:41:53 CEST 2004


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

Modified Files:
	data.cpp main.cpp pool.cpp pool.h 
Log Message:
 ""

Index: data.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/pool/source/data.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** data.cpp	8 Jan 2004 03:38:35 -0000	1.1
--- data.cpp	22 Apr 2004 02:41:30 -0000	1.2
***************
*** 3,7 ****
  pool - hierarchical storage object for PD and Max/MSP
  
! Copyright (c) 2002-2003 Thomas Grill (xovo at gmx.net)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
--- 3,7 ----
  pool - hierarchical storage object for PD and Max/MSP
  
! Copyright (c) 2002-2004 Thomas Grill (xovo at gmx.net)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  

Index: main.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/pool/source/main.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** main.cpp	8 Jan 2004 03:38:35 -0000	1.1
--- main.cpp	22 Apr 2004 02:41:30 -0000	1.2
***************
*** 3,7 ****
  pool - hierarchical storage object for PD and Max/MSP
  
! Copyright (c) 2002-2003 Thomas Grill (xovo at gmx.net)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
--- 3,7 ----
  pool - hierarchical storage object for PD and Max/MSP
  
! Copyright (c) 2002-2004 Thomas Grill (xovo at gmx.net)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
***************
*** 227,231 ****
  {
  	post("");
! 	post("pool %s - hierarchical storage object, (C)2002-2003 Thomas Grill",POOL_VERSION);
  	post("");
  
--- 227,231 ----
  {
  	post("");
! 	post("pool %s - hierarchical storage object, (C)2002-2004 Thomas Grill",POOL_VERSION);
  	post("");
  
***************
*** 328,339 ****
  V pool::SetPool(const S *s)
  {
- 	if(pl) FreePool();
- 
  	if(s) {
  		priv = false;
  		pl = GetPool(s);
  	}
  	else {
  		priv = true;
  		pl = new pooldata(NULL,vcnt,dcnt);
  	}
--- 328,347 ----
  V pool::SetPool(const S *s)
  {
  	if(s) {
  		priv = false;
+ 		if(pl)
+ 			// check if new symbol equals the current one
+ 			if(pl->sym == s) 
+ 				return;
+ 			else
+ 				FreePool();
  		pl = GetPool(s);
  	}
  	else {
+ 		// if already private no need to allocate new storage
+ 		if(priv) return;
+ 
  		priv = true;
+ 		if(pl) FreePool();
  		pl = new pooldata(NULL,vcnt,dcnt);
  	}
***************
*** 369,373 ****
  V pool::mg_pool(AtomList &l)
  {
! 	if(priv) l();
  	else { l(1); SetSymbol(l[0],pl->sym); }
  }
--- 377,381 ----
  V pool::mg_pool(AtomList &l)
  {
! 	if(priv || !pl) l();
  	else { l(1); SetSymbol(l[0],pl->sym); }
  }

Index: pool.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/pool/source/pool.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pool.cpp	23 Feb 2004 03:32:53 -0000	1.2
--- pool.cpp	22 Apr 2004 02:41:30 -0000	1.3
***************
*** 3,7 ****
  pool - hierarchical storage object for PD and Max/MSP
  
! Copyright (c) 2002-2003 Thomas Grill (xovo at gmx.net)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
--- 3,7 ----
  pool - hierarchical storage object for PD and Max/MSP
  
! Copyright (c) 2002-2004 Thomas Grill (xovo at gmx.net)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
***************
*** 843,858 ****
  BL pooldir::SvDirXML(ostream &os,I depth,const AtomList &dir,I ind)
  {
!     if(dir.Count()) {
!         indent(os,ind);
!         os << "<dir>" << endl;
!         indent(os,ind+1);
!         os << "<key>";
!         WriteAtom(os,dir[dir.Count()-1]);
!         os << "</key>" << endl;
!     }
  
  	for(I vi = 0; vi < vsize; ++vi) {
  		for(poolval *ix = vals[vi].v; ix; ix = ix->nxt) {
!             indent(os,ind+1);
              os << "<value><key>";
  			WriteAtom(os,ix->key);
--- 843,860 ----
  BL pooldir::SvDirXML(ostream &os,I depth,const AtomList &dir,I ind)
  {
! 	int i,lvls = ind?(dir.Count()?1:0):dir.Count();
! 
! 	for(i = 0; i < lvls; ++i) {
! 		indent(os,ind+i);
! 		os << "<dir>" << endl;
! 		indent(os,ind+i+1);
! 		os << "<key>";
! 		WriteAtom(os,dir[i]);
! 		os << "</key>" << endl;
! 	}
  
  	for(I vi = 0; vi < vsize; ++vi) {
  		for(poolval *ix = vals[vi].v; ix; ix = ix->nxt) {
!             indent(os,ind+lvls);
              os << "<value><key>";
  			WriteAtom(os,ix->key);
***************
*** 867,879 ****
  		for(I di = 0; di < dsize; ++di) {
  			for(pooldir *ix = dirs[di].d; ix; ix = ix->nxt) {
! 				ix->SvDirXML(os,nd,AtomList(dir).Append(ix->dir),ind+1);
  			}
  		}
  	}
  
!     if(dir.Count()) {
!         indent(os,ind);
!         os << "</dir>" << endl;
!     }
  	return true;
  }
--- 869,881 ----
  		for(I di = 0; di < dsize; ++di) {
  			for(pooldir *ix = dirs[di].d; ix; ix = ix->nxt) {
! 				ix->SvDirXML(os,nd,AtomList(dir).Append(ix->dir),ind+lvls);
  			}
  		}
  	}
  
! 	for(i = lvls-1; i >= 0; --i) {
! 		indent(os,ind+i);
! 		os << "</dir>" << endl;
! 	}
  	return true;
  }

Index: pool.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/pool/source/pool.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pool.h	23 Feb 2004 03:32:54 -0000	1.2
--- pool.h	22 Apr 2004 02:41:30 -0000	1.3
***************
*** 3,7 ****
  pool - hierarchical storage object for PD and Max/MSP
  
! Copyright (c) 2002-2003 Thomas Grill (xovo at gmx.net)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
--- 3,7 ----
  pool - hierarchical storage object for PD and Max/MSP
  
! Copyright (c) 2002-2004 Thomas Grill (xovo at gmx.net)
  For information on usage and redistribution, and for a DISCLAIMER OF ALL
  WARRANTIES, see the file, "license.txt," in this distribution.  
***************
*** 16,21 ****
  #include <flext.h>
  
! #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 402)
! #error You need at least flext version 0.4.2
  #endif
  
--- 16,21 ----
  #include <flext.h>
  
! #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 405)
! #error You need at least flext version 0.4.5
  #endif
  





More information about the Pd-cvs mailing list