aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flattr_ed.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-08-15 02:32:46 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-08-15 02:32:46 +0000
commit185d9a6b38a94150edb98a9a0d3c90fe9a3bd68d (patch)
tree26c4ea60d8d2832f33c57db91bd4403e61d23353 /externals/grill/flext/source/flattr_ed.cpp
parent21e2f111c461725446457f0d768a95b71c17c847 (diff)
""
svn path=/trunk/; revision=848
Diffstat (limited to 'externals/grill/flext/source/flattr_ed.cpp')
-rw-r--r--externals/grill/flext/source/flattr_ed.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/externals/grill/flext/source/flattr_ed.cpp b/externals/grill/flext/source/flattr_ed.cpp
index 2153a485..fddbb69b 100644
--- a/externals/grill/flext/source/flattr_ed.cpp
+++ b/externals/grill/flext/source/flattr_ed.cpp
@@ -467,9 +467,6 @@ void flext_base::cb_GfxSave(t_gobj *c, t_binbuf *b)
AtomList la;
th->ListAttrib(la);
cnt = la.Count();
- char attrname[100];
- *attrname= '@';
-
for(int i = 0; i < cnt; ++i) {
const t_symbol *sym = GetSymbol(la[i]);
@@ -479,8 +476,26 @@ void flext_base::cb_GfxSave(t_gobj *c, t_binbuf *b)
if(it != th->attrdata->end()) {
const AttrData &a = it->second;
- if(a.IsInit() && a.IsInitValue())
+ if(a.IsInit() && a.IsInitValue()) {
lref = &a.GetInitValue();
+/*
+ // check for $-parameters
+ lv = lref->Count();
+ for(int j = 0; j < lref->Count(); ++j) {
+ const char *s = IsSymbol((*lref)[j])?GetString((*lref)[j]):NULL;
+ if(s && s[0] == '$') { // TODO: More refined checking?
+ // prepend a "\"
+ char tmp[256]; *tmp = '\\';
+ strcpy(tmp+1,s);
+ SetString(lv[j],tmp);
+ }
+ else
+ lv[i] = (*lref)[j];
+ }
+
+ lref = &lv;
+*/
+ }
else if(a.IsSaved()) {
AttrItem *attr = th->FindAttrib(sym,true);
@@ -493,6 +508,7 @@ void flext_base::cb_GfxSave(t_gobj *c, t_binbuf *b)
}
if(lref) {
+ char attrname[256]; *attrname= '@';
// store name
strcpy(attrname+1,GetString(sym));
binbuf_addv(b,"s",MakeSymbol(attrname));