From 843409ecc7baf287962cbe34e967380302f35509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Fri, 1 Jun 2007 09:15:09 +0000 Subject: new filelayout (one c-file per object) svn path=/trunk/externals/iem16/; revision=7739 --- src/iem16.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) (limited to 'src/iem16.h') diff --git a/src/iem16.h b/src/iem16.h index f9649cd..87e758d 100644 --- a/src/iem16.h +++ b/src/iem16.h @@ -37,6 +37,57 @@ typedef short t_iem16_16bit; #define IEM16_SCALE_UP (32767) #define IEM16_SCALE_DOWN (1./32767) -#define VERSION "0.1" +#define VERSION "0.2" + +#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 */ +#elif defined __WIN32__ + /* little-endian; most significant byte is at highest address */ +# define HIOFFSET 1 +# define LOWOFFSET 0 +# define int32 long +#elif defined __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 +#elif defined __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 +#elif defined __APPLE__ +# ifdef __BIG_ENDIAN__ +# define HIOFFSET 0 /* word offset to find MSB */ +# define LOWOFFSET 1 /* word offset to find LSB */ +# else +# define HIOFFSET 1 +# define LOWOFFSET 0 +# endif +# define int32 int /* a data type that has 32 bits */ +#endif /* system */ + #endif -- cgit v1.2.1