From f237ae21678a18c8862d4e8c1f180f1d56097b17 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 7 Mar 2003 04:40:37 +0000 Subject: "" svn path=/trunk/; revision=455 --- externals/grill/flext/source/flutil.cpp | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'externals/grill/flext/source/flutil.cpp') 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 +#if FLEXT_OS == FLEXT_OS_WIN +#include +#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; } -- cgit v1.2.1