-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDGLCMN.H
More file actions
executable file
·48 lines (38 loc) · 1.08 KB
/
DGLCMN.H
File metadata and controls
executable file
·48 lines (38 loc) · 1.08 KB
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
#ifndef LIBDGL_DGLCMN_H
#define LIBDGL_DGLCMN_H
#ifdef __cplusplus
extern "C" {
#endif
typedef char int8;
typedef short int16;
typedef int int32;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
#ifndef bool
typedef int bool;
#define true 1
#define false 0
#endif
#define BIT_0 0x1
#define BIT_1 0x2
#define BIT_2 0x4
#define BIT_3 0x8
#define BIT_4 0x10
#define BIT_5 0x20
#define BIT_6 0x40
#define BIT_7 0x80
#define BIT_ISSET(bit, x) ((x) & (bit))
#define BIT_SET(bit, x) ((x) |= (bit))
#define BIT_CLEAR(bit, x) ((x) &= ~(bit))
#define BIT_TOGGLE(bit, x) ((x) ^= (bit))
#ifndef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
#ifdef __cplusplus
}
#endif
#endif