Init the object variable for the registergroup so that
[cake.git] / test / oop / types.h
blob1dec6a994cb51fb91193ecf3acf89242361247f0
1 #ifndef OOP_TYPES_H
2 #define OOP_TYPES_H
4 /*
5 Copyright © 1995-96, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Data typing - must be included before any other file.
9 Lang: english
13 /*************************************
14 ***** Basic Data types *****
15 *************************************/
17 #ifndef __typedef_APTR
18 # define __typedef_APTR
19 typedef void * APTR; /* memory pointer */
20 #endif
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;
27 # else
28 typedef unsigned long IPTR;
29 # endif
30 #endif
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 */
38 # else
39 typedef signed long LONG; /* signed 32-bit value */
40 typedef unsigned long ULONG; /* unsigned 32-bit value */
41 # endif
42 #endif
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 */
49 # else
50 # ifdef __GNUC__
51 typedef signed long long QUAD; /* signed 64-bit value */
52 typedef unsigned long long UQUAD; /* unsigned 64-bit-value */
53 # else
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 */
58 #endif
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 */
65 # else
66 typedef signed short WORD; /* signed 16-bit value */
67 typedef unsigned short UWORD; /* unsigned 16-bit value */
68 # endif
69 #endif
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 */
75 #endif
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;
82 # else
83 typedef unsigned long STACKIPTR;
84 # endif
85 #endif
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 */
93 # else
94 typedef signed long STACKLONG; /* signed 32-bit value */
95 typedef unsigned long STACKULONG; /* unsigned 32-bit value */
96 # endif
97 #endif
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 */
104 # else
105 # ifdef __GNUC__
106 typedef signed long long STACKQUAD; /* signed 64-bit value */
107 typedef unsigned long long STACKUQUAD; /* unsigned 64-bit-value */
108 # else
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 */
113 #endif
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 */
120 # else
121 typedef signed int STACKWORD; /* signed 16-bit value */
122 typedef unsigned int STACKUWORD; /* unsigned 16-bit value */
123 # endif
124 #endif
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 */
130 #endif
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 */
136 # else
137 typedef double STACKFLOAT; /* signed 32-bit floating point value */
138 # endif
139 #endif
142 /*************************************
143 ***** Other interesting types *****
144 *************************************/
146 #ifndef __typedef_STRPTR
147 # define __typedef_STRPTR
148 typedef UBYTE * STRPTR; /* Pointer to string (NULL terminated) */
149 #endif
151 #ifndef __typedef_BOOL
152 # define __typedef_BOOL
153 typedef short BOOL; /* A Boolean value */
154 #endif
156 #ifndef __typedef_FLOAT
157 # define __typedef_FLOAT
158 typedef float FLOAT; /* 32bit IEEE floating point value */
159 #endif
161 #ifndef __typedef_DOUBLE
162 # define __typedef_DOUBLE
163 typedef double DOUBLE; /* 64bit IEEE floating point value */
164 #endif
167 /*************************************
168 ***** Some useful definitions *****
169 *************************************/
171 #ifndef FALSE
172 # define FALSE 0L
173 #endif
175 #ifndef TRUE
176 # define TRUE 1L
177 #endif
179 #ifndef NULL
180 # define NULL 0L
181 #endif
183 #ifndef VOID
184 # define VOID void
185 #endif
187 #define GLOBAL extern
188 #define IMPORT extern
189 #define STATIC static
190 #define REGISTER register
193 #endif /* OOP_TYPES_H */