1 #ifndef _ECPG_PREPROC_TYPE_H
2 #define _ECPG_PREPROC_TYPE_H
7 struct ECPGstruct_member
10 struct ECPGtype *type;
11 struct ECPGstruct_member *next;
17 char *size; /* For array it is the number of elements. For
18 * varchar it is the maxsize of the area. */
19 char *struct_sizeof; /* For a struct this is the sizeof() type as
23 struct ECPGtype *element; /* For an array this is the type of
25 struct ECPGstruct_member *members; /* A pointer to a list of
31 /* Everything is malloced. */
32 void ECPGmake_struct_member(char *, struct ECPGtype *, struct ECPGstruct_member **);
33 struct ECPGtype *ECPGmake_simple_type(enum ECPGttype, char *, int);
34 struct ECPGtype *ECPGmake_varchar_type(enum ECPGttype, long);
35 struct ECPGtype *ECPGmake_array_type(struct ECPGtype *, char *);
36 struct ECPGtype *ECPGmake_struct_type(struct ECPGstruct_member *, enum ECPGttype, char *);
37 struct ECPGstruct_member *ECPGstruct_member_dup(struct ECPGstruct_member *);
40 void ECPGfree_struct_member(struct ECPGstruct_member *);
41 void ECPGfree_type(struct ECPGtype *);
44 The type is dumped as:
45 type-tag <comma> reference-to-variable <comma> arrsize <comma> size <comma>
47 type-tag is one of the simple types or varchar.
48 reference-to-variable can be a reference to a struct element.
49 arrsize is the size of the array in case of array fetches. Otherwise 0.
50 size is the maxsize in case it is a varchar. Otherwise it is the size of
51 the variable (required to do array fetches of structs).
53 void ECPGdump_a_type(FILE *, const char *, struct ECPGtype *,
54 const char *, struct ECPGtype *, const char *,
55 const char *, char *, const char *, const char *);
57 /* A simple struct to keep a variable and its type. */
60 struct ECPGtype *type;
64 extern const char *ecpg_type_name(enum ECPGttype type);
66 /* some stuff for whenever statements */
107 enum ECPGttype type_enum;
109 char *type_dimension;
117 struct _include_path *next;
126 struct arguments *argsinsert;
127 struct arguments *argsresult;
134 struct this_type *type;
135 struct ECPGstruct_member *struct_member_list;
137 struct typedefs *next;
146 struct _defines *next;
149 /* This is a linked list of the variable names and types. */
153 struct ECPGtype *type;
155 struct variable *next;
160 struct variable *variable;
161 struct variable *indicator;
162 struct arguments *next;
169 struct descriptor *next;
175 enum ECPGdtype value;
176 struct assignment *next;
181 ET_WARNING, ET_ERROR, ET_FATAL
190 typedef struct ScanKeyword
196 #endif /* _ECPG_PREPROC_TYPE_H */