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