From ca50290f92b4d37144275bbb1871188bd66ded09 Mon Sep 17 00:00:00 2001 From: Martin Peach Date: Tue, 4 Oct 2011 16:54:09 +0000 Subject: changed include files for MSVC (s_stuff.h was loading twice and sys/fcntl doesn't exist). snprintf is _snprintf on MSVC. svn path=/trunk/externals/loaders/pdlua/; revision=15496 --- src/pdlua.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/src/pdlua.c b/src/pdlua.c index c17af72..cf8564d 100644 --- a/src/pdlua.c +++ b/src/pdlua.c @@ -30,13 +30,15 @@ #include #include // for open #include // for open -#include // for open #ifdef _MSC_VER #include +#include // for open #define read _read #define close _close #define ssize_t int +#define snprintf _snprintf #else +#include // for open #include #endif /* we use Lua */ @@ -48,9 +50,6 @@ #include "m_pd.h" #include "s_stuff.h" // for sys_register_loader() #include "m_imp.h" // for struct _class -#ifdef _MSC_VER -#include -#endif /* BAD: support for Pd < 0.41 */ #if PD_MAJOR_VERSION == 0 @@ -81,25 +80,6 @@ /* BAD: end of bad section */ -/* EVIL: TODO: File requests/patches to Pd so that this becomes unnecessary. */ - -/** Pd loader type, defined in pd/src/s_loader.c but not exported. */ -//typedef int (*loader_t)(t_canvas *, char *); - -/** Pd loader registration, defined in pd/src/s_loader.c but not exported. */ -//void sys_register_loader(loader_t loader); - -/** Pd extern dir declaration (for help finding), defined in pd/src/m_class.c but not exported. */ -//void class_set_extern_dir(t_symbol *s); - -/** Pd [value] getter, defined in pd/src/x_connective.c but not exported. */ -//int value_getfloat(t_symbol *s, t_float *f); - -/** Pd [value] setter, defined in pd/src/x_connective.c but not exported. */ -//int value_setfloat(t_symbol *s, t_float f); - -/* EVIL: end of evil section. */ - /* If defined, PDLUA_DEBUG lets pdlua post a lot of text */ //#define PDLUA_DEBUG /** Global Lua interpreter state, needed in the constructor. */ -- cgit v1.2.1