aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--externals/grill/pool/pool.vcproj5
-rw-r--r--externals/grill/pool/readme.txt1
-rw-r--r--externals/grill/pool/source/data.cpp2
-rw-r--r--externals/grill/pool/source/main.cpp18
-rw-r--r--externals/grill/pool/source/pool.cpp32
-rw-r--r--externals/grill/pool/source/pool.h6
6 files changed, 38 insertions, 26 deletions
diff --git a/externals/grill/pool/pool.vcproj b/externals/grill/pool/pool.vcproj
index 494c67c2..45d0b3d1 100644
--- a/externals/grill/pool/pool.vcproj
+++ b/externals/grill/pool/pool.vcproj
@@ -92,6 +92,7 @@
Optimization="0"
AdditionalIncludeDirectories="f:\prog\pd\pd-cvs\src,f:\prog\max\flext\source"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FLEXT_SYS=2"
+ StringPooling="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="5"
UsePrecompiledHeader="2"
@@ -108,11 +109,11 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="pd.lib flext_d-pdwin.lib"
+ AdditionalDependencies="pd.lib"
OutputFile=".\pd-msvc/d/pool.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
- AdditionalLibraryDirectories="f:\prog\pd\pd-cvs\bin,f:\prog\max\flext\pd-msvc"
+ AdditionalLibraryDirectories="f:\prog\pd\pd-cvs\bin"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\pd-msvc/d/pool.pdb"
ImportLibrary=".\pd-msvc/d/pool.lib"
diff --git a/externals/grill/pool/readme.txt b/externals/grill/pool/readme.txt
index e0e51613..5a9de853 100644
--- a/externals/grill/pool/readme.txt
+++ b/externals/grill/pool/readme.txt
@@ -71,6 +71,7 @@ Version history:
- relative file names will be based on the folder of the current patcher
- added printall, printrec, printroot messages for console printout
- added mkchdir, mkchsub to create and change to directories at once
+- change storage object only when name has changed
0.1.0:
- first public release
diff --git a/externals/grill/pool/source/data.cpp b/externals/grill/pool/source/data.cpp
index 9eda196b..bbbb751f 100644
--- a/externals/grill/pool/source/data.cpp
+++ b/externals/grill/pool/source/data.cpp
@@ -2,7 +2,7 @@
pool - hierarchical storage object for PD and Max/MSP
-Copyright (c) 2002-2003 Thomas Grill (xovo@gmx.net)
+Copyright (c) 2002-2004 Thomas Grill (xovo@gmx.net)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
diff --git a/externals/grill/pool/source/main.cpp b/externals/grill/pool/source/main.cpp
index 5f75f07d..3e74360d 100644
--- a/externals/grill/pool/source/main.cpp
+++ b/externals/grill/pool/source/main.cpp
@@ -2,7 +2,7 @@
pool - hierarchical storage object for PD and Max/MSP
-Copyright (c) 2002-2003 Thomas Grill (xovo@gmx.net)
+Copyright (c) 2002-2004 Thomas Grill (xovo@gmx.net)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
@@ -226,7 +226,7 @@ pooldata *pool::head,*pool::tail;
V pool::setup(t_classid c)
{
post("");
- post("pool %s - hierarchical storage object, (C)2002-2003 Thomas Grill",POOL_VERSION);
+ post("pool %s - hierarchical storage object, (C)2002-2004 Thomas Grill",POOL_VERSION);
post("");
head = tail = NULL;
@@ -327,14 +327,22 @@ BL pool::Init()
V pool::SetPool(const S *s)
{
- if(pl) FreePool();
-
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);
}
}
@@ -368,7 +376,7 @@ V pool::ms_pool(const AtomList &l)
V pool::mg_pool(AtomList &l)
{
- if(priv) l();
+ if(priv || !pl) l();
else { l(1); SetSymbol(l[0],pl->sym); }
}
diff --git a/externals/grill/pool/source/pool.cpp b/externals/grill/pool/source/pool.cpp
index dcb16237..bda4407a 100644
--- a/externals/grill/pool/source/pool.cpp
+++ b/externals/grill/pool/source/pool.cpp
@@ -2,7 +2,7 @@
pool - hierarchical storage object for PD and Max/MSP
-Copyright (c) 2002-2003 Thomas Grill (xovo@gmx.net)
+Copyright (c) 2002-2004 Thomas Grill (xovo@gmx.net)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
@@ -842,18 +842,20 @@ static void indent(ostream &s,I cnt)
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;
- }
+ 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+1);
+ indent(os,ind+lvls);
os << "<value><key>";
WriteAtom(os,ix->key);
os << "</key><data>";
@@ -866,15 +868,15 @@ BL pooldir::SvDirXML(ostream &os,I depth,const AtomList &dir,I ind)
I nd = depth > 0?depth-1:-1;
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);
+ ix->SvDirXML(os,nd,AtomList(dir).Append(ix->dir),ind+lvls);
}
}
}
- if(dir.Count()) {
- indent(os,ind);
- os << "</dir>" << endl;
- }
+ for(i = lvls-1; i >= 0; --i) {
+ indent(os,ind+i);
+ os << "</dir>" << endl;
+ }
return true;
}
diff --git a/externals/grill/pool/source/pool.h b/externals/grill/pool/source/pool.h
index 1874d334..64445c06 100644
--- a/externals/grill/pool/source/pool.h
+++ b/externals/grill/pool/source/pool.h
@@ -2,7 +2,7 @@
pool - hierarchical storage object for PD and Max/MSP
-Copyright (c) 2002-2003 Thomas Grill (xovo@gmx.net)
+Copyright (c) 2002-2004 Thomas Grill (xovo@gmx.net)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
@@ -15,8 +15,8 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <flext.h>
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 402)
-#error You need at least flext version 0.4.2
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 405)
+#error You need at least flext version 0.4.5
#endif
#include <iostream>