1 #ifndef _INCLUDE_CLEANTYP_H
2 #define _INCLUDE_CLEANTYP_H
3 
4 #include "config.h"
5 
6 #ifdef TRUE
7 #undef TRUE
8 #endif
9 
10 #ifdef FALSE
11 #undef FALSE
12 #endif
13 
14 typedef enum
15 {
16   FALSE,
17   TRUE
18 } boolean;
19 
20 /* 8 Bits defines */
21 
22 #if SIZEOF_CHAR == 1
23 
24 /* Unsigned */
25 typedef unsigned char UChar;
26 
27 #ifdef __AUDIO_H
28   typedef unsigned char BYTE;
29 #endif
30 
31 /* Signed */
32 typedef signed char SChar;
33 typedef signed char Char;
34 
35 #else
36 
37 #error sizeof (char) is not 1. Pretty weird. Contact author
38 
39 #endif // SIZEOF_CHAR == 1
40 
41 /****************************************************************************/
42 
43 /* 16 Bits defines */
44 
45 #if SIZEOF_SHORT_INT == 2
46 
47 /* Unsigned */
48 typedef unsigned short int UInt16;
49 
50 #ifdef __AUDIO_H
51 typedef unsigned short int WORD;
52 #endif
53 
54 /* Signed */
55 typedef signed short int SInt16;
56 typedef signed short int Int16;
57 
58 #elif SIZEOF_INT == 2
59 
60 /* Unsigned */
61 typedef unsigned int UInt16;
62 
63 #ifdef __AUDIO_H
64 typedef unsigned short int WORD;
65 #endif
66 
67 /* Signed */
68 typedef signed int SInt16;
69 typedef signed int Int16;
70 
71 #else // neither int nor short are coded on 16 bits
72 
73 #error neither short ints or ints are 16 bits long. Contact author.
74 
75 #endif
76 
77 /************************************************************************/
78 
79 /* 32 Bits defines */
80 
81 #if SIZEOF_INT == 4
82 
83 /* Unsigned */
84 typedef unsigned int UInt32;
85 
86 #ifdef __AUDIO_H
87 typedef unsigned int DWORD;
88 #endif
89 
90 /* Signed */
91 typedef signed int SInt32;
92 typedef signed int Int32;
93 
94 #elif SIZEOF_LONG_INT == 4
95 
96 /* Unsigned */
97 typedef unsigned long int UInt32;
98 
99 #ifdef __AUDIO_H
100 typedef unsigned long int DWORD;
101 #endif
102 
103 /* Signed */
104 typedef signed long int SInt32;
105 typedef signed long int Int32;
106 
107 #else
108 
109 #error neither ints nor long ints are 32 bits long. Contact author.
110 
111 #endif
112 
113 #endif
114