aboutsummaryrefslogtreecommitdiff
path: root/externals/grill
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill')
-rw-r--r--externals/grill/flext/flext.cwbin202097 -> 202097 bytes
-rw-r--r--externals/grill/flext/source/fldefs.h2
-rw-r--r--externals/grill/pool/main.cpp44
-rwxr-xr-xexternals/grill/pool/pool.cwbin95908 -> 95908 bytes
-rw-r--r--externals/grill/pool/pool.h2
-rwxr-xr-xexternals/grill/pool/pool.helpbin5347 -> 5887 bytes
-rw-r--r--externals/grill/pool/readme.txt4
7 files changed, 33 insertions, 19 deletions
diff --git a/externals/grill/flext/flext.cw b/externals/grill/flext/flext.cw
index af84bce2..18917ad9 100644
--- a/externals/grill/flext/flext.cw
+++ b/externals/grill/flext/flext.cw
Binary files differ
diff --git a/externals/grill/flext/source/fldefs.h b/externals/grill/flext/source/fldefs.h
index 14f2e012..10c7bf93 100644
--- a/externals/grill/flext/source/fldefs.h
+++ b/externals/grill/flext/source/fldefs.h
@@ -835,7 +835,7 @@ FLEXT_CALL_PRE(M_FUN)(this,ARG1,ARG2,ARG3,ARG4,ARG5)
//! @} FLEXT_D_METHOD
-#if defined(FLEXT_ATTRIBUTES) && FLEXT_ATTRIBUTES == 1
+#ifdef FLEXT_ATTRIBUTES
/*! \defgroup FLEXT_D_ATTRIB Attribute definition
\note These have to reside inside the class declaration
diff --git a/externals/grill/pool/main.cpp b/externals/grill/pool/main.cpp
index c8297e9c..ad1da05a 100644
--- a/externals/grill/pool/main.cpp
+++ b/externals/grill/pool/main.cpp
@@ -10,7 +10,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "pool.h"
-#define POOL_VERSION "0.1.0"
+#define POOL_VERSION "0.1.1"
class pool:
public flext_base
@@ -28,16 +28,12 @@ public:
protected:
// switch to other pool
- V m_pool(I argc,const A *argv);
+ V ms_pool(const AtomList &l);
+ V mg_pool(AtomList &l);
// clear all data in pool
V m_reset();
- // output absolute directory paths?
- V m_absdir(BL abs) { absdir = abs; }
- // always output current directory
- V m_echodir(BL e) { echo = e; }
-
// handle directories
V m_getdir();
@@ -119,10 +115,14 @@ private:
static pooldata *GetPool(const S *s);
static V RmvPool(pooldata *p);
- FLEXT_CALLBACK_V(m_pool)
+ FLEXT_CALLVAR_V(mg_pool,ms_pool)
+ FLEXT_ATTRVAR_B(absdir)
+ FLEXT_ATTRVAR_B(echo)
+ FLEXT_ATTRGET_B(priv)
+// FLEXT_ATTRGET_B(curdir)
+
FLEXT_CALLBACK(m_reset)
- FLEXT_CALLBACK_B(m_absdir)
- FLEXT_CALLBACK_B(m_echodir)
+
FLEXT_CALLBACK(m_getdir)
FLEXT_CALLBACK_V(m_mkdir)
FLEXT_CALLBACK_V(m_chdir)
@@ -191,13 +191,14 @@ pool::pool(I argc,const A *argv):
AddOutList();
AddOutAnything();
- FLEXT_ADDMETHOD_(0,"pool",m_pool);
+ FLEXT_ADDATTR_VAR("pool",mg_pool,ms_pool);
+ FLEXT_ADDATTR_VAR1("absdir",absdir);
+ FLEXT_ADDATTR_VAR1("echodir",echo);
+ FLEXT_ADDATTR_GET("private",priv);
+ FLEXT_ADDMETHOD_(0,"reset",m_reset);
FLEXT_ADDMETHOD_(0,"set",m_set);
FLEXT_ADDMETHOD_(0,"add",m_add);
- FLEXT_ADDMETHOD_(0,"reset",m_reset);
- FLEXT_ADDMETHOD_(0,"absdir",m_absdir);
- FLEXT_ADDMETHOD_(0,"echodir",m_echodir);
FLEXT_ADDMETHOD_(0,"getdir",m_getdir);
FLEXT_ADDMETHOD_(0,"mkdir",m_mkdir);
FLEXT_ADDMETHOD_(0,"chdir",m_chdir);
@@ -272,18 +273,24 @@ V pool::FreePool()
if(clip) { delete clip; clip = NULL; }
}
-V pool::m_pool(I argc,const A *argv)
+V pool::ms_pool(const AtomList &l)
{
const S *s = NULL;
- if(argc > 0) {
- if(argc > 1) post("%s - pool: superfluous arguments ignored",thisName());
- s = GetASymbol(argv[0]);
+ if(l.Count()) {
+ if(l.Count() > 1) post("%s - pool: superfluous arguments ignored",thisName());
+ s = GetASymbol(l[0]);
if(!s) post("%s - pool: invalid pool name, pool set to private",thisName());
}
SetPool(s);
}
+V pool::mg_pool(AtomList &l)
+{
+ if(priv) l();
+ else { l(1); SetSymbol(l[0],pl->sym); }
+}
+
V pool::m_reset()
{
pl->Reset();
@@ -548,6 +555,7 @@ I pool::getsub(const S *tag,I level,BL cntonly,const AtomList &rdir)
ToOutAnything(3,tag,0,NULL);
ToOutList(2,curdir);
ToOutList(1,ndir);
+ ToOutBang(0);
}
if(level != 0)
diff --git a/externals/grill/pool/pool.cw b/externals/grill/pool/pool.cw
index 123cb10f..3e596aee 100755
--- a/externals/grill/pool/pool.cw
+++ b/externals/grill/pool/pool.cw
Binary files differ
diff --git a/externals/grill/pool/pool.h b/externals/grill/pool/pool.h
index 348a4127..af73341d 100644
--- a/externals/grill/pool/pool.h
+++ b/externals/grill/pool/pool.h
@@ -11,6 +11,8 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#ifndef __POOL_H
#define __POOL_H
+#define FLEXT_ATTRIBUTES 1
+
#include <flext.h>
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401)
diff --git a/externals/grill/pool/pool.help b/externals/grill/pool/pool.help
index c4ce9d74..3f160c45 100755
--- a/externals/grill/pool/pool.help
+++ b/externals/grill/pool/pool.help
Binary files differ
diff --git a/externals/grill/pool/readme.txt b/externals/grill/pool/readme.txt
index 513b1966..0fc0f7f3 100644
--- a/externals/grill/pool/readme.txt
+++ b/externals/grill/pool/readme.txt
@@ -52,6 +52,9 @@ o CodeWarrior: edit "pool.cw" and build
Version history:
+0.1.1:
+- attributes (pool,private,echodir,absdir)
+
0.1.0:
- first public release
@@ -61,5 +64,6 @@ TODO list:
general:
- speed up the database
+- what is output as value if it is key only? (Max->nothing!)