aboutsummaryrefslogtreecommitdiff
path: root/externals
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-08-22 19:20:27 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-08-22 19:20:27 +0000
commit76fd627a763f708d764d5f70b3c71cebc8bdbf4f (patch)
tree40f7433a0581c9015f9e947910a3f61d992c9d64 /externals
parent4cde391f5f1ba80c803fc02adece857e5eb720f7 (diff)
adapted for pd-devel 0.39
- better handling of click callback - more compatible handling of attributes in patcher (hiding is now an option - define FLEXT_ATTRHIDE) added flfeatures.h for compile-time version-specific feature detection changes for devel_0_39 support svn path=/trunk/; revision=3445
Diffstat (limited to 'externals')
-rw-r--r--externals/grill/flext/changes.txt1
-rw-r--r--externals/grill/flext/flext.vcproj6
-rw-r--r--externals/grill/flext/package.txt5
-rw-r--r--externals/grill/flext/source/flbuf.cpp22
-rw-r--r--externals/grill/flext/source/flfeatures.h34
5 files changed, 47 insertions, 21 deletions
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt
index 95fa2879..516e10ca 100644
--- a/externals/grill/flext/changes.txt
+++ b/externals/grill/flext/changes.txt
@@ -14,6 +14,7 @@ Version history:
- added GetCanvasDir to retrieve folder in which the patcher resides
- better handling of click callback
- more compatible handling of attributes in patcher (hiding is now an option - define FLEXT_ATTRHIDE)
+- added header file flfeatures.h for compile-time detection of version-specific features
0.5.0:
- fixes for 64 bit builds (size_t is integer type of pointer size)
diff --git a/externals/grill/flext/flext.vcproj b/externals/grill/flext/flext.vcproj
index f73c2a09..4dde8462 100644
--- a/externals/grill/flext/flext.vcproj
+++ b/externals/grill/flext/flext.vcproj
@@ -122,9 +122,9 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="c:\data\pd\pd-cvs\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;xFLEXT_ATTRHIDE;xFLEXT_NOATTREDIT"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;xFLEXT_ATTRHIDE;xFLEXT_NOATTREDIT;_WIN32_WINNT=0x501"
BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ RuntimeLibrary="3"
RuntimeTypeInfo="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="flext.h"
@@ -691,7 +691,7 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll
FavorSizeOrSpeed="0"
EnableFiberSafeOptimizations="FALSE"
AdditionalIncludeDirectories="&quot;C:\data\prog\audio\maxmspsdk_win\4.5 headers\c74support\max-includes&quot;;&quot;C:\data\prog\audio\maxmspsdk_win\4.5 headers\c74support\msp-includes&quot;;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_MAX;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_MAX;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;_WIN32_WINNT=0x501"
StringPooling="TRUE"
RuntimeLibrary="1"
StructMemberAlignment="2"
diff --git a/externals/grill/flext/package.txt b/externals/grill/flext/package.txt
index 01f0d076..c4b2d9a9 100644
--- a/externals/grill/flext/package.txt
+++ b/externals/grill/flext/package.txt
@@ -33,7 +33,9 @@ SRCS= \
flatom_part.cpp flitem.cpp flmeth.cpp flmsg.cpp \
flproxy.cpp flqueue.cpp flbind.cpp flmap.cpp
HDRS= \
- flprefix.h flstdc.h flbase.h flclass.h flext.h flsupport.h flmap.h fldsp.h flinternal.h flcontainers.h \
+ flext.h flprefix.h flstdc.h flinternal.h flfeatures.h \
+ flbase.h flclass.h flsupport.h fldsp.h \
+ flmap.h flcontainers.h \
fldefs.h fldefs_hdr.h fldefs_setup.h \
fldefs_methcb.h fldefs_meththr.h fldefs_methadd.h fldefs_methbind.h fldefs_methcall.h \
fldefs_attrcb.h fldefs_attrvar.h fldefs_attradd.h
@@ -43,5 +45,4 @@ SRCS_SNDOBJ=flsndobj.cpp
HDRS_SNDOBJ=flsndobj.h
SRCS_STK=flstk.cpp
-
HDRS_STK=flstk.h
diff --git a/externals/grill/flext/source/flbuf.cpp b/externals/grill/flext/source/flbuf.cpp
index c19909b8..529d32d0 100644
--- a/externals/grill/flext/source/flbuf.cpp
+++ b/externals/grill/flext/source/flbuf.cpp
@@ -13,6 +13,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
#include "flext.h"
+#include "flfeatures.h"
#if FLEXT_SYS != FLEXT_SYS_JMAX
@@ -20,15 +21,6 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#define DIRTY_INTERVAL 0 // buffer dirty check in msec
#endif
-// check if PD API supports buffer dirty time
-#if defined(PD_DEVEL_VERSION) && defined(PD_MAJOR_VERSION) && defined(PD_MINOR_VERSION)
-#if PD_MINOR_VERSION >= 36 && PD_MINOR_VERSION <= 38
-// garray_updatetime has been removed in devel_0_39
- #define FLEXT_HAVE_GARRAYUPDATETIME
- #define FLEXT_HAVE_GARRAYLOCKS
-#endif
-#endif
-
#if FLEXT_SYS == FLEXT_SYS_MAX
// defined in flsupport.cpp
extern const t_symbol *sym_buffer,*sym_size;
@@ -184,19 +176,18 @@ flext::buffer::lock_t flext::buffer::Lock()
FLEXT_ASSERT(sym);
#if FLEXT_SYS == FLEXT_SYS_PD
FLEXT_ASSERT(arr);
-#ifdef FLEXT_HAVE_GARRAYLOCKS
+#ifdef _FLEXT_HAVE_PD_GARRAYLOCKS
garray_lock(arr);
#endif
return false;
#elif FLEXT_SYS == FLEXT_SYS_MAX
t_buffer *p = (t_buffer *)sym->s_thing;
FLEXT_ASSERT(p);
-#if defined(MAC_VERSION) || defined(WIN_VERSION)
+#ifdef _FLEXT_HAVE_MAX_INUSEFLAG
long old = p->b_inuse;
p->b_inuse = 1;
return old;
#else
- // undefined for OS9
return 0;
#endif
#else
@@ -209,14 +200,13 @@ void flext::buffer::Unlock(flext::buffer::lock_t prv)
FLEXT_ASSERT(sym);
#if FLEXT_SYS == FLEXT_SYS_PD
FLEXT_ASSERT(arr);
-#ifdef FLEXT_HAVE_GARRAYLOCKS
+#ifdef _FLEXT_HAVE_PD_GARRAYLOCKS
garray_unlock(arr);
#endif
#elif FLEXT_SYS == FLEXT_SYS_MAX
t_buffer *p = (t_buffer *)sym->s_thing;
FLEXT_ASSERT(p);
-#if defined(MAC_VERSION) || defined(WIN_VERSION)
- // not for OS9
+#ifdef _FLEXT_HAVE_MAX_INUSEFLAG
p->b_inuse = prv;
#endif
#else
@@ -339,7 +329,7 @@ bool flext::buffer::IsDirty() const
FLEXT_ASSERT(sym);
#if FLEXT_SYS == FLEXT_SYS_PD
FLEXT_ASSERT(arr);
- #ifdef FLEXT_HAVE_GARRAYUPDATETIME
+ #ifdef _FLEXT_HAVE_PD_GARRAYUPDATETIME
return isdirty || garray_updatetime(arr) > cleantime;
#else
// Don't know.... (no method in PD judging whether buffer has been changed from outside flext...)
diff --git a/externals/grill/flext/source/flfeatures.h b/externals/grill/flext/source/flfeatures.h
new file mode 100644
index 00000000..915f44a9
--- /dev/null
+++ b/externals/grill/flext/source/flfeatures.h
@@ -0,0 +1,34 @@
+/*
+
+flext - C++ layer for Max/MSP and pd (pure data) externals
+
+Copyright (c) 2001-2005 Thomas Grill (gr@grrrr.org)
+For information on usage and redistribution, and for a DISCLAIMER OF ALL
+WARRANTIES, see the file, "license.txt," in this distribution.
+
+*/
+
+/*! \file flfeatures.h
+ \brief Detect version-specific features.
+*/
+
+#ifndef __FLFEATURES_H
+#define __FLFEATURES_H
+
+// check if PD API supports buffer dirty time
+#if defined(PD_DEVEL_VERSION) && defined(PD_MAJOR_VERSION) && defined(PD_MINOR_VERSION)
+#if PD_MINOR_VERSION >= 36 && PD_MINOR_VERSION <= 38
+// array locks have been removed in devel_0_39
+ #define _FLEXT_HAVE_PD_GARRAYLOCKS
+#endif
+#if PD_MINOR_VERSION >= 36
+ #define _FLEXT_HAVE_PD_GARRAYUPDATETIME
+#endif
+#endif
+
+#if defined(MAC_VERSION) || defined(WIN_VERSION)
+ // not for OS9
+ #define _FLEXT_HAVE_MAX_INUSEFLAG
+#endif
+
+#endif