Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1186 | savelij | 1 | #ifndef _DATATYPES_H |
2 | #define _DATATYPES_H |
||
3 | /* datatypes.h */ |
||
4 | /*****************************************************************************/ |
||
5 | /* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only */ |
||
6 | /* */ |
||
7 | /* AS-Port */ |
||
8 | /* */ |
||
9 | /* define some handy types & constants */ |
||
10 | /* */ |
||
11 | /* History: 2001-10-13 /AArnold - created this comment */ |
||
12 | /* */ |
||
13 | /*****************************************************************************/ |
||
14 | |||
15 | #include "sysdefs.h" |
||
16 | |||
17 | typedef as_uint8_t Byte; /* Integertypen */ |
||
18 | typedef as_int8_t ShortInt; |
||
19 | |||
20 | #ifdef HAS16 |
||
21 | typedef as_uint16_t Word; |
||
22 | typedef as_int16_t Integer; |
||
23 | #endif |
||
24 | |||
25 | typedef as_uint32_t LongWord; |
||
26 | typedef as_int32_t LongInt; |
||
27 | #define PRILongInt PRIas_int32_t |
||
28 | #define MaxLongInt 2147483647 |
||
29 | |||
30 | #ifdef HAS64 |
||
31 | typedef as_uint64_t QuadWord; |
||
32 | typedef as_int64_t QuadInt; |
||
33 | #endif |
||
34 | |||
35 | #ifdef HAS64 |
||
36 | typedef QuadInt LargeInt; |
||
37 | typedef QuadWord LargeWord; |
||
38 | #define LARGEBITS 64 |
||
39 | #else |
||
40 | typedef LongInt LargeInt; |
||
41 | typedef LongWord LargeWord; |
||
42 | #define LARGEBITS 32 |
||
43 | #endif |
||
44 | |||
45 | typedef signed int sint; |
||
46 | typedef unsigned int usint; |
||
47 | |||
48 | typedef Byte Boolean; |
||
49 | |||
50 | #ifndef STRINGSIZE |
||
51 | # define STRINGSIZE 256 |
||
52 | #endif |
||
53 | #define SHORTSTRINGSIZE 65 |
||
54 | |||
55 | typedef char String[STRINGSIZE]; |
||
56 | typedef char ShortString[SHORTSTRINGSIZE]; |
||
57 | |||
58 | #ifndef TRUE |
||
59 | #define TRUE 1 |
||
60 | #endif |
||
61 | #ifndef True |
||
62 | #define True 1 |
||
63 | #endif |
||
64 | |||
65 | #ifndef FALSE |
||
66 | #define FALSE 0 |
||
67 | #endif |
||
68 | #ifndef False |
||
69 | #define False 0 |
||
70 | #endif |
||
71 | |||
72 | #endif /* _DATATYPES_H */ |