aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Peach <mrpeach@users.sourceforge.net>2011-10-04 16:54:09 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 14:28:31 +0200
commitca50290f92b4d37144275bbb1871188bd66ded09 (patch)
tree8c97f9e99e6ff0d2d0939aaed036d20c64836076 /src
parent60e6eefdc94650a0d03d803252467d54b05f46ab (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/pdlua.c26
1 files 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 <string.h>
#include <sys/types.h> // for open
#include <sys/stat.h> // for open
-#include <sys/fcntl.h> // for open
#ifdef _MSC_VER
#include <io.h>
+#include <fcntl.h> // for open
#define read _read
#define close _close
#define ssize_t int
+#define snprintf _snprintf
#else
+#include <sys/fcntl.h> // for open
#include <unistd.h>
#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 <s_stuff.h>
-#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. */