Update of /cvsroot/pure-data/externals/grill/flext/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6186/source
Modified Files: flmap.h flsupport.cpp Log Message: optimized AtomList functions minor fixes for Max fixes for OSX small update of linkage styles etc. updated the docs new: FLEXT_WARN, FLEXT_ERROR macros
Index: flmap.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flmap.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** flmap.h 19 Mar 2005 04:56:01 -0000 1.9 --- flmap.h 25 Mar 2005 04:52:21 -0000 1.10 *************** *** 95,100 **** };
! TableAnyMap(TableAnyMap *p,int mx,Data *dt,bool o) ! : owned(o),max(mx),data(dt) , n(0),parent(p),left(NULL),right(NULL) {} --- 95,100 ---- };
! TableAnyMap(TableAnyMap *p,int sz,Data *dt,bool o) ! : owned(o),tsize(sz),data(dt) , n(0),parent(p),left(NULL),right(NULL) {} *************** *** 144,148 ****
const bool owned; ! const int max; Data *const data; int n; --- 144,148 ----
const bool owned; ! const int tsize; Data *const data; int n;
Index: flsupport.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** flsupport.cpp 18 Mar 2005 04:56:27 -0000 1.46 --- flsupport.cpp 25 Mar 2005 04:52:21 -0000 1.47 *************** *** 322,326 **** { int sz = n; ! if(sz >= max) { if(left) sz += left->size(); if(right) sz += right->size(); --- 322,326 ---- { int sz = n; ! if(sz >= tsize) { if(left) sz += left->size(); if(right) sz += right->size(); *************** *** 333,337 **** FLEXT_ASSERT(n);
! if(n < max) { // fall through } --- 333,337 ---- FLEXT_ASSERT(n);
! if(n < tsize) { // fall through } *************** *** 340,344 **** return; } ! else if(k > data[max-1].key) { _toright(k,t); return; --- 340,344 ---- return; } ! else if(k > data[tsize-1].key) { _toright(k,t); return; *************** *** 380,385 **** // insert new slot by shifting the higher ones FLEXT_ASSERT(k < dk); ! if(n == max) ! _toright(data[max-1]); else ++n; --- 380,385 ---- // insert new slot by shifting the higher ones FLEXT_ASSERT(k < dk); ! if(n == tsize) ! _toright(data[tsize-1]); else ++n; *************** *** 394,398 **** { FLEXT_ASSERT(n); ! if(n < max) { // fall through } --- 394,398 ---- { FLEXT_ASSERT(n); ! if(n < tsize) { // fall through }