]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2000. | |
3 | ** See ../LICENSE for license information. | |
4 | ** | |
5 | */ | |
6 | # ifndef ctypeLIST_H | |
7 | # define ctypeLIST_H | |
8 | ||
9 | /* | |
10 | ** there is a special ctypeList used to represent the () argument list | |
11 | ** this has nelements = -1 | |
12 | ** | |
13 | ** (that is, not void, so any number of arguments is okay.) | |
14 | */ | |
15 | ||
16 | abst_typedef /*@null@*/ struct _ctypeList | |
17 | { | |
18 | int nelements; | |
19 | int nspace; | |
20 | /*@reldef@*/ /*@relnull@*/ ctype *elements; | |
21 | } *ctypeList ; | |
22 | ||
23 | extern int ctypeList_size (/*@sef@*/ ctypeList p_s) /*@*/ ; | |
24 | # define ctypeList_size(s) (ctypeList_isDefined(s) ? (s)->nelements : 0) | |
25 | ||
26 | extern /*@only@*/ ctypeList ctypeList_new(void); | |
27 | extern void ctypeList_addh (ctypeList p_s, ctype p_el) /*@modifies p_s@*/; | |
28 | ||
29 | extern /*@unused@*/ /*@only@*/ cstring ctypeList_unparse (ctypeList) /*@*/ ; | |
30 | extern void ctypeList_free (/*@only@*/ /*@only@*/ ctypeList p_s) /*@modifies p_s@*/; | |
31 | ||
32 | extern /*@falsenull@*/ bool ctypeList_isDefined (/*@null@*/ ctypeList p_ct) /*@*/ ; | |
33 | extern /*@unused@*/ /*@truenull@*/ bool | |
34 | ctypeList_isUndefined (/*@null@*/ ctypeList p_ct) /*@*/ ; | |
35 | ||
36 | /*@constant null ctypeList ctypeList_undefined; @*/ | |
37 | # define ctypeList_undefined ((ctypeList) NULL) | |
38 | ||
39 | # define ctypeList_isDefined(ct) ((ct) != ctypeList_undefined) | |
40 | # define ctypeList_isUndefined(ct) ((ct) == ctypeList_undefined) | |
41 | ||
42 | /*@constant int ctypeListBASESIZE;@*/ | |
43 | # define ctypeListBASESIZE SMALLBASESIZE | |
44 | ||
45 | # else | |
46 | # error "Multiple include" | |
47 | # endif | |
48 | ||
49 | ||
50 | ||
51 |