diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-06-09 12:17:03 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-06-09 12:17:03 +0000 |
commit | 036e1f6c55ca27059c9ece1a3e29e80523cb6a40 (patch) | |
tree | ccb7938f8ffd5da355709b3420923c901f551906 /src | |
parent | e3c64e6123d6e9af2946fe1ddeb344fb9855fbd7 (diff) |
replaced MACOSX by __APPLE__
replaced NT by __WIN32__ (defined by mingw, but NOT by msvc)
svn path=/trunk/externals/zexy/; revision=3139
Diffstat (limited to 'src')
-rw-r--r-- | src/date.c | 7 | ||||
-rw-r--r-- | src/length.c | 5 | ||||
-rw-r--r-- | src/lpt.c | 4 | ||||
-rw-r--r-- | src/msgfile.c | 4 | ||||
-rw-r--r-- | src/operating_system.c | 2 | ||||
-rw-r--r-- | src/sfplay.c | 16 | ||||
-rw-r--r-- | src/sfrecord.c | 7 | ||||
-rw-r--r-- | src/symbol2list.c | 4 | ||||
-rw-r--r-- | src/tavg~.c | 10 | ||||
-rw-r--r-- | src/time.c | 6 | ||||
-rw-r--r-- | src/z_sigbin.c | 4 | ||||
-rw-r--r-- | src/zexy.h | 17 |
12 files changed, 30 insertions, 56 deletions
@@ -23,17 +23,18 @@ */ -#ifdef NT +#include "zexy.h" + +#ifdef __WIN32__ # define USE_TIMEB #endif -#ifdef MACOSX +#ifdef __APPLE__ # include <sys/types.h> /* typedef _BSD_TIME_T_ time_t; */ #endif -#include "zexy.h" #include <time.h> #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 <math.h> -#ifdef MACOSX -#define sqrtf sqrt -#endif - - static t_class *length_class; typedef struct _length @@ -40,7 +40,7 @@ #ifdef Z_WANT_LPT # include <stdlib.h> -# 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 <unistd.h> #endif -#ifdef NT +#ifdef __WIN32__ #include <io.h> #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 <stdio.h> #include <string.h> #include <fcntl.h> @@ -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 <unistd.h> -#include <sys/mman.h> -#define BINREADMODE "r" +# include <unistd.h> +# include <sys/mman.h> +# 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 <stdio.h> #include <string.h> #include <fcntl.h> @@ -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 <stdlib.h> #include <string.h> -#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 <math.h> -#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; @@ -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 <sys/types.h> /* typedef _BSD_TIME_T_ time_t; */ #endif -#include "zexy.h" #include <time.h> #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 <math.h> -#ifdef NT -#define fabsf fabs -#endif - typedef struct _misc { t_object x_obj; @@ -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; |