Update of /cvsroot/pure-data/externals/grill/flext/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21607/source
Modified Files: flbase.h flbind.cpp flclass.h flcontainers.h fldoxygen.h flext.h flitem.cpp flmap.h flprefix.h flsupport.h flthr.cpp Log Message: changed initialization functions accordingly FIFO code with mutex lock c++ conformance fix fixes for Codewarrior updates for OSX extracted maps into flmap.h fix for BCC made flext::Forward threadsafe don't install build system yet digest one-element list messages as single atoms updated tutorials fixes for MSVC6 documentation slimmed object data structures simplified message analysis corrected flext version to 0.4.5 added X86-64 code for lockfree fifos preparation of release upgraded version number
Index: flmap.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flmap.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** flmap.h 23 May 2005 16:52:45 -0000 1.21 --- flmap.h 6 Jul 2005 16:08:19 -0000 1.22 *************** *** 189,193 **** class TablePtrMap : ! #if defined(_MSC_VER) && _MSC_VER < 1300 public // necessary for VC6 #endif --- 189,193 ---- class TablePtrMap : ! #if (defined(_MSC_VER) && _MSC_VER < 1300) || defined(__BORLANDC__) || defined(__MWERKS__) public // necessary for VC6 #endif
Index: flsupport.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.h,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** flsupport.h 8 Jun 2005 14:42:15 -0000 1.93 --- flsupport.h 6 Jul 2005 16:08:20 -0000 1.94 *************** *** 54,59 **** --- 54,61 ---- void operator delete(void *blk);
+ #ifndef __BORLANDC__ inline void *operator new(size_t,void *p) { return p; } inline void operator delete(void *,void *) {} + #endif
#ifdef FLEXT_DEBUGMEM *************** *** 63,73 **** #endif
! #ifndef __MRC__ // doesn't allow new[] overloading?! inline void *operator new[](size_t bytes) { return operator new(bytes); } inline void operator delete[](void *blk) { operator delete(blk); }
inline void *operator new[](size_t,void *p) { return p; } inline void operator delete[](void *,void *) {} ! #endif
//! Get an aligned memory block --- 65,77 ---- #endif
! #ifndef __MRC__ // doesn't allow new[] overloading?! inline void *operator new[](size_t bytes) { return operator new(bytes); } inline void operator delete[](void *blk) { operator delete(blk); }
+ #ifndef __BORLANDC__ inline void *operator new[](size_t,void *p) { return p; } inline void operator delete[](void *,void *) {} ! #endif ! #endif
//! Get an aligned memory block
Index: flcontainers.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flcontainers.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** flcontainers.h 10 May 2005 10:56:47 -0000 1.6 --- flcontainers.h 6 Jul 2005 16:08:19 -0000 1.7 *************** *** 308,313 ****
inline size_t Size() const { return oc; } #else ! #error Platform not supported #endif
--- 308,354 ----
inline size_t Size() const { return oc; } + #else ! // no lock free code available for this compiler/platform ! ! inline void Push(Cell *c) ! { ! #ifdef FLEXT_THREADS ! mutex.Lock(); ! #endif ! c->link = (Cell *)top; ! top = c; ! ++oc; ! #ifdef FLEXT_THREADS ! mutex.Unlock(); ! #endif ! } ! ! inline Cell *Pop() ! { ! if(top) { ! Cell *r; ! #ifdef FLEXT_THREADS ! mutex.Lock(); ! #endif ! r = (Cell *)top; ! top = r->link; ! --oc; ! #ifdef FLEXT_THREADS ! mutex.Unlock(); ! #endif ! return r; ! } ! else ! return NULL; ! } ! ! inline size_t Size() const { return oc; } ! ! private: ! #ifdef FLEXT_THREADS ! flext::ThrMutex mutex; ! #endif ! #endif
Index: flbase.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flbase.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** flbase.h 23 May 2005 16:52:44 -0000 1.31 --- flbase.h 6 Jul 2005 16:08:04 -0000 1.32 *************** *** 95,104 **** public:
- /*! \defgroup FLEXT_OBJCLASS Object base class - @{ - */ // --- creation -------------------------------------------------------
! /*! \defgroup FLEXT_O_CREATION Creation/Destruction functionality @{ */ --- 95,101 ---- public:
// --- creation -------------------------------------------------------
! /*! \defgroup FLEXT_OBJ_CREATION Object creation/destruction functionality @{ */ *************** *** 130,138 **** virtual void Exit();
! //! @} FLEXT_O_CREATION
// --- info -------------------------------------------------------
! /*! \defgroup FLEXT_O_INFO Get various information @{ */ --- 127,135 ---- virtual void Exit();
! //! @} FLEXT_OBJ_CREATION
// --- info -------------------------------------------------------
! /*! \defgroup FLEXT_OBJ_INFO Get various information @{ */ *************** *** 162,170 **** bool HasAttributes() const;
! //! @} FLEXT_O_INFO
// --- help -------------------------------------------------------
! /*! \defgroup FLEXT_O_HELP Help/assistance functionality \remark This is still PD only @{ --- 159,167 ---- bool HasAttributes() const;
! //! @} FLEXT_OBJ_INFO
// --- help -------------------------------------------------------
! /*! \defgroup FLEXT_OBJ_HELP Help/assistance functionality \remark This is still PD only @{ *************** *** 179,188 **** void DefineHelp(const char *ref,const char *dir = NULL,bool addtilde = false) { DefineHelp(thisClassId(),ref,dir,addtilde); }
! //! @}
// --- internal stuff -------------------------------------------------------
! /*! \defgroup FLEXT_O_INTERNAL Internal stuff \internal @{ --- 176,185 ---- void DefineHelp(const char *ref,const char *dir = NULL,bool addtilde = false) { DefineHelp(thisClassId(),ref,dir,addtilde); }
! //! @} FLEXT_OBJ_HELP
// --- internal stuff -------------------------------------------------------
! /*! \defgroup FLEXT_OBJ_INTERNAL Internal stuff \internal @{ *************** *** 263,269 **** void CanvasArgs(AtomList &args) const;
! //! @} FLEXT_O_INTERNAL ! ! //! @} FLEXT_OBJCLASS };
--- 260,264 ---- void CanvasArgs(AtomList &args) const;
! //! @} FLEXT_OBJ_INTERNAL };
Index: flbind.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flbind.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** flbind.cpp 16 Apr 2005 21:35:06 -0000 1.20 --- flbind.cpp 6 Jul 2005 16:08:19 -0000 1.21 *************** *** 189,193 **** if(fun) { // check if function matches ! for(; it && static_cast<BindItem *>(it)->fun != fun; it = it->nxt); } item = static_cast<BindItem *>(it); --- 189,193 ---- if(fun) { // check if function matches ! for(; it && static_cast<BindItem *>(it)->fun != fun; it = it->nxt) {} } item = static_cast<BindItem *>(it);
Index: flext.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flext.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** flext.h 23 May 2005 16:52:45 -0000 1.25 --- flext.h 6 Jul 2005 16:08:19 -0000 1.26 *************** *** 27,31 ****
//! \brief flext version string ! #define FLEXT_VERSTR "0.5.0pre"
//! @} --- 27,31 ----
//! \brief flext version string ! #define FLEXT_VERSTR "0.5.0"
//! @}
Index: flprefix.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flprefix.h,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** flprefix.h 31 Mar 2005 03:52:38 -0000 1.33 --- flprefix.h 6 Jul 2005 16:08:19 -0000 1.34 *************** *** 365,369 **** Therefore different class names are used so that the correct type of flext function is called. */ ! #if defined(FLEXT_SHARED) #define FLEXT_CLASSDEF(CL) CL##_shared #elif defined(FLEXT_THREADS) --- 365,371 ---- Therefore different class names are used so that the correct type of flext function is called. */ ! #ifdef __DOXYGEN__ ! #define FLEXT_CLASSDEF(CL) CL ! #elif defined(FLEXT_SHARED) #define FLEXT_CLASSDEF(CL) CL##_shared #elif defined(FLEXT_THREADS)
Index: fldoxygen.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/fldoxygen.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** fldoxygen.h 26 Jan 2005 05:01:45 -0000 1.10 --- fldoxygen.h 6 Jul 2005 16:08:19 -0000 1.11 *************** *** 15,19 **** Currently there exist two widely used modular systems for real-time audio that can be extended by self-written objects (so called "externals"):<br> ! Max/MSP (http://www.cycling74.com) and Pure Data (http://www.pure-data.org).
Both come with APIs that are not very different (as they share their origin), but as well not quite the same. --- 15,19 ---- Currently there exist two widely used modular systems for real-time audio that can be extended by self-written objects (so called "externals"):<br> ! Max/MSP (http://www.cycling74.com) and Pure Data (http://www.pure-data.org) .
Both come with APIs that are not very different (as they share their origin), but as well not quite the same. *************** *** 49,53 **** <li>PD on Windows with Microsoft Visual C++, Borland C++ and gcc(cygwin) compilers <li>PD on Linux with gcc ! <li>PD on Mac OSX with gcc (makefile or Project Builder) <li>Max/MSP on Mac OS9 and OSX with Metrowerks CodeWarrior </ul> --- 49,53 ---- <li>PD on Windows with Microsoft Visual C++, Borland C++ and gcc(cygwin) compilers <li>PD on Linux with gcc ! <li>PD on Mac OSX with gcc (makefile or Xcode) <li>Max/MSP on Mac OS9 and OSX with Metrowerks CodeWarrior </ul> *************** *** 79,83 **** \section DOWNLOAD Download
! Download the latest flext version from http://www.parasitaere-kapazitaeten.net/ext/flext .<br> Alternatively, you can check out the cvs version from http://sourceforge.net/projects/pure-data .
--- 79,83 ---- \section DOWNLOAD Download
! Download the latest flext version from http://grrrr.org/ext/flext .<br> Alternatively, you can check out the cvs version from http://sourceforge.net/projects/pure-data .
Index: flitem.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flitem.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** flitem.cpp 23 May 2005 16:52:45 -0000 1.20 --- flitem.cpp 6 Jul 2005 16:08:19 -0000 1.21 *************** *** 125,127 **** return cont; } ! */ \ No newline at end of file --- 125,127 ---- return cont; } ! */
Index: flthr.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flthr.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** flthr.cpp 7 Jun 2005 14:40:19 -0000 1.31 --- flthr.cpp 6 Jul 2005 16:08:20 -0000 1.32 *************** *** 26,30 **** #include <time.h>
! #if FLEXT_OSAPI == FLEXT_OSAPI_UNIX_POSIX || FLEXT_OSAPI == FLEXT_OSAPI_WIN_POSIX #include <sys/time.h> #include <unistd.h> --- 26,30 ---- #include <time.h>
! #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH || FLEXT_OSAPI == FLEXT_OSAPI_UNIX_POSIX || FLEXT_OSAPI == FLEXT_OSAPI_WIN_POSIX #include <sys/time.h> #include <unistd.h> *************** *** 52,56 **** { public: ! void thr_entry::Set(void (*m)(thr_params *),thr_params *p,thrid_t id = GetThreadId()) { th = p?p->cl:NULL; --- 52,56 ---- { public: ! void Set(void (*m)(thr_params *),thr_params *p,thrid_t id = GetThreadId()) { th = p?p->cl:NULL; *************** *** 92,96 **** while((fnd = Pop()) && !fnd->Is(id)) qutmp.Push(fnd); // put back entries ! for(thr_entry *ti; ti = qutmp.Pop(); ) Push(ti); if(fnd && !pop) Push(fnd); return fnd; --- 92,96 ---- while((fnd = Pop()) && !fnd->Is(id)) qutmp.Push(fnd); // put back entries ! for(thr_entry *ti; (ti = qutmp.Pop()) != NULL; ) Push(ti); if(fnd && !pop) Push(fnd); return fnd; *************** *** 181,185 **** // start all inactive threads thr_entry *ti; ! while(ti = thrpending.Pop()) { bool ok; --- 181,185 ---- // start all inactive threads thr_entry *ti; ! while((ti = thrpending.Pop()) != NULL) { bool ok;
Index: flclass.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flclass.h,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** flclass.h 7 Jun 2005 14:13:43 -0000 1.60 --- flclass.h 6 Jul 2005 16:08:19 -0000 1.61 *************** *** 507,510 **** --- 507,519 ---- // xxx internal stuff xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ public: // needed by VC++ 6 + + enum xlettype { + xlet_none = 0, + xlet_float,xlet_int,xlet_sym,xlet_list,xlet_any, + xlet_LIST,xlet_ANY, // use AtomList and AtomAnything + xlet_sig + }; + protected:
*************** *** 517,527 ****
- enum xlettype { - xlet_none = 0, - xlet_float,xlet_int,xlet_sym,xlet_list,xlet_any, - xlet_LIST,xlet_ANY, // use AtomList and AtomAnything - xlet_sig - }; - /*! \defgroup FLEXT_C_ATTR Attribute handling methods (object scope) @{ --- 526,529 ----