From c931f5da000184a6bf45b636a2f19f32e6f9d182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Fri, 24 Jun 2005 14:27:59 +0000 Subject: a fixed version of iemlib.h (taken from ../iemlib2) don't know what happened to the last one. it seems like the line-endings have been eaten (probably by notepad) svn path=/trunk/externals/iemlib/; revision=3244 --- src/iem_mp3/iemlib.h | 111 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 102 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/iem_mp3/iemlib.h b/src/iem_mp3/iemlib.h index b25c915..3319cd1 100644 --- a/src/iem_mp3/iemlib.h +++ b/src/iem_mp3/iemlib.h @@ -1,9 +1,102 @@ -/* 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 - 2005 */#ifndef __IEMLIB_H__#define __IEMLIB_H__#define IS_A_POINTER(atom,index) ((atom+index)->a_type == A_POINTER)#define IS_A_FLOAT(atom,index) ((atom+index)->a_type == A_FLOAT)#define IS_A_SYMBOL(atom,index) ((atom+index)->a_type == A_SYMBOL)#define IS_A_DOLLAR(atom,index) ((atom+index)->a_type == A_DOLLAR)#define IS_A_DOLLSYM(atom,index) ((atom+index)->a_type == A_DOLLSYM)#define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI)#define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA)#ifdef NTint sys_noloadbang;//t_symbol *iemgui_key_sym=0;#include #elseextern int sys_noloadbang;//extern t_symbol *iemgui_key_sym;#include #endif#define DEFDELVS 64#define XTRASAMPS 4#define SAMPBLK 4#define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 *//* machine-dependent definitions. These ifdefs reallyshould have been by CPU type and not by operating system! */#ifdef IRIX/* 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#ifdef MSW/* little-endian; most significant byte is at highest address */#define HIOFFSET 1#define LOWOFFSET 0#define int32 long#else#ifdef __FreeBSD__#include #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 #define int32 int32_t#endif#ifdef __linux__#include #if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) #error No byte order defined #endif #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 #define int32 int32_t#else#ifdef __APPLE__#define HIOFFSET 0 /* word offset to find MSB */#define LOWOFFSET 1 /* word offset to find LSB */#define int32 int /* a data type that has 32 bits */#endif /* __APPLE__ */#endif /* __linux__ */#endif /* MSW */#endif /* SGI */union tabfudge{ double tf_d; int32 tf_i[2];}; -#ifdef __i386__ -#define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \(((*(unsigned int*)&(f))&0x60000000)==0x60000000))/* more stringent test: anything not between 1e-19 and 1e19 in absolute val */ - -#else - -#define IEM_DENORMAL(f) 0 - -#endif#endif \ No newline at end of file +/* 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 - 2005 */ + +#ifndef __IEMLIB_H__ +#define __IEMLIB_H__ + + +#define IS_A_POINTER(atom,index) ((atom+index)->a_type == A_POINTER) +#define IS_A_FLOAT(atom,index) ((atom+index)->a_type == A_FLOAT) +#define IS_A_SYMBOL(atom,index) ((atom+index)->a_type == A_SYMBOL) +#define IS_A_DOLLAR(atom,index) ((atom+index)->a_type == A_DOLLAR) +#define IS_A_DOLLSYM(atom,index) ((atom+index)->a_type == A_DOLLSYM) +#define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI) +#define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA) + + +#ifdef NT +int sys_noloadbang; +//t_symbol *iemgui_key_sym=0; +#include +#else +extern int sys_noloadbang; +//extern t_symbol *iemgui_key_sym; +#include +#endif + +#define DEFDELVS 64 +#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! */ +#ifdef IRIX +/* 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 +#ifdef MSW +/* little-endian; most significant byte is at highest address */ +#define HIOFFSET 1 +#define LOWOFFSET 0 +#define int32 long +#else +#ifdef __FreeBSD__ +#include +#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 +#define int32 int32_t +#endif +#ifdef __linux__ + +#include + +#if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) +#error No byte order defined +#endif + +#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 +#define int32 int32_t + +#else +#ifdef __APPLE__ +#define HIOFFSET 0 /* word offset to find MSB */ +#define LOWOFFSET 1 /* word offset to find LSB */ +#define int32 int /* a data type that has 32 bits */ + +#endif /* __APPLE__ */ +#endif /* __linux__ */ +#endif /* MSW */ +#endif /* SGI */ + +union tabfudge +{ + double tf_d; + int32 tf_i[2]; +}; + +#define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \ +(((*(unsigned int*)&(f))&0x60000000)==0x60000000)) +/* more stringent test: anything not between 1e-19 and 1e19 in absolute val */ + +#endif -- cgit v1.2.1