1 
2 /*----------------------------------------------------------------------------
3 | One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
4 *----------------------------------------------------------------------------*/
5 #define LITTLEENDIAN
6 
7 /*----------------------------------------------------------------------------
8 | The macro `BITS64' can be defined to indicate that 64-bit integer types are
9 | supported by the compiler.
10 *----------------------------------------------------------------------------*/
11 #define BITS64
12 
13 /*----------------------------------------------------------------------------
14 | Each of the following `typedef's defines the most convenient type that holds
15 | integers of at least as many bits as specified.  For example, `uint8' should
16 | be the most convenient type that can hold unsigned integers of as many as
17 | 8 bits.  The `flag' type must be able to hold either a 0 or 1.  For most
18 | implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
19 | to the same as `int'.
20 *----------------------------------------------------------------------------*/
21 typedef char flag;
22 typedef unsigned char uint8;
23 typedef signed char int8;
24 typedef int uint16;
25 typedef int int16;
26 typedef unsigned int uint32;
27 typedef signed int int32;
28 #ifdef BITS64
29 typedef unsigned long long int uint64;
30 typedef signed long long int int64;
31 #endif
32 
33 /*----------------------------------------------------------------------------
34 | Each of the following `typedef's defines a type that holds integers
35 | of _exactly_ the number of bits specified.  For instance, for most
36 | implementation of C, `bits16' and `sbits16' should be `typedef'ed to
37 | `unsigned short int' and `signed short int' (or `short int'), respectively.
38 *----------------------------------------------------------------------------*/
39 typedef unsigned char bits8;
40 typedef signed char sbits8;
41 typedef unsigned short int bits16;
42 typedef signed short int sbits16;
43 typedef unsigned int bits32;
44 typedef signed int sbits32;
45 #ifdef BITS64
46 typedef unsigned long long int bits64;
47 typedef signed long long int sbits64;
48 #endif
49 
50 #ifdef BITS64
51 /*----------------------------------------------------------------------------
52 | The `LIT64' macro takes as its argument a textual integer literal and
53 | if necessary ``marks'' the literal as having a 64-bit integer type.
54 | For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
55 | appended with the letters `LL' standing for `long long', which is `gcc's
56 | name for the 64-bit integer type.  Some compilers may allow `LIT64' to be
57 | defined as the identity macro:  `#define LIT64( a ) a'.
58 *----------------------------------------------------------------------------*/
59 #define LIT64( a ) a##LL
60 #endif
61 
62 /*----------------------------------------------------------------------------
63 | The macro `INLINE' can be used before functions that should be inlined.  If
64 | a compiler does not support explicit inlining, this macro should be defined
65 | to be `static'.
66 *----------------------------------------------------------------------------*/
67 #define INLINE extern inline
68 
69