aboutsummaryrefslogtreecommitdiff
path: root/externals/grill
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2002-12-02 17:32:50 +0000
committerThomas Grill <xovo@users.sourceforge.net>2002-12-02 17:32:50 +0000
commit4985ae92eea0eb7609a2449d7e147f69b7134b50 (patch)
tree83343cd73cec64d66b4a347612f8937643c04918 /externals/grill
parent7017ea71b842451548451125d10acd5c27086e3b (diff)
*** empty log message ***
svn path=/trunk/; revision=265
Diffstat (limited to 'externals/grill')
-rw-r--r--externals/grill/flext/flext.cwbin84136 -> 163616 bytes
-rw-r--r--externals/grill/flext/readme.txt1
-rw-r--r--externals/grill/flext/source/flbase.h4
-rw-r--r--externals/grill/flext/source/flclass.h16
-rwxr-xr-xexternals/grill/flext/source/flcwmax-x-thr.h30
-rwxr-xr-xexternals/grill/flext/source/flcwmax-x.h (renamed from externals/grill/flext/source/flcwmax-thr.h)9
-rw-r--r--externals/grill/flext/source/flcwmax.h32
-rw-r--r--externals/grill/flext/source/flext.cpp2
-rw-r--r--externals/grill/flext/source/flext.h7
-rw-r--r--externals/grill/flext/source/flstdc.h4
-rw-r--r--externals/grill/flext/source/flsupport.h3
-rwxr-xr-xexternals/grill/flext/tutorial/adv1/adv1.cwbin64204 -> 102477 bytes
-rwxr-xr-xexternals/grill/flext/tutorial/attr1/attr1.cwbin64204 -> 101183 bytes
-rwxr-xr-xexternals/grill/flext/tutorial/attr2/attr2.cwbin64204 -> 101183 bytes
-rwxr-xr-xexternals/grill/flext/tutorial/lib1/lib1.cwbin64204 -> 101183 bytes
-rw-r--r--externals/grill/flext/tutorial/signal1/signal1.cwbin64204 -> 101183 bytes
-rw-r--r--externals/grill/flext/tutorial/signal2/signal2.cwbin64204 -> 101183 bytes
-rwxr-xr-xexternals/grill/flext/tutorial/simple1/simple1.cwbin64204 -> 101183 bytes
-rwxr-xr-xexternals/grill/flext/tutorial/simple2/simple2.cwbin64204 -> 101183 bytes
-rw-r--r--externals/grill/flext/tutorial/simple3/simple3.cwbin64204 -> 101183 bytes
-rw-r--r--externals/grill/flext/tutorial/thread1/thread1.cwbin89119 -> 67826 bytes
-rwxr-xr-xexternals/grill/flext/tutorial/thread2/thread2.cwbin89119 -> 67800 bytes
22 files changed, 80 insertions, 28 deletions
diff --git a/externals/grill/flext/flext.cw b/externals/grill/flext/flext.cw
index 528e7d49..75210fc4 100644
--- a/externals/grill/flext/flext.cw
+++ b/externals/grill/flext/flext.cw
Binary files 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 <pthread.h>
-#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 <pthread.h>
-#include <sched.h>
-#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-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-thr.h b/externals/grill/flext/source/flcwmax-x.h
index 1a9ecffb..1887c6e3 100755
--- a/externals/grill/flext/source/flcwmax-thr.h
+++ b/externals/grill/flext/source/flcwmax-x.h
@@ -8,12 +8,13 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
-// This is the prefix file for CodeWarrior projects - threaded version
+// This is the prefix file for CodeWarrior projects - OS X version
-#ifndef _FLEXT_CW_MAX_THR_H
-#define _FLEXT_CW_MAX_THR_H
+#ifndef _FLEXT_CW_MAX_X_H
+#define _FLEXT_CW_MAX_X_H
-#define FLEXT_THREADS
+#define TARGET_API_MAC_CARBON 1
+#define _POSIX_C_SOURCE
#include "flcwmax.h"
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 <MacHeaders.h>
-
-#define MAXMSP
+#ifndef __MWERKS__
+ #error "This header file is for CodeWarrior only."
+#endif
-#if !defined(__OPTIMIZE__) || __OPTIMIZE__ == 0
-#define _DEBUG
+#ifndef _CW_NOPRECOMP
+ #include <MacHeaders.h>
+#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 <pthread.h>
+#include <sched.h>
+#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
@@ -172,6 +172,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); }
//! Check whether the atom is nothing
diff --git a/externals/grill/flext/tutorial/adv1/adv1.cw b/externals/grill/flext/tutorial/adv1/adv1.cw
index 8b18e78f..69e479a1 100755
--- a/externals/grill/flext/tutorial/adv1/adv1.cw
+++ b/externals/grill/flext/tutorial/adv1/adv1.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/attr1/attr1.cw b/externals/grill/flext/tutorial/attr1/attr1.cw
index b56a0139..3b6f2334 100755
--- a/externals/grill/flext/tutorial/attr1/attr1.cw
+++ b/externals/grill/flext/tutorial/attr1/attr1.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/attr2/attr2.cw b/externals/grill/flext/tutorial/attr2/attr2.cw
index 77c70bc5..150ff981 100755
--- a/externals/grill/flext/tutorial/attr2/attr2.cw
+++ b/externals/grill/flext/tutorial/attr2/attr2.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/lib1/lib1.cw b/externals/grill/flext/tutorial/lib1/lib1.cw
index 3e67422c..98828b81 100755
--- a/externals/grill/flext/tutorial/lib1/lib1.cw
+++ b/externals/grill/flext/tutorial/lib1/lib1.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/signal1/signal1.cw b/externals/grill/flext/tutorial/signal1/signal1.cw
index cb5b5ce5..8385296a 100644
--- a/externals/grill/flext/tutorial/signal1/signal1.cw
+++ b/externals/grill/flext/tutorial/signal1/signal1.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/signal2/signal2.cw b/externals/grill/flext/tutorial/signal2/signal2.cw
index f631a7c4..5199aff1 100644
--- a/externals/grill/flext/tutorial/signal2/signal2.cw
+++ b/externals/grill/flext/tutorial/signal2/signal2.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/simple1/simple1.cw b/externals/grill/flext/tutorial/simple1/simple1.cw
index d54fb1ff..429c07f3 100755
--- a/externals/grill/flext/tutorial/simple1/simple1.cw
+++ b/externals/grill/flext/tutorial/simple1/simple1.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/simple2/simple2.cw b/externals/grill/flext/tutorial/simple2/simple2.cw
index af75e581..02837e57 100755
--- a/externals/grill/flext/tutorial/simple2/simple2.cw
+++ b/externals/grill/flext/tutorial/simple2/simple2.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/simple3/simple3.cw b/externals/grill/flext/tutorial/simple3/simple3.cw
index 2b5bfb90..d0038bc9 100644
--- a/externals/grill/flext/tutorial/simple3/simple3.cw
+++ b/externals/grill/flext/tutorial/simple3/simple3.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/thread1/thread1.cw b/externals/grill/flext/tutorial/thread1/thread1.cw
index b26ff18b..a50b78a7 100644
--- a/externals/grill/flext/tutorial/thread1/thread1.cw
+++ b/externals/grill/flext/tutorial/thread1/thread1.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/thread2/thread2.cw b/externals/grill/flext/tutorial/thread2/thread2.cw
index b26ff18b..cf05a499 100755
--- a/externals/grill/flext/tutorial/thread2/thread2.cw
+++ b/externals/grill/flext/tutorial/thread2/thread2.cw
Binary files differ