aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormusil <tmusil@users.sourceforge.net>2007-10-24 15:49:58 +0000
committermusil <tmusil@users.sourceforge.net>2007-10-24 15:49:58 +0000
commit53a4f1cbfa1f823bda469b20250d2e0e76eedb2c (patch)
treead5537428595d1e309618147541ba8eb11b04551
parent17a0874389647a0a042fbd87cff1a14ff8a9e765 (diff)
apple OSX i386 compatible
svn path=/trunk/externals/iemlib/; revision=8871
-rw-r--r--iem_mp3/src/iemlib.h69
-rw-r--r--iem_t3_lib/src/iemlib.h69
-rw-r--r--iemlib1/src/iemlib.h69
-rw-r--r--iemlib2/src/iemlib.h69
4 files changed, 116 insertions, 160 deletions
diff --git a/iem_mp3/src/iemlib.h b/iem_mp3/src/iemlib.h
index ba62f68..973bfeb 100644
--- a/iem_mp3/src/iemlib.h
+++ b/iem_mp3/src/iemlib.h
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2007 */
#ifndef __IEMLIB_H__
#define __IEMLIB_H__
@@ -15,8 +15,13 @@ iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 *
#define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI)
#define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA)
+/* now miller's code starts :
+ for 4 point interpolation
+ for lookup tables
+ for denormal floats
+ */
-#ifdef NT
+#ifdef MSW
int sys_noloadbang;
//t_symbol *iemgui_key_sym=0;
#include <io.h>
@@ -30,76 +35,60 @@ extern int sys_noloadbang;
#define XTRASAMPS 4
#define SAMPBLK 4
-
#define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */
-/* machine-dependent definitions. These ifdefs really
-should have been by CPU type and not by operating system! */
+ /* machine-dependent definitions. These ifdefs really
+ should have been by CPU type and not by operating system! */
#ifdef IRIX
-/* big-endian. Most significant byte is at low address in memory */
+ /* big-endian. Most significant byte is at low address in memory */
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#define int32 long /* a data type that has 32 bits */
-#else
+#endif /* IRIX */
+
#ifdef MSW
-/* little-endian; most significant byte is at highest address */
+ /* little-endian; most significant byte is at highest address */
#define HIOFFSET 1
#define LOWOFFSET 0
#define int32 long
-#else
-#ifdef __FreeBSD__
+#endif /* MSW */
+
+#if defined(__FreeBSD__) || defined(__APPLE__)
#include <machine/endian.h>
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define HIOFFSET 1
-#define LOWOFFSET 0
-#else
-#define HIOFFSET 0 /* word offset to find MSB */
-#define LOWOFFSET 1 /* word offset to find LSB */
-#endif /* BYTE_ORDER */
-#include <sys/types.h>
-#define int32 int32_t
#endif
-#ifdef __linux__
+#ifdef __linux__
#include <endian.h>
+#endif
-#if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN)
+#if defined(__unix__) || defined(__APPLE__)
+#if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN)
#error No byte order defined
#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#if BYTE_ORDER == LITTLE_ENDIAN
#define HIOFFSET 1
#define LOWOFFSET 0
#else
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#endif /* __BYTE_ORDER */
-
#include <sys/types.h>
#define int32 int32_t
+#endif /* __unix__ or __APPLE__*/
-#else
-#ifdef __APPLE__
-#ifdef __BIG_ENDIAN__
-#define HIOFFSET 0 /* word offset to find MSB */
-#define LOWOFFSET 1 /* word offset to find LSB */
-#else
-#define HIOFFSET 1 /* word offset to find MSB */
-#define LOWOFFSET 0 /* word offset to find LSB */
-#endif
-#define int32 int /* a data type that has 32 bits */
-
-#endif /* __APPLE__ */
-#endif /* __linux__ */
-#endif /* MSW */
-#endif /* SGI */
-
-union tabfudge
+union tabfudge_d
{
double tf_d;
int32 tf_i[2];
};
+union tabfudge_f
+{
+ float tf_f;
+ long tf_l;
+};
+
#if defined __i386__ || defined __x86_64__
#define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
(((*(unsigned int*)&(f))&0x60000000)==0x60000000))
diff --git a/iem_t3_lib/src/iemlib.h b/iem_t3_lib/src/iemlib.h
index ba62f68..973bfeb 100644
--- a/iem_t3_lib/src/iemlib.h
+++ b/iem_t3_lib/src/iemlib.h
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2007 */
#ifndef __IEMLIB_H__
#define __IEMLIB_H__
@@ -15,8 +15,13 @@ iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 *
#define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI)
#define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA)
+/* now miller's code starts :
+ for 4 point interpolation
+ for lookup tables
+ for denormal floats
+ */
-#ifdef NT
+#ifdef MSW
int sys_noloadbang;
//t_symbol *iemgui_key_sym=0;
#include <io.h>
@@ -30,76 +35,60 @@ extern int sys_noloadbang;
#define XTRASAMPS 4
#define SAMPBLK 4
-
#define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */
-/* machine-dependent definitions. These ifdefs really
-should have been by CPU type and not by operating system! */
+ /* machine-dependent definitions. These ifdefs really
+ should have been by CPU type and not by operating system! */
#ifdef IRIX
-/* big-endian. Most significant byte is at low address in memory */
+ /* big-endian. Most significant byte is at low address in memory */
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#define int32 long /* a data type that has 32 bits */
-#else
+#endif /* IRIX */
+
#ifdef MSW
-/* little-endian; most significant byte is at highest address */
+ /* little-endian; most significant byte is at highest address */
#define HIOFFSET 1
#define LOWOFFSET 0
#define int32 long
-#else
-#ifdef __FreeBSD__
+#endif /* MSW */
+
+#if defined(__FreeBSD__) || defined(__APPLE__)
#include <machine/endian.h>
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define HIOFFSET 1
-#define LOWOFFSET 0
-#else
-#define HIOFFSET 0 /* word offset to find MSB */
-#define LOWOFFSET 1 /* word offset to find LSB */
-#endif /* BYTE_ORDER */
-#include <sys/types.h>
-#define int32 int32_t
#endif
-#ifdef __linux__
+#ifdef __linux__
#include <endian.h>
+#endif
-#if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN)
+#if defined(__unix__) || defined(__APPLE__)
+#if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN)
#error No byte order defined
#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#if BYTE_ORDER == LITTLE_ENDIAN
#define HIOFFSET 1
#define LOWOFFSET 0
#else
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#endif /* __BYTE_ORDER */
-
#include <sys/types.h>
#define int32 int32_t
+#endif /* __unix__ or __APPLE__*/
-#else
-#ifdef __APPLE__
-#ifdef __BIG_ENDIAN__
-#define HIOFFSET 0 /* word offset to find MSB */
-#define LOWOFFSET 1 /* word offset to find LSB */
-#else
-#define HIOFFSET 1 /* word offset to find MSB */
-#define LOWOFFSET 0 /* word offset to find LSB */
-#endif
-#define int32 int /* a data type that has 32 bits */
-
-#endif /* __APPLE__ */
-#endif /* __linux__ */
-#endif /* MSW */
-#endif /* SGI */
-
-union tabfudge
+union tabfudge_d
{
double tf_d;
int32 tf_i[2];
};
+union tabfudge_f
+{
+ float tf_f;
+ long tf_l;
+};
+
#if defined __i386__ || defined __x86_64__
#define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
(((*(unsigned int*)&(f))&0x60000000)==0x60000000))
diff --git a/iemlib1/src/iemlib.h b/iemlib1/src/iemlib.h
index ba62f68..973bfeb 100644
--- a/iemlib1/src/iemlib.h
+++ b/iemlib1/src/iemlib.h
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2007 */
#ifndef __IEMLIB_H__
#define __IEMLIB_H__
@@ -15,8 +15,13 @@ iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 *
#define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI)
#define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA)
+/* now miller's code starts :
+ for 4 point interpolation
+ for lookup tables
+ for denormal floats
+ */
-#ifdef NT
+#ifdef MSW
int sys_noloadbang;
//t_symbol *iemgui_key_sym=0;
#include <io.h>
@@ -30,76 +35,60 @@ extern int sys_noloadbang;
#define XTRASAMPS 4
#define SAMPBLK 4
-
#define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */
-/* machine-dependent definitions. These ifdefs really
-should have been by CPU type and not by operating system! */
+ /* machine-dependent definitions. These ifdefs really
+ should have been by CPU type and not by operating system! */
#ifdef IRIX
-/* big-endian. Most significant byte is at low address in memory */
+ /* big-endian. Most significant byte is at low address in memory */
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#define int32 long /* a data type that has 32 bits */
-#else
+#endif /* IRIX */
+
#ifdef MSW
-/* little-endian; most significant byte is at highest address */
+ /* little-endian; most significant byte is at highest address */
#define HIOFFSET 1
#define LOWOFFSET 0
#define int32 long
-#else
-#ifdef __FreeBSD__
+#endif /* MSW */
+
+#if defined(__FreeBSD__) || defined(__APPLE__)
#include <machine/endian.h>
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define HIOFFSET 1
-#define LOWOFFSET 0
-#else
-#define HIOFFSET 0 /* word offset to find MSB */
-#define LOWOFFSET 1 /* word offset to find LSB */
-#endif /* BYTE_ORDER */
-#include <sys/types.h>
-#define int32 int32_t
#endif
-#ifdef __linux__
+#ifdef __linux__
#include <endian.h>
+#endif
-#if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN)
+#if defined(__unix__) || defined(__APPLE__)
+#if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN)
#error No byte order defined
#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#if BYTE_ORDER == LITTLE_ENDIAN
#define HIOFFSET 1
#define LOWOFFSET 0
#else
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#endif /* __BYTE_ORDER */
-
#include <sys/types.h>
#define int32 int32_t
+#endif /* __unix__ or __APPLE__*/
-#else
-#ifdef __APPLE__
-#ifdef __BIG_ENDIAN__
-#define HIOFFSET 0 /* word offset to find MSB */
-#define LOWOFFSET 1 /* word offset to find LSB */
-#else
-#define HIOFFSET 1 /* word offset to find MSB */
-#define LOWOFFSET 0 /* word offset to find LSB */
-#endif
-#define int32 int /* a data type that has 32 bits */
-
-#endif /* __APPLE__ */
-#endif /* __linux__ */
-#endif /* MSW */
-#endif /* SGI */
-
-union tabfudge
+union tabfudge_d
{
double tf_d;
int32 tf_i[2];
};
+union tabfudge_f
+{
+ float tf_f;
+ long tf_l;
+};
+
#if defined __i386__ || defined __x86_64__
#define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
(((*(unsigned int*)&(f))&0x60000000)==0x60000000))
diff --git a/iemlib2/src/iemlib.h b/iemlib2/src/iemlib.h
index ba62f68..973bfeb 100644
--- a/iemlib2/src/iemlib.h
+++ b/iemlib2/src/iemlib.h
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2007 */
#ifndef __IEMLIB_H__
#define __IEMLIB_H__
@@ -15,8 +15,13 @@ iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 *
#define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI)
#define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA)
+/* now miller's code starts :
+ for 4 point interpolation
+ for lookup tables
+ for denormal floats
+ */
-#ifdef NT
+#ifdef MSW
int sys_noloadbang;
//t_symbol *iemgui_key_sym=0;
#include <io.h>
@@ -30,76 +35,60 @@ extern int sys_noloadbang;
#define XTRASAMPS 4
#define SAMPBLK 4
-
#define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */
-/* machine-dependent definitions. These ifdefs really
-should have been by CPU type and not by operating system! */
+ /* machine-dependent definitions. These ifdefs really
+ should have been by CPU type and not by operating system! */
#ifdef IRIX
-/* big-endian. Most significant byte is at low address in memory */
+ /* big-endian. Most significant byte is at low address in memory */
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#define int32 long /* a data type that has 32 bits */
-#else
+#endif /* IRIX */
+
#ifdef MSW
-/* little-endian; most significant byte is at highest address */
+ /* little-endian; most significant byte is at highest address */
#define HIOFFSET 1
#define LOWOFFSET 0
#define int32 long
-#else
-#ifdef __FreeBSD__
+#endif /* MSW */
+
+#if defined(__FreeBSD__) || defined(__APPLE__)
#include <machine/endian.h>
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define HIOFFSET 1
-#define LOWOFFSET 0
-#else
-#define HIOFFSET 0 /* word offset to find MSB */
-#define LOWOFFSET 1 /* word offset to find LSB */
-#endif /* BYTE_ORDER */
-#include <sys/types.h>
-#define int32 int32_t
#endif
-#ifdef __linux__
+#ifdef __linux__
#include <endian.h>
+#endif
-#if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN)
+#if defined(__unix__) || defined(__APPLE__)
+#if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN)
#error No byte order defined
#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#if BYTE_ORDER == LITTLE_ENDIAN
#define HIOFFSET 1
#define LOWOFFSET 0
#else
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#endif /* __BYTE_ORDER */
-
#include <sys/types.h>
#define int32 int32_t
+#endif /* __unix__ or __APPLE__*/
-#else
-#ifdef __APPLE__
-#ifdef __BIG_ENDIAN__
-#define HIOFFSET 0 /* word offset to find MSB */
-#define LOWOFFSET 1 /* word offset to find LSB */
-#else
-#define HIOFFSET 1 /* word offset to find MSB */
-#define LOWOFFSET 0 /* word offset to find LSB */
-#endif
-#define int32 int /* a data type that has 32 bits */
-
-#endif /* __APPLE__ */
-#endif /* __linux__ */
-#endif /* MSW */
-#endif /* SGI */
-
-union tabfudge
+union tabfudge_d
{
double tf_d;
int32 tf_i[2];
};
+union tabfudge_f
+{
+ float tf_f;
+ long tf_l;
+};
+
#if defined __i386__ || defined __x86_64__
#define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
(((*(unsigned int*)&(f))&0x60000000)==0x60000000))