Commit 89694a65 authored by thomas's avatar thomas
Browse files

no message


git-svn-id: https://svn.grrrr.org/ext/trunk@191 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 28067916
......@@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=flext - Win32 Debug
CFG=flext - Win32 Threads Debug
!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
!MESSAGE
......@@ -13,12 +13,14 @@ CFG=flext - Win32 Debug
!MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
!MESSAGE
!MESSAGE NMAKE /f "flext.mak" CFG="flext - Win32 Debug"
!MESSAGE NMAKE /f "flext.mak" CFG="flext - Win32 Threads Debug"
!MESSAGE
!MESSAGE Fr die Konfiguration stehen zur Auswahl:
!MESSAGE
!MESSAGE "flext - Win32 Release" (basierend auf "Win32 (x86) Static Library")
!MESSAGE "flext - Win32 Debug" (basierend auf "Win32 (x86) Static Library")
!MESSAGE "flext - Win32 Threads Debug" (basierend auf "Win32 (x86) Static Library")
!MESSAGE "flext - Win32 Threads Release" (basierend auf "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
......@@ -41,7 +43,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "msvc"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GR /O2 /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /YX /FD /c
# ADD CPP /nologo /W3 /GR /O2 /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /YX /FD /c
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
# ADD RSC /l 0xc07 /d "NDEBUG"
BSC32=bscmake.exe
......@@ -64,7 +66,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "msvc-debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GR /ZI /Od /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /FR /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GR /ZI /Od /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
# ADD RSC /l 0xc07 /d "_DEBUG"
BSC32=bscmake.exe
......@@ -74,12 +76,60 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"msvc-debug\flext-pdwin.lib"
!ELSEIF "$(CFG)" == "flext - Win32 Threads Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "flext___Win32_Threads_Debug"
# PROP BASE Intermediate_Dir "flext___Win32_Threads_Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "flext___Win32_Threads_Debug"
# PROP Intermediate_Dir "flext___Win32_Threads_Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GR /ZI /Od /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /FR /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GR /ZI /Od /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
# ADD RSC /l 0xc07 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"msvc-debug\flext-pdwin.lib"
# ADD LIB32 /nologo /out:"msvc-debug\flext_t-pdwin.lib"
!ELSEIF "$(CFG)" == "flext - Win32 Threads Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "flext___Win32_Threads_Release"
# PROP BASE Intermediate_Dir "flext___Win32_Threads_Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "flext___Win32_Threads_Release"
# PROP Intermediate_Dir "flext___Win32_Threads_Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GR /O2 /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GR /O2 /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /YX /FD /c
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
# ADD RSC /l 0xc07 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"msvc/flext-pdwin.lib"
# ADD LIB32 /nologo /out:"msvc/flext_t-pdwin.lib"
!ENDIF
# Begin Target
# Name "flext - Win32 Release"
# Name "flext - Win32 Debug"
# Name "flext - Win32 Threads Debug"
# Name "flext - Win32 Threads Release"
# Begin Group "doc"
# PROP Default_Filter ""
......@@ -152,5 +202,9 @@ SOURCE=.\flthr.h
SOURCE=.\flutil.cpp
# End Source File
# Begin Source File
SOURCE=.\flxlet.cpp
# End Source File
# End Target
# End Project
......@@ -26,7 +26,7 @@ Package files:
- flmspbuffer.h: MaxMSP's inofficial buffer.h included here for conveniance
> for PD you need the pd source code (which is most likely part of the distribution)
> for Max/MSP you will also need the Max/MSP SDK and http://www.sirius.com/~cycling/objects/index.sit
> for Max/MSP you will also need the Max/MSP SDK (and for threading the GUSI library)
----------------------------------------------------------------------------
......@@ -84,6 +84,7 @@ Version history:
- fixed type warning for class constructors with int arguments in PD
- fixed severe bug concerning symbol methods
- MaxMSP: use critical sections for message output (for more safety in overdrive mode)
- PD: default/manual definition of help file by flext_base::DefineHelp
- introduced FLEXT_NEW_DSP* and FLEXT_LIB_DSP* for FLEXT_NEW_TILDE* and FLEXT_LIB_TILDE* (the latter become deprecated)
- all variable argument defs (aka gimme) now have a V instead of G (e.g. FLEXT_NEW_V)
......
......@@ -101,10 +101,11 @@ void flext_obj::FreeAligned(void *blk)
#ifdef _DEBUG
bool flext_obj::check_tilde(const char *objname,const char *setupfun)
bool flext_obj::check_tilde(const char *objname)
{
int stplen = strlen(setupfun);
bool tilde = !strncmp(setupfun,"_tilde",6);
// int stplen = strlen(setupfun);
bool tilde = true; //!strncmp(setupfun,"_tilde",6);
if((objname[strlen(objname)-1] == '~'?1:0)^(tilde?1:0)) {
if(tilde)
error("flext_obj::check_tilde: %s (no trailing ~) is defined as a tilde object",objname);
......
This diff is collapsed.
......@@ -144,6 +144,11 @@ public:
};
// --- help -------------------------------------------------------
void DefineHelp(const char *ref);
// --- inlet/outlet stuff -----------------------------------------
// define inlets/outlets - all (also default) inlets must be defined
......
......@@ -57,21 +57,21 @@ WARRANTIES, see the file, "license.txt," in this distribution.
//! Implementation of a flext class with no arguments
#define FLEXT_NEW(NAME,NEW_CLASS) \
REAL_NEW(NAME,NEW_CLASS, _setup) \
REAL_EXT(NEW_CLASS, _setup)
REAL_NEW(NAME,NEW_CLASS,0) \
REAL_EXT(NEW_CLASS,0)
//! Implementation of a flext tilde class with no arguments
#define FLEXT_NEW_DSP(NAME,NEW_CLASS) \
REAL_NEW(NAME,NEW_CLASS, _tilde_setup) \
REAL_EXT(NEW_CLASS, _tilde_setup)
REAL_NEW(NAME,NEW_CLASS,1) \
REAL_EXT(NEW_CLASS,1)
//! Implementation of a flext class (part of a library) with no arguments
#define FLEXT_LIB(NAME,NEW_CLASS) \
REAL_LIB(NAME,NEW_CLASS, _setup)
REAL_LIB(NAME,NEW_CLASS,0)
//! Implementation of a flext tilde class (part of a library) with no arguments
#define FLEXT_LIB_DSP(NAME,NEW_CLASS) \
REAL_LIB(NAME,NEW_CLASS, _tilde_setup)
REAL_LIB(NAME,NEW_CLASS,1)
// VARIABLE ARGUMENT LIST
......@@ -79,21 +79,21 @@ REAL_LIB(NAME,NEW_CLASS, _tilde_setup)
//! Implementation of a flext class with a variable argument list
#define FLEXT_NEW_V(NAME,NEW_CLASS) \
REAL_NEW_V(NAME,NEW_CLASS, _setup) \
REAL_EXT(NEW_CLASS, _setup)
REAL_NEW_V(NAME,NEW_CLASS,0) \
REAL_EXT(NEW_CLASS,0)
//! Implementation of a flext tilde class with a variable argument list
#define FLEXT_NEW_DSP_V(NAME,NEW_CLASS) \
REAL_NEW_V(NAME,NEW_CLASS,_tilde_setup) \
REAL_EXT(NEW_CLASS, _tilde_setup)
REAL_NEW_V(NAME,NEW_CLASS,1) \
REAL_EXT(NEW_CLASS, 1)
//! Implementation of a flext class (part of a library) with a variable argument list
#define FLEXT_LIB_V(NAME,NEW_CLASS) \
REAL_LIB_V(NAME,NEW_CLASS, _setup)
REAL_LIB_V(NAME,NEW_CLASS, 0)
//! Implementation of a flext tilde class (part of a library) with a variable argument list
#define FLEXT_LIB_DSP_V(NAME,NEW_CLASS) \
REAL_LIB_V(NAME,NEW_CLASS, _tilde_setup)
REAL_LIB_V(NAME,NEW_CLASS, 1)
// ONE ARGUMENT
......@@ -101,21 +101,21 @@ REAL_LIB_V(NAME,NEW_CLASS, _tilde_setup)
//! Implementation of a flext class with one argument
#define FLEXT_NEW_1(NAME,NEW_CLASS, TYPE) \
REAL_NEW_1(NAME,NEW_CLASS, _setup, TYPE) \
REAL_EXT(NEW_CLASS, _setup)
REAL_NEW_1(NAME,NEW_CLASS, 0, TYPE) \
REAL_EXT(NEW_CLASS, 0)
//! Implementation of a flext tilde class with one argument
#define FLEXT_NEW_DSP_1(NAME,NEW_CLASS, TYPE) \
REAL_NEW_1(NAME,NEW_CLASS, _tilde_setup, TYPE) \
REAL_EXT(NEW_CLASS, _tilde_setup)
REAL_NEW_1(NAME,NEW_CLASS, 1, TYPE) \
REAL_EXT(NEW_CLASS, 1)
//! Implementation of a flext class (part of a library) with one argument
#define FLEXT_LIB_1(NAME,NEW_CLASS, TYPE) \
REAL_LIB_1(NAME,NEW_CLASS, _setup,TYPE)
REAL_LIB_1(NAME,NEW_CLASS, 0,TYPE)
//! Implementation of a flext tilde class (part of a library) with one argument
#define FLEXT_LIB_DSP_1(NAME,NEW_CLASS, TYPE) \
REAL_LIB_1(NAME,NEW_CLASS, _tilde_setup, TYPE)
REAL_LIB_1(NAME,NEW_CLASS, 1, TYPE)
// TWO ARGUMENTS
......@@ -123,21 +123,21 @@ REAL_LIB_1(NAME,NEW_CLASS, _tilde_setup, TYPE)
//! Implementation of a flext class with two arguments
#define FLEXT_NEW_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
REAL_NEW_2(NAME,NEW_CLASS, _setup, TYPE1, TYPE2) \
REAL_EXT(NEW_CLASS, _setup)
REAL_NEW_2(NAME,NEW_CLASS, 0, TYPE1, TYPE2) \
REAL_EXT(NEW_CLASS, 0)
//! Implementation of a flext tilde class with one argument
#define FLEXT_NEW_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
REAL_NEW_2(NAME,NEW_CLASS, _tilde_setup, TYPE1, TYPE2) \
REAL_EXT(NEW_CLASS, _tilde_setup)
REAL_NEW_2(NAME,NEW_CLASS, 1, TYPE1, TYPE2) \
REAL_EXT(NEW_CLASS, 1)
//! Implementation of a flext class (part of a library) with two arguments
#define FLEXT_LIB_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
REAL_LIB_2(NAME,NEW_CLASS, _setup, TYPE1, TYPE2)
REAL_LIB_2(NAME,NEW_CLASS, 0, TYPE1, TYPE2)
//! Implementation of a flext tilde class (part of a library) with two arguments
#define FLEXT_LIB_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
REAL_LIB_2(NAME,NEW_CLASS, _tilde_setup, TYPE1, TYPE2)
REAL_LIB_2(NAME,NEW_CLASS, 1, TYPE1, TYPE2)
// THREE ARGUMENTS
......@@ -145,21 +145,21 @@ REAL_LIB_2(NAME,NEW_CLASS, _tilde_setup, TYPE1, TYPE2)
//! Implementation of a flext class with three arguments
#define FLEXT_NEW_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
REAL_NEW_3(NAME,NEW_CLASS, _setup, TYPE1, TYPE2, TYPE3) \
REAL_EXT(NEW_CLASS, _setup)
REAL_NEW_3(NAME,NEW_CLASS, 0, TYPE1, TYPE2, TYPE3) \
REAL_EXT(NEW_CLASS, 0)
//! Implementation of a flext tilde class with three arguments
#define FLEXT_NEW_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
REAL_NEW_3(NAME,NEW_CLASS, _tilde_setup, TYPE1, TYPE2, TYPE3) \
REAL_EXT(NEW_CLASS, _tilde_setup)
REAL_NEW_3(NAME,NEW_CLASS, 1, TYPE1, TYPE2, TYPE3) \
REAL_EXT(NEW_CLASS, 1)
//! Implementation of a flext class (part of a library) with three arguments
#define FLEXT_LIB_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
REAL_LIB_3(NAME,NEW_CLASS, _setup,TYPE1, TYPE2, TYPE3)
REAL_LIB_3(NAME,NEW_CLASS, 0,TYPE1, TYPE2, TYPE3)
//! Implementation of a flext tilde class (part of a library) with three arguments
#define FLEXT_LIB_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
REAL_LIB_3(NAME,NEW_CLASS, _tilde_setup, TYPE1, TYPE2, TYPE3)
REAL_LIB_3(NAME,NEW_CLASS, 1, TYPE1, TYPE2, TYPE3)
// deprecated stuff
......@@ -173,6 +173,7 @@ REAL_LIB_3(NAME,NEW_CLASS, _tilde_setup, TYPE1, TYPE2, TYPE3)
#define FLEXT_NEW_TILDE_3 FLEXT_NEW_DSP_3
#define FLEXT_LIB_TILDE_3 FLEXT_LIB_DSP_3
// deprecated
#define FLEXT_NEW_G FLEXT_NEW_V
#define FLEXT_NEW_DSP_G FLEXT_NEW_DSP_V
#define FLEXT_LIB_G FLEXT_LIB_V
......@@ -201,7 +202,7 @@ static void cb_ ## M_FUN(flext_base *c) { static_cast<thisType *>(c)->M_FUN(); }
static void cb_ ## M_FUN(flext_base *c,t_symbol *s,int argc,t_atom *argv) { static_cast<thisType *>(c)->M_FUN(s,argc,argv); }
//! for gimme
#define FLEXT_CALLBACK_G(M_FUN) \
#define FLEXT_CALLBACK_V(M_FUN) \
static void cb_ ## M_FUN(flext_base *c,int argc,t_atom *argv) { static_cast<thisType *>(c)->M_FUN(argc,argv); }
//! for boolean argument
......@@ -248,6 +249,10 @@ static void cb_ ## M_FUN(flext_base *c,TP1 &arg1,TP2 &arg2,TP3 &arg3,TP4 &arg4,T
//! 1 symbol argument
#define FLEXT_CALLBACK_S(M_FUN) FLEXT_CALLBACK_1(M_FUN,t_symptr)
// deprecated
#define FLEXT_CALLBACK_G FLEXT_CALLBACK_V
//@} FLEXT_CALLBACKS
......@@ -292,7 +297,7 @@ static void *thr_ ## M_FUN(thr_params *p) { \
}
//! for gimme
#define FLEXT_THREAD_G(M_FUN) \
#define FLEXT_THREAD_V(M_FUN) \
static void cb_ ## M_FUN(flext_base *c,int argc,t_atom *argv) { \
thr_params *p = new thr_params(c); p->set_gimme(argc,argv); \
StartThread(thr_ ## M_FUN,p,#M_FUN); \
......@@ -462,6 +467,9 @@ static void *thr_ ## M_FUN(thr_params *p) { \
//! 1 symbol argument
#define FLEXT_THREAD_S(M_FUN) FLEXT_THREAD_1(M_FUN,t_symptr)
// deprecated
#define FLEXT_THREAD_G FLEXT_THREAD_V
#endif // FLEXT_THREADS
//@} FLEXT_CALLBACKS
......
......@@ -10,7 +10,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <flext.h>
#include <flinternal.h>
#include <string.h>
// === flext_dsp ==============================================
......
......@@ -12,6 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <flinternal.h>
#include <string.h>
#include <stdarg.h>
#include <typeinfo.h>
// === proxy class for flext_base ============================
......@@ -127,7 +128,6 @@ const t_symbol *flext_base::sym_signal = NULL;
const t_symbol *flext_base::MakeSymbol(const char *s) { return gensym(const_cast<char *>(s)); }
flext_base::flext_base():
inlist(NULL),outlist(NULL),
incnt(0),outcnt(0),
......@@ -202,6 +202,14 @@ flext_base::~flext_base()
}
void flext_base::DefineHelp(const char *ref)
{
#ifdef PD
class_sethelpsymbol(thisClass(),gensym(const_cast<char *>(ref)));
#else
#endif
}
#ifdef MAXMSP
#define CRITON() short state = lockout_set(1)
#define CRITOFF() lockout_set(state)
......@@ -630,6 +638,7 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
}
}
#ifdef MAXMSP
// If float message is not explicitly handled: try int handler instead
if(!ret && argc == 1 && s == sym_float) {
t_atom fl;
......@@ -638,7 +647,6 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
ret = m_methodmain(inlet,sym_int,1,&fl);
}
#ifdef MAXMSP
// If int message is not explicitly handled: try float handler instead
if(!ret && argc == 1 && s == sym_int) {
t_atom fl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment