Pristine Ack-5.5
[Ack-5.5.git] / lang / cem / cemcom / type.str
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  */
5 /* $Id: type.str,v 3.10 1994/06/24 12:06:43 ceriel Exp $ */
6 /* TYPE DESCRIPTOR */
7
8 #include        "nofloat.h"
9 #include        "nobitfield.h"
10 #include        "dbsymtab.h"
11
12 struct type     {
13         struct type *next;      /* used only with ARRAY */
14         short tp_fund;          /* fundamental type */
15         char tp_unsigned;
16         int tp_align;
17         arith tp_size;          /* -1 if declared but not defined */
18         struct idf *tp_idf;     /* name of STRUCT, UNION or ENUM */
19         struct sdef *tp_sdef;   /* to first selector */
20         struct type *tp_up;     /* from FIELD, POINTER, ARRAY
21                                         or FUNCTION to fund. */
22         struct field *tp_field; /* field descriptor if fund == FIELD    */
23         struct type *tp_pointer;/* to POINTER */
24         struct type *tp_array;  /* to ARRAY */
25         struct type *tp_function;/* to FUNCTION */
26 #ifdef DBSYMTAB
27         int tp_dbindex;
28 #endif
29 };
30
31 extern struct type
32         *create_type(), *standard_type(), *construct_type(), *pointer_to(),
33         *array_of(), *function_of();
34
35 #ifndef NOBITFIELD
36 extern struct type *field_of();
37 #endif /* NOBITFIELD */
38
39 extern struct type
40         *char_type, *uchar_type,
41         *short_type, *ushort_type,
42         *word_type, *uword_type,
43         *int_type, *uint_type,
44         *long_type, *ulong_type,
45 #ifndef NOFLOAT
46         *float_type, *double_type,
47 #endif /* NOFLOAT */
48         *void_type, *label_type,
49         *string_type, *funint_type, *error_type;
50
51 extern struct type *pa_type;    /* type.c       */
52
53 extern arith size_of_type(), align();
54
55 /* ALLOCDEF "type" 20 */