aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flutil.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-03-07 04:40:37 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-03-07 04:40:37 +0000
commitf237ae21678a18c8862d4e8c1f180f1d56097b17 (patch)
treecd552b2a1dca61c60f8f66f871dbc94670f738d3 /externals/grill/flext/source/flutil.cpp
parent4215d864c0baf21a4f67ed3fe44e642b84708197 (diff)
""
svn path=/trunk/; revision=455
Diffstat (limited to 'externals/grill/flext/source/flutil.cpp')
-rw-r--r--externals/grill/flext/source/flutil.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/externals/grill/flext/source/flutil.cpp b/externals/grill/flext/source/flutil.cpp
index 09c75377..be9329cd 100644
--- a/externals/grill/flext/source/flutil.cpp
+++ b/externals/grill/flext/source/flutil.cpp
@@ -15,27 +15,44 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flext.h"
#include <string.h>
+#if FLEXT_OS == FLEXT_OS_WIN
+#include <windows.h>
+#endif
+
void flext::CopyMem(void *dst,const void *src,int bytes)
{
+#if FLEXT_OS == FLEXT_OS_WIN
+ MoveMemory(dst,src,bytes);
+#elif FLEXT_OS == FLEXT_OS_MAC
+ BlockMoveData(src,dst,bytes);
+#else
memcpy(dst,src,bytes);
+#endif
}
void flext::ZeroMem(void *dst,int bytes)
{
+#if FLEXT_OS == FLEXT_OS_WIN
+ ZeroMemory(dst,bytes);
+#elif FLEXT_OS == FLEXT_OS_MAC
+ BlockZero(dst,bytes);
+#else
memset(dst,0,bytes);
+#endif
}
-bool flext::Forward(const t_symbol *recv,int argc,const t_atom *argv)
+bool flext::Forward(const t_symbol *recv,const t_symbol *s,int argc,const t_atom *argv)
{
- t_class **cl = (t_class **)recv->s_thing;
+ void *cl = recv->s_thing;
if(!cl) return false;
#if FLEXT_SYS == FLEXT_SYS_PD
- pd_forwardmess(cl,argc,(t_atom *)argv);
+ pd_typedmess((t_class **)cl,(t_symbol *)s,argc,(t_atom *)argv);
+#elif FLEXT_SYS == FLEXT_SYS_MAX
+ typedmess(recv->s_thing,(t_symbol *)s,argc,(t_atom *)argv);
#else
- #error Not implemented
+#error Not implemented
#endif
-
- return true;
+ return true;
}