5 Copyright © 1995-96, The AROS Development Team. All rights reserved.
8 Desc: Data typing - must be included before any other file.
13 /*************************************
14 ***** Basic Data types *****
15 *************************************/
17 #ifndef __typedef_APTR
18 # define __typedef_APTR
19 typedef void * APTR
; /* memory pointer */
22 /* An integer which can store a pointer */
23 #ifndef __typedef_IPTR
24 # define __typedef_IPTR
25 # ifdef AROS_IPTR_TYPE
26 typedef AROS_IPTR_TYPE IPTR
;
28 typedef unsigned long IPTR
;
32 /* Distinguish between 64 and 32bit systems */
33 #ifndef __typedef_LONG
34 # define __typedef_LONG
35 # ifdef AROS_32BIT_TYPE
36 typedef signed AROS_32BIT_TYPE LONG
; /* signed 32-bit value */
37 typedef unsigned AROS_32BIT_TYPE ULONG
; /* unsigned 32-bit value */
39 typedef signed long LONG
; /* signed 32-bit value */
40 typedef unsigned long ULONG
; /* unsigned 32-bit value */
44 #ifndef __typedef_QUAD
45 # define __typedef_QUAD
46 # ifdef AROS_64BIT_TYPE
47 typedef signed AROS_64BIT_TYPE QUAD
; /* signed 64-bit value */
48 typedef unsigned AROS_64BIT_TYPE UQUAD
; /* unsigned 64-bit-value */
51 typedef signed long long QUAD
; /* signed 64-bit value */
52 typedef unsigned long long UQUAD
; /* unsigned 64-bit-value */
54 typedef struct { LONG high
, low
; } QUAD
; /* signed 64-bit value */
55 typedef struct { ULONG high
, low
; } UQUAD
; /* unsigned 64-bit value */
56 # endif /* __GNUC__ */
57 # endif /* AROS_64BIT_TYPE */
60 #ifndef __typedef_WORD
61 # define __typedef_WORD
62 # ifdef AROS_16BIT_TYPE
63 typedef signed AROS_16BIT_TYPE WORD
; /* signed 64-bit value */
64 typedef unsigned AROS_16BIT_TYPE UWORD
; /* unsigned 64-bit-value */
66 typedef signed short WORD
; /* signed 16-bit value */
67 typedef unsigned short UWORD
; /* unsigned 16-bit value */
71 #ifndef __typedef_BYTE
72 # define __typedef_BYTE
73 typedef signed char BYTE
; /* signed 8-bit value */
74 typedef unsigned char UBYTE
; /* unsigned 8-bit value */
77 /* An integer on the stack which can store a pointer */
78 #ifndef __typedef_STACKIPTR
79 # define __typedef_STACKIPTR
80 # ifdef AROS_IPTR_STACKTYPE
81 typedef AROS_IPTR_STACKTYPE STACKIPTR
;
83 typedef unsigned long STACKIPTR
;
87 /* Distinguish between 64 and 32bit systems on the stack */
88 #ifndef __typedef_STACKLONG
89 # define __typedef_STACKLONG
90 # ifdef AROS_32BIT_STACKTYPE
91 typedef signed AROS_32BIT_STACKTYPE STACKLONG
; /* signed 32-bit value */
92 typedef unsigned AROS_32BIT_STACKTYPE STACKULONG
; /* unsigned 32-bit value */
94 typedef signed long STACKLONG
; /* signed 32-bit value */
95 typedef unsigned long STACKULONG
; /* unsigned 32-bit value */
99 #ifndef __typedef_STACKQUAD
100 # define __typedef_STACKQUAD
101 # ifdef AROS_64BIT_STACKTYPE
102 typedef signed AROS_64BIT_STACKTYPE STACKQUAD
; /* signed 64-bit value */
103 typedef unsigned AROS_64BIT_STACKTYPE STACKUQUAD
; /* unsigned 64-bit-value */
106 typedef signed long long STACKQUAD
; /* signed 64-bit value */
107 typedef unsigned long long STACKUQUAD
; /* unsigned 64-bit-value */
109 typedef struct { LONG high
, low
; } STACKQUAD
; /* signed 64-bit value */
110 typedef struct { ULONG high
, low
; } STACKUQUAD
; /* unsigned 64-bit value */
111 # endif /* __GNUC__ */
112 # endif /* AROS_64BIT_STACKTYPE */
115 #ifndef __typedef_STACKWORD
116 # define __typedef_STACKWORD
117 # ifdef AROS_16BIT_STACKTYPE
118 typedef signed AROS_16BIT_STACKTYPE STACKWORD
; /* signed 64-bit value */
119 typedef unsigned AROS_16BIT_STACKTYPE STACKUWORD
; /* unsigned 64-bit-value */
121 typedef signed int STACKWORD
; /* signed 16-bit value */
122 typedef unsigned int STACKUWORD
; /* unsigned 16-bit value */
126 #ifndef __typedef_STACKBYTE
127 # define __typedef_STACKBYTE
128 typedef signed int STACKBYTE
; /* signed 8-bit value */
129 typedef unsigned int STACKUBYTE
; /* unsigned 8-bit value */
132 #ifndef __typedef_STACKFLOAT
133 # define __typedef_STACKFLOAT
134 # ifdef AROS_FLOAT_STACKTYPE
135 typedef AROS_FLOAT_STACKTYPE STACKFLOAT
; /* signed 32-bit floating point value */
137 typedef double STACKFLOAT
; /* signed 32-bit floating point value */
142 /*************************************
143 ***** Other interesting types *****
144 *************************************/
146 #ifndef __typedef_STRPTR
147 # define __typedef_STRPTR
148 typedef UBYTE
* STRPTR
; /* Pointer to string (NULL terminated) */
151 #ifndef __typedef_BOOL
152 # define __typedef_BOOL
153 typedef short BOOL
; /* A Boolean value */
156 #ifndef __typedef_FLOAT
157 # define __typedef_FLOAT
158 typedef float FLOAT
; /* 32bit IEEE floating point value */
161 #ifndef __typedef_DOUBLE
162 # define __typedef_DOUBLE
163 typedef double DOUBLE
; /* 64bit IEEE floating point value */
167 /*************************************
168 ***** Some useful definitions *****
169 *************************************/
187 #define GLOBAL extern
188 #define IMPORT extern
189 #define STATIC static
190 #define REGISTER register
193 #endif /* OOP_TYPES_H */