~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/sys/sys_types.h

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)Fundamental data types.
  2 */
  3 
  4 #ifndef SYS_TYPE_HEADS_DEFINED
  5 #define SYS_TYPE_HEADS_DEFINED
  6 
  7 /** redefinition of void for use in "void *" to suit IBM machines **/
  8 
  9 typedef double Align;           /* ansification: moved here from
 10                                  * ralloc.c JB 23/3/93 */
 11 
 12 /* blocking managment structure and functions */
 13 typedef struct blk_stat         /* ansification: moved here from
 14                                  * ralloc.c JB 23/3/93 */
 15   {
 16       Ts_id   ts_id;            /* Tina structure identifier */
 17       unsigned int label;
 18       struct list *block_list;
 19       Align  *block;
 20       unsigned int bsize;
 21       unsigned int n;
 22   }
 23 
 24 Blk_stat;
 25 #define BLK_STAT_SWAP_STRING "up.uu"
 26 
 27 /* modified by sam 5.6.97 for compatibility with C++ */
 28 #ifndef false
 29 #define false 0
 30 #endif
 31 #ifndef true
 32 #define true 1
 33 #endif
 34 
 35 typedef char Bool;
 36 
 37 /* old code ( removed by sam 5.6.97 )
 38 typedef enum
 39   {
 40       false = 0,
 41       true = 1
 42   } Bool;
 43 */  
 44 
 45 
 46 typedef enum
 47   {
 48       fatal,
 49       non_fatal,
 50       warning,
 51       core_dump
 52   } Error;
 53 
 54 typedef struct tcomplex
 55   {
 56       Ts_id   ts_id;            /* Tina structure identifier */
 57       double   x;               /* Don't introduce numerical */
 58       double   y;               /* instability NAT 27/4/95   */
 59   }
 60 
 61 Complex;
 62 #define COMPLEX_SWAP_STRING "gg" /* NAT 24/1/96 */
 63 
 64 #define cmplx_re(z) ((z).x)
 65 #define cmplx_im(z) ((z).y)
 66 
 67 typedef struct vram
 68   {
 69       /* ts id removed by smc 8-2-94 */
 70       unsigned char vram0;  /* overlay */
 71       unsigned char vram1;  /* blue */
 72       unsigned char vram2;  /* green | right */
 73       unsigned char vram3;  /* red   | left  */
 74   }
 75 
 76 Vram;
 77 #define VRAM_SWAP_STRING "bbbb"
 78 
 79 #ifdef TINA5
 80 /* Ts_id style type identifiers (replace: char_v with Char_id etc
 81  * (where char_v is an enum, *not* where char_v is a field name).
 82  * #defines VEC - MAT4 are replaced by  */
 83 typedef enum
 84   {
 85       Char_id,                  /* replaces: char_v */
 86       Uchar_id,                 /* replaces: uchar_v */
 87       Short_id,                 /* replaces: short_v */
 88       Ushort_id,                /* replaces: ushort_v */
 89       Int_id,                   /* replaces: int_v and INT */
 90       Uint_id,                  /* replaces: uint_v */
 91       Float_id,                 /* replaces: float_v and FLOAT */
 92       Double_id,                /* replaces: double_v and DOUBLE */
 93       Ptr_id,                   /* replaces: ptr_v */
 94       Vram0_id,                 /* replaces: vram0_v */
 95       Vram1_id,                 /* replaces: vram1_v */
 96       Vram2_id,                 /* replaces: vram2_v */
 97       Vram3_id                  /* replaces: vram3_v */
 98 
 99       /* Complex_id replaces: complex_v (already defined in tstruct_info.h */
100       /* Ipos_id replaces: IPOS */
101       /* Mat2_id replaces: MAT2 */
102       /* Mat3_id replaces: MAT3 */
103       /* Mat4_id replaces: MAT4 */
104       /* Matrix_id replaces: MATRIX */
105       /* Transform2_id replaces: TRANSFORM2 */
106       /* Transform3_id replaces: TRANSFORM3 */
107       /* Vec2_id replaces: VEC2 */
108       /* Vec3_id replaces: VEC3 */
109       /* Vec4_id replaces: VEC4 */
110       /* Vector_id replaces: VECTOR */
111 
112       /* Ddlist_id replaces: DDLIST */
113       /* Generic_id Replaces: GENERIC */
114       /* Graph_node_id replaces: GRAPH_NODE */
115       /* Imrect_id replaces: IMRECT */
116       /* Imregion_id replaces: REGION */
117       /* List_id replaces: LIST */
118       /* Tstring_id replaces: STRING */
119 
120       /* Imrect_id replaces: IMAGE */
121       /* LOOP NOT replaced */
122       /* Pair_id replaces: PAIRS */
123       /* Prop_type_id replaces: PROP_TYPE */
124       /* Terrain_data_id replaces: TERRAIN */
125   } Ts_id2;
126 typedef Ts_id2 Vartype;
127 
128 #else  /* not TINA5 */
129 typedef enum
130   {
131       char_v,
132       uchar_v,
133       short_v,
134       ushort_v,
135       int_v,
136       uint_v,
137       float_v,
138       double_v,
139       complex_v,
140       ptr_v,
141       vram0_v,
142       vram1_v,
143       vram2_v,
144       vram3_v
145   } Vartype;
146 #endif /* TINA5 */
147 
148 typedef union var
149   {
150       char    char_v;
151       unsigned char uchar_v;
152       short   short_v;
153       unsigned short ushort_v;
154       int     int_v;
155       unsigned int uint_v;
156       float   float_v;
157       double  double_v;
158       struct tcomplex complex_v;
159       void   *ptr_v;
160   }
161 
162 Var;
163 
164 typedef union varptr
165   {
166       char   *char_v;
167       unsigned char *uchar_v;
168       short  *short_v;
169       unsigned short *ushort_v;
170       int    *int_v;
171       unsigned int *uint_v;
172       float  *float_v;
173       double *double_v;
174       struct tcomplex *complex_v;
175       void  **ptr_v;
176   }
177 
178 Varptr;
179 
180 typedef union varptrptr
181   {
182       char  **char_v;
183       unsigned char **uchar_v;
184       short **short_v;
185       unsigned short **ushort_v;
186       int   **int_v;
187       unsigned int **uint_v;
188       float **float_v;
189       double **double_v;
190       struct tcomplex **complex_v;
191       void ***ptr_v;
192       struct vram **vram_v;
193   } Varptrptr;
194 
195 /* define types for standard system structures
196  *
197  * math types are also defined here for the present
198  *
199  * 0 is not used as a type and is universally available
200  *
201  * 1 - 99 are the system types 100 - 199 are math types 200 - 299 are for
202  * tv 300 - 999 are reserved for tina 999 - MAXINT are available to the
203  * user */
204 
205 #define POSITIVE 1
206 #define NEGATIVE -1
207 
208 #ifdef TINA5
209 #define PROP_TYPE     1         /* used in property lists */
210 #define STRING        3
211 #define IMAGE         5
212 #define TERRAIN       7
213 #define PAIRS         8
214 
215 #else  /* TINA5 */
216 
217 #define PROP_TYPE     1         /* used in property lists */
218 #define LIST          2
219 #define STRING        3
220 #define DDLIST        4
221 #define IMAGE         5
222 #define IMRECT        5
223 #define REGION        6
224 #define TERRAIN       7
225 #define PAIRS         8
226 #define GRAPH_NODE    9
227 #define GENERIC       10
228 
229 /*
230 #define INT           100
231 #define FLOAT         101
232 #define DOUBLE        102
233 */
234 
235 #define VEC2          120
236 #define VEC3          121
237 /*
238 #define MAT2          122
239 */
240 #define MAT3          123
241 #define TRANSFORM2    124
242 #define TRANSFORM3    125
243 #define MATRIX        126
244 #define VECTOR        127
245 #define IPOS          128
246 #define VEC4          129
247 #define MAT4          130
248 
249 #endif /* TINA5 */
250 
251 #define LOOP          323       /* moved but not renumbered */
252 #define STRING64 64
253 #define STRING128 128
254 
255 
256 /* New types to allow simple items on lists so as to avoid int* in list->to */
257 /* which cannot be serialised  for passing / saving to files etc smc 7/3/94 */
258 
259 typedef struct ts_int
260 {
261     Ts_id ts_id;
262     int i;
263 } Ts_int;
264 #define TS_INT_SWAP_STRING "i"
265 
266 typedef struct ts_float
267 {
268     Ts_id ts_id;
269     float f;
270 } Ts_float;
271 #define TS_FLOAT_SWAP_STRING "f"
272 
273 typedef struct ts_double
274 {
275     Ts_id ts_id;
276     int filler;
277     double d;
278 } Ts_double;
279 #define TS_DOUBLE_SWAP_STRING ",g"
280 
281 typedef struct ts_string
282 {
283     Ts_id ts_id;
284     char s[256];
285 } Ts_string;
286 #define TS_STRING_SWAP_STRING "256c"
287 
288 #endif /* SYS_TYPE_HEADS_DEFINED */
289 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.