From 036e1f6c55ca27059c9ece1a3e29e80523cb6a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Thu, 9 Jun 2005 12:17:03 +0000 Subject: replaced MACOSX by __APPLE__ replaced NT by __WIN32__ (defined by mingw, but NOT by msvc) svn path=/trunk/externals/zexy/; revision=3139 --- src/date.c | 7 ++++--- src/length.c | 5 ----- src/lpt.c | 4 ++-- src/msgfile.c | 4 ++-- src/operating_system.c | 2 +- src/sfplay.c | 16 +++++----------- src/sfrecord.c | 7 +------ src/symbol2list.c | 4 ---- src/tavg~.c | 10 ---------- src/time.c | 6 +++--- src/z_sigbin.c | 4 ---- src/zexy.h | 17 ++++++++++++----- 12 files changed, 30 insertions(+), 56 deletions(-) (limited to 'src') diff --git a/src/date.c b/src/date.c index 1961256..54ecf52 100644 --- a/src/date.c +++ b/src/date.c @@ -23,17 +23,18 @@ */ -#ifdef NT +#include "zexy.h" + +#ifdef __WIN32__ # define USE_TIMEB #endif -#ifdef MACOSX +#ifdef __APPLE__ # include /* typedef _BSD_TIME_T_ time_t; */ #endif -#include "zexy.h" #include #ifdef USE_TIMEB diff --git a/src/length.c b/src/length.c index a476af4..bc35039 100644 --- a/src/length.c +++ b/src/length.c @@ -19,11 +19,6 @@ #include "zexy.h" #include -#ifdef MACOSX -#define sqrtf sqrt -#endif - - static t_class *length_class; typedef struct _length diff --git a/src/lpt.c b/src/lpt.c index fbe58ff..238beef 100644 --- a/src/lpt.c +++ b/src/lpt.c @@ -40,7 +40,7 @@ #ifdef Z_WANT_LPT # include -# ifdef NT +# ifdef __WIN32__ /* on windoze everything is so complicated... */ extern int read_parport(int port); extern void write_parport(int port, int value); @@ -77,7 +77,7 @@ static int sys_inb(int port) { return inb(port); } -# endif /* NT */ +# endif /* __WIN32__ */ #endif /* Z_WANT_LP */ diff --git a/src/msgfile.c b/src/msgfile.c index 245eea7..01f6736 100644 --- a/src/msgfile.c +++ b/src/msgfile.c @@ -28,7 +28,7 @@ #ifdef linux #include #endif -#ifdef NT +#ifdef __WIN32__ #include #endif @@ -525,7 +525,7 @@ static void msgfile_read(t_msgfile *x, t_symbol *filename, t_symbol *format) t_binbuf *bbuf = binbuf_new(); -#ifdef NT +#ifdef __WIN32__ rmode |= O_BINARY; #endif diff --git a/src/operating_system.c b/src/operating_system.c index 8ccab49..8876991 100644 --- a/src/operating_system.c +++ b/src/operating_system.c @@ -42,7 +42,7 @@ static void operating_system_bang(t_operating_system *x) s=gensym("linux"); #elif defined __APPLE__ s=gensym("macos"); -#elif defined NT +#elif defined __WIN32__ s=gensym("windows"); #endif outlet_symbol(x->x_obj.ob_outlet, s); diff --git a/src/sfplay.c b/src/sfplay.c index a46c339..bdf4fc8 100644 --- a/src/sfplay.c +++ b/src/sfplay.c @@ -65,12 +65,6 @@ ritsch@iem.kug.ac.at */ #define DACBLKSIZE 64 /* in m_imp.h, but error if it is included it here*/ -#ifdef NT -#pragma warning( disable : 4244 ) -#pragma warning( disable : 4305 ) -#pragma warning( disable : 4018 ) -#endif - #include #include #include @@ -78,13 +72,13 @@ ritsch@iem.kug.ac.at */ /* ------------------------ sfplay ----------------------------- */ #define MAX_CHANS 8 /* channels for soundfiles 1,2,4,8 */ -#ifdef NT -#define BINREADMODE "rb" +#ifdef __WIN32__ +# define BINREADMODE "rb" #endif #ifdef unix -#include -#include -#define BINREADMODE "r" +# include +# include +# define BINREADMODE "r" #endif static t_class *sfplay_class; diff --git a/src/sfrecord.c b/src/sfrecord.c index ec66953..c3c7e6c 100644 --- a/src/sfrecord.c +++ b/src/sfrecord.c @@ -36,11 +36,6 @@ zmoelnig@iem.kug.ac.at #define DACBLKSIZE 64 /* in m_imp.h, but error if it is included it here*/ -#ifdef NT -#pragma warning( disable : 4244 ) -#pragma warning( disable : 4305 ) -#endif - #include #include #include @@ -48,7 +43,7 @@ zmoelnig@iem.kug.ac.at /* ------------------------ sfrecord ----------------------------- */ #define MAX_CHANS 8 /* channels for soundfiles 1,2,4,8 */ -#ifdef NT +#ifdef __WIN32__ #define BINWRITEMODE "wb" #endif #ifdef unix diff --git a/src/symbol2list.c b/src/symbol2list.c index b2d2d43..95dc0c4 100644 --- a/src/symbol2list.c +++ b/src/symbol2list.c @@ -18,10 +18,6 @@ #include #include -#ifndef NT -# define STATIC_INLINE static -#endif - /* * symbol2list: convert a symbol into a list (with given delimiters) */ diff --git a/src/tavg~.c b/src/tavg~.c index eec4399..4896c0d 100644 --- a/src/tavg~.c +++ b/src/tavg~.c @@ -17,16 +17,6 @@ #include "zexy.h" #include -#ifdef NT -#define sqrtf sqrt -#endif - -#ifdef MACOSX -#define sqrtf sqrt -#endif - - - /* triggered average :: arithmetic mean between last and current BANG */ static t_class *tavg_class; diff --git a/src/time.c b/src/time.c index 2d80e95..f0ee46c 100644 --- a/src/time.c +++ b/src/time.c @@ -22,18 +22,18 @@ "date" gets the current date from the system */ +#include "zexy.h" -#ifdef NT +#ifdef __WIN32__ #define USE_TIMEB #endif -#ifdef MACOSX +#ifdef __APPLE__ #include /* typedef _BSD_TIME_T_ time_t; */ #endif -#include "zexy.h" #include #ifdef USE_TIMEB diff --git a/src/z_sigbin.c b/src/z_sigbin.c index 21a39b6..f3ca3d9 100644 --- a/src/z_sigbin.c +++ b/src/z_sigbin.c @@ -23,10 +23,6 @@ #include "zexy.h" #include -#ifdef NT -#define fabsf fabs -#endif - typedef struct _misc { t_object x_obj; diff --git a/src/zexy.h b/src/zexy.h index cbfe00a..cb651e9 100644 --- a/src/zexy.h +++ b/src/zexy.h @@ -30,26 +30,33 @@ #ifndef INCLUDE_ZEXY_H__ #define INCLUDE_ZEXY_H__ +#ifdef __WIN32__ +# define NT +# define MSW +#endif + #include "m_pd.h" #define VERSION "2.0" -#ifdef NT + +#ifdef __WIN32__ +# pragma warning( disable : 4018 ) # pragma warning( disable : 4244 ) # pragma warning( disable : 4305 ) # define HEARTSYMBOL 3 -# define sqrtf sqrt -# define fabsf fabs # define STATIC_INLINE +//# define sqrtf sqrt +//# define fabsf fabs #else # define HEARTSYMBOL 169 +# define STATIC_INLINE static #endif -#ifdef MACOSX +#ifdef __APPLE__ # define sqrtf sqrt #endif - typedef struct _mypdlist { t_object x_obj; -- cgit v1.2.1