From 1242ecdbfafd008263f0cca418c10dc1322ff21f Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 2 Dec 2002 19:36:35 +0000 Subject: "" svn path=/trunk/; revision=268 --- externals/grill/pool/pool.cpp | 25 +++++++++++-------------- externals/grill/pool/pool.cw | Bin 59193 -> 95908 bytes externals/grill/pool/pool.help | Bin 5345 -> 5347 bytes 3 files changed, 11 insertions(+), 14 deletions(-) (limited to 'externals/grill/pool') diff --git a/externals/grill/pool/pool.cpp b/externals/grill/pool/pool.cpp index b45f0e87..d7304f57 100644 --- a/externals/grill/pool/pool.cpp +++ b/externals/grill/pool/pool.cpp @@ -29,19 +29,19 @@ static I compare(const S *a,const S *b) static I compare(const A &a,const A &b) { - if(a.a_type == b.a_type) { - switch(a.a_type) { + if(flext::GetType(a) == flext::GetType(b)) { + switch(flext::GetType(a)) { case A_FLOAT: - return compare(a.a_w.w_float,b.a_w.w_float); + return compare(flext::GetFloat(a),flext::GetFloat(b)); #ifdef MAXMSP case A_LONG: - return compare((I)a.a_w.w_long,(I)b.a_w.w_long); + return compare(flext::GetInt(a),flext::GetInt(b)); #endif case A_SYMBOL: - return compare(a.a_w.w_symbol,b.a_w.w_symbol); + return compare(flext::GetSymbol(a),flext::GetSymbol(b)); #ifdef PD case A_POINTER: - return a.a_w.w_gpointer == b.a_w.w_gpointer?0:(a.a_w.w_gpointer < b.a_w.w_gpointer?-1:1); + return flext::GetPointer(a) == flext::GetPointer(b)?0:(flext::GetPointer(a) < flext::GetPointer(b)?-1:1); #endif default: LOG("pool - atom comparison: type not handled"); @@ -49,7 +49,7 @@ static I compare(const A &a,const A &b) } } else - return a.a_type < b.a_type?-1:1; + return flext::GetType(a) < flext::GetType(b)?-1:1; } @@ -368,18 +368,15 @@ static C *ReadAtom(C *c,A *a) switch(s) { case 0: // integer #ifdef MAXMSP - a->a_type = A_LONG; - a->a_w.w_long = atol(m); + flext::SetInt(*a,atoi(m)); break; #endif case 1: // float - a->a_type = A_FLOAT; - a->a_w.w_float = (F)atof(m); + flext::SetFloat(*a,(F)atof(m)); break; default: { // anything else is a symbol C t = *c; *c = 0; - a->a_type = A_SYMBOL; - a->a_w.w_symbol = (S *)flext::MakeSymbol(m); + flext::SetString(*a,m); *c = t; break; } @@ -422,7 +419,7 @@ static V WriteAtom(ostream &os,const A &a) break; #endif case A_SYMBOL: - os << flext::GetString(a.a_w.w_symbol); + os << flext::GetString(flext::GetSymbol(a)); break; } } diff --git a/externals/grill/pool/pool.cw b/externals/grill/pool/pool.cw index b977091c..123cb10f 100755 Binary files a/externals/grill/pool/pool.cw and b/externals/grill/pool/pool.cw differ diff --git a/externals/grill/pool/pool.help b/externals/grill/pool/pool.help index 24d189b7..c4ce9d74 100755 Binary files a/externals/grill/pool/pool.help and b/externals/grill/pool/pool.help differ -- cgit v1.2.1