From 4985ae92eea0eb7609a2449d7e147f69b7134b50 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 2 Dec 2002 17:32:50 +0000 Subject: *** empty log message *** svn path=/trunk/; revision=265 --- externals/grill/flext/flext.cw | Bin 84136 -> 163616 bytes externals/grill/flext/readme.txt | 1 + externals/grill/flext/source/flbase.h | 4 --- externals/grill/flext/source/flclass.h | 16 ++++------- externals/grill/flext/source/flcwmax-thr.h | 20 -------------- externals/grill/flext/source/flcwmax-x-thr.h | 30 ++++++++++++++++++++ externals/grill/flext/source/flcwmax-x.h | 21 ++++++++++++++ externals/grill/flext/source/flcwmax.h | 32 ++++++++++++++++++---- externals/grill/flext/source/flext.cpp | 2 +- externals/grill/flext/source/flext.h | 7 +++++ externals/grill/flext/source/flstdc.h | 4 --- externals/grill/flext/source/flsupport.h | 3 ++ externals/grill/flext/tutorial/adv1/adv1.cw | Bin 64204 -> 102477 bytes externals/grill/flext/tutorial/attr1/attr1.cw | Bin 64204 -> 101183 bytes externals/grill/flext/tutorial/attr2/attr2.cw | Bin 64204 -> 101183 bytes externals/grill/flext/tutorial/lib1/lib1.cw | Bin 64204 -> 101183 bytes externals/grill/flext/tutorial/signal1/signal1.cw | Bin 64204 -> 101183 bytes externals/grill/flext/tutorial/signal2/signal2.cw | Bin 64204 -> 101183 bytes externals/grill/flext/tutorial/simple1/simple1.cw | Bin 64204 -> 101183 bytes externals/grill/flext/tutorial/simple2/simple2.cw | Bin 64204 -> 101183 bytes externals/grill/flext/tutorial/simple3/simple3.cw | Bin 64204 -> 101183 bytes externals/grill/flext/tutorial/thread1/thread1.cw | Bin 89119 -> 67826 bytes externals/grill/flext/tutorial/thread2/thread2.cw | Bin 89119 -> 67800 bytes 23 files changed, 96 insertions(+), 44 deletions(-) delete mode 100755 externals/grill/flext/source/flcwmax-thr.h create mode 100755 externals/grill/flext/source/flcwmax-x-thr.h create mode 100755 externals/grill/flext/source/flcwmax-x.h (limited to 'externals/grill/flext') diff --git a/externals/grill/flext/flext.cw b/externals/grill/flext/flext.cw index 528e7d49..75210fc4 100644 Binary files a/externals/grill/flext/flext.cw and b/externals/grill/flext/flext.cw differ diff --git a/externals/grill/flext/readme.txt b/externals/grill/flext/readme.txt index a0d06a2e..12afcdd0 100644 --- a/externals/grill/flext/readme.txt +++ b/externals/grill/flext/readme.txt @@ -97,6 +97,7 @@ Version history: 0.4.1: - fixed crash issue in flext_dsp when there are NO signal inlets or outlets defined (this is possibly only a problem for the signal2 tutorial example) +- added flext::GetType(t_atom &) 0.4.0: - the use of the const keyword is enforced (e.g. the preferred type for symbols is now "const t_symbol *") diff --git a/externals/grill/flext/source/flbase.h b/externals/grill/flext/source/flbase.h index 21f96aaf..cf973a41 100644 --- a/externals/grill/flext/source/flbase.h +++ b/externals/grill/flext/source/flbase.h @@ -20,10 +20,6 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "flstdc.h" #include "flsupport.h" -#ifdef FLEXT_THREADS -#include -#endif - class flext_obj; // ---------------------------------------------------------------------------- diff --git a/externals/grill/flext/source/flclass.h b/externals/grill/flext/source/flclass.h index f9b3deec..8c14e6b8 100644 --- a/externals/grill/flext/source/flclass.h +++ b/externals/grill/flext/source/flclass.h @@ -20,11 +20,6 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "flbase.h" #include "flsupport.h" -#ifdef FLEXT_THREADS -#include -#include -#endif - #ifdef _MSC_VER #pragma warning(disable: 4786) #endif @@ -410,6 +405,10 @@ public: typedef pthread_t thrid_t; + /*! \brief Get current thread id + */ + static thrid_t GetThreadId(); + /*! \brief Increase/Decrease priority of a thread */ static bool ChangePriority(int dp,thrid_t thr = GetThreadId()); @@ -422,10 +421,6 @@ public: */ static bool SetPriority(int p,thrid_t thr = GetThreadId()); - /*! \brief Get current thread id - */ - static thrid_t GetThreadId(); - #endif // FLEXT_THREADS @@ -442,7 +437,8 @@ protected: /*! \brief Thread parameters \internal */ - class thr_params + class thr_params: + public flext { public: thr_params(flext_base *c,int n = 1); diff --git a/externals/grill/flext/source/flcwmax-thr.h b/externals/grill/flext/source/flcwmax-thr.h deleted file mode 100755 index 1a9ecffb..00000000 --- a/externals/grill/flext/source/flcwmax-thr.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - -flext - C++ layer for Max/MSP and pd (pure data) externals - -Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. - -*/ - -// This is the prefix file for CodeWarrior projects - threaded version - -#ifndef _FLEXT_CW_MAX_THR_H -#define _FLEXT_CW_MAX_THR_H - -#define FLEXT_THREADS - -#include "flcwmax.h" - -#endif diff --git a/externals/grill/flext/source/flcwmax-x-thr.h b/externals/grill/flext/source/flcwmax-x-thr.h new file mode 100755 index 00000000..a5f105a2 --- /dev/null +++ b/externals/grill/flext/source/flcwmax-x-thr.h @@ -0,0 +1,30 @@ +/* + +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +*/ + +// This is the prefix file for CodeWarrior projects - threaded version + +#ifndef _FLEXT_CW_MAX_X_THR_H +#define _FLEXT_CW_MAX_X_THR_H + +#define FLEXT_THREADS +#define _POSIX_THREADS + +/* + old CodeWarrior version (<= 6) don't have sigset_t defined which + is needed for pthreads +*/ +#if defined(__MWERKS__) && (__MWERKS__ <= 0x6000) + typedef unsigned int sigset_t; + #define _CW_NOPRECOMP // no precompiled headers +#endif + +#include "flcwmax-x.h" + +#endif diff --git a/externals/grill/flext/source/flcwmax-x.h b/externals/grill/flext/source/flcwmax-x.h new file mode 100755 index 00000000..1887c6e3 --- /dev/null +++ b/externals/grill/flext/source/flcwmax-x.h @@ -0,0 +1,21 @@ +/* + +flext - C++ layer for Max/MSP and pd (pure data) externals + +Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +*/ + +// This is the prefix file for CodeWarrior projects - OS X version + +#ifndef _FLEXT_CW_MAX_X_H +#define _FLEXT_CW_MAX_X_H + +#define TARGET_API_MAC_CARBON 1 +#define _POSIX_C_SOURCE + +#include "flcwmax.h" + +#endif diff --git a/externals/grill/flext/source/flcwmax.h b/externals/grill/flext/source/flcwmax.h index 5ef0b298..184803ff 100644 --- a/externals/grill/flext/source/flcwmax.h +++ b/externals/grill/flext/source/flcwmax.h @@ -13,14 +13,36 @@ WARRANTIES, see the file, "license.txt," in this distribution. #ifndef _FLEXT_CW_MAX_H #define _FLEXT_CW_MAX_H -#include - -#define MAXMSP +#ifndef __MWERKS__ + #error "This header file is for CodeWarrior only." +#endif -#if !defined(__OPTIMIZE__) || __OPTIMIZE__ == 0 -#define _DEBUG +#ifndef _CW_NOPRECOMP + #include +#endif + +#if __option(sym) || !__option(opt_dead_code) + #define _DEBUG #endif +#ifdef MAXMSP + #pragma message("#define MAXMSP is deprecated, use #define FLEXT_SYS_MAX instead") +#else + #define FLEXT_SYS_MAX + // this is deprecated (but still necessary) + #define MAXMSP +#endif + +#if __POWERPC__ + #define FLEXT_PLATFORM_MAC +#elif __INTEL__ + #define FLEXT_PLATFORM_WIN + // this is necessary for Cycling headers when compiling for Windows + #define WIN_VERSION 1 +#else + #error "Target platform not supported." +#endif + /* #define _LOG */ #endif diff --git a/externals/grill/flext/source/flext.cpp b/externals/grill/flext/source/flext.cpp index 82ccdaba..85f3da6e 100644 --- a/externals/grill/flext/source/flext.cpp +++ b/externals/grill/flext/source/flext.cpp @@ -149,7 +149,7 @@ flext_base::~flext_base() shouldexit = true; for(int wi = 0; thrhead && wi < 100; ++wi) Sleep(0.01f); -#ifdef PD +#ifdef _POSIX_THREADS qmutex.Lock(); // Lock message queue tlmutex.Lock(); // timeout -> hard termination diff --git a/externals/grill/flext/source/flext.h b/externals/grill/flext/source/flext.h index 402a2a93..c1cd7597 100644 --- a/externals/grill/flext/source/flext.h +++ b/externals/grill/flext/source/flext.h @@ -31,6 +31,13 @@ WARRANTIES, see the file, "license.txt," in this distribution. //! @} + +#ifdef FLEXT_THREADS +#include +#include +#endif + + // include all the flext interface definitions #include "fldefs.h" diff --git a/externals/grill/flext/source/flstdc.h b/externals/grill/flext/source/flstdc.h index f4e7ea48..4031dda1 100644 --- a/externals/grill/flext/source/flstdc.h +++ b/externals/grill/flext/source/flstdc.h @@ -115,11 +115,7 @@ typedef t_symbol *t_symptr; typedef t_symbol *t_symtype; typedef t_object *t_thing; -#ifdef MAC_VERSION -typedef void t_qelem; -#else typedef qelem t_qelem; -#endif typedef method t_method; typedef method t_newmethod; diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h index 04d447ed..d8dce68d 100644 --- a/externals/grill/flext/source/flsupport.h +++ b/externals/grill/flext/source/flsupport.h @@ -171,6 +171,9 @@ public: // --- atom stuff ---------------------------------------- + //! Set atom from another atom + static int GetType(const t_atom &a) { return a.a_type; } + //! Set atom from another atom static void SetAtom(t_atom &a,const t_atom &b) { CopyAtom(&a,&b); } diff --git a/externals/grill/flext/tutorial/adv1/adv1.cw b/externals/grill/flext/tutorial/adv1/adv1.cw index 8b18e78f..69e479a1 100755 Binary files a/externals/grill/flext/tutorial/adv1/adv1.cw and b/externals/grill/flext/tutorial/adv1/adv1.cw differ diff --git a/externals/grill/flext/tutorial/attr1/attr1.cw b/externals/grill/flext/tutorial/attr1/attr1.cw index b56a0139..3b6f2334 100755 Binary files a/externals/grill/flext/tutorial/attr1/attr1.cw and b/externals/grill/flext/tutorial/attr1/attr1.cw differ diff --git a/externals/grill/flext/tutorial/attr2/attr2.cw b/externals/grill/flext/tutorial/attr2/attr2.cw index 77c70bc5..150ff981 100755 Binary files a/externals/grill/flext/tutorial/attr2/attr2.cw and b/externals/grill/flext/tutorial/attr2/attr2.cw differ diff --git a/externals/grill/flext/tutorial/lib1/lib1.cw b/externals/grill/flext/tutorial/lib1/lib1.cw index 3e67422c..98828b81 100755 Binary files a/externals/grill/flext/tutorial/lib1/lib1.cw and b/externals/grill/flext/tutorial/lib1/lib1.cw differ diff --git a/externals/grill/flext/tutorial/signal1/signal1.cw b/externals/grill/flext/tutorial/signal1/signal1.cw index cb5b5ce5..8385296a 100644 Binary files a/externals/grill/flext/tutorial/signal1/signal1.cw and b/externals/grill/flext/tutorial/signal1/signal1.cw differ diff --git a/externals/grill/flext/tutorial/signal2/signal2.cw b/externals/grill/flext/tutorial/signal2/signal2.cw index f631a7c4..5199aff1 100644 Binary files a/externals/grill/flext/tutorial/signal2/signal2.cw and b/externals/grill/flext/tutorial/signal2/signal2.cw differ diff --git a/externals/grill/flext/tutorial/simple1/simple1.cw b/externals/grill/flext/tutorial/simple1/simple1.cw index d54fb1ff..429c07f3 100755 Binary files a/externals/grill/flext/tutorial/simple1/simple1.cw and b/externals/grill/flext/tutorial/simple1/simple1.cw differ diff --git a/externals/grill/flext/tutorial/simple2/simple2.cw b/externals/grill/flext/tutorial/simple2/simple2.cw index af75e581..02837e57 100755 Binary files a/externals/grill/flext/tutorial/simple2/simple2.cw and b/externals/grill/flext/tutorial/simple2/simple2.cw differ diff --git a/externals/grill/flext/tutorial/simple3/simple3.cw b/externals/grill/flext/tutorial/simple3/simple3.cw index 2b5bfb90..d0038bc9 100644 Binary files a/externals/grill/flext/tutorial/simple3/simple3.cw and b/externals/grill/flext/tutorial/simple3/simple3.cw differ diff --git a/externals/grill/flext/tutorial/thread1/thread1.cw b/externals/grill/flext/tutorial/thread1/thread1.cw index b26ff18b..a50b78a7 100644 Binary files a/externals/grill/flext/tutorial/thread1/thread1.cw and b/externals/grill/flext/tutorial/thread1/thread1.cw differ diff --git a/externals/grill/flext/tutorial/thread2/thread2.cw b/externals/grill/flext/tutorial/thread2/thread2.cw index b26ff18b..cf05a499 100755 Binary files a/externals/grill/flext/tutorial/thread2/thread2.cw and b/externals/grill/flext/tutorial/thread2/thread2.cw differ -- cgit v1.2.1