]>
Commit | Line | Data |
---|---|---|
28bf4b0b | 1 | /* |
2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001. | |
3 | ** See ../LICENSE for license information. | |
4 | ** | |
5 | */ | |
6 | ||
7 | # ifndef mtDefaultsDeclLIST_H | |
8 | # define mtDefaultsDeclLIST_H | |
9 | ||
10 | /*@private@*/ typedef /*@only@*/ mtDefaultsDecl o_mtDefaultsDecl; | |
11 | ||
12 | struct s_mtDefaultsDeclList | |
13 | { | |
14 | int nelements; | |
15 | int nspace; | |
16 | /*@reldef@*/ /*@relnull@*/ o_mtDefaultsDecl *elements; | |
17 | } ; | |
18 | ||
19 | /*@constant null mtDefaultsDeclList mtDefaultsDeclList_undefined;@*/ | |
20 | # define mtDefaultsDeclList_undefined ((mtDefaultsDeclList) NULL) | |
21 | ||
22 | extern /*@falsenull@*/ bool mtDefaultsDeclList_isDefined (mtDefaultsDeclList p_s) /*@*/ ; | |
23 | # define mtDefaultsDeclList_isDefined(s) ((s) != mtDefaultsDeclList_undefined) | |
24 | ||
25 | extern int mtDefaultsDeclList_size (/*@sef@*/ mtDefaultsDeclList) /*@*/ ; | |
26 | # define mtDefaultsDeclList_size(s) (mtDefaultsDeclList_isDefined (s) ? (s)->nelements : 0) | |
27 | ||
28 | extern /*@unused@*/ /*@falsenull@*/ bool mtDefaultsDeclList_empty (/*@sef@*/ mtDefaultsDeclList) /*@*/ ; | |
29 | # define mtDefaultsDeclList_empty(s) (mtDefaultsDeclList_size(s) == 0) | |
30 | ||
31 | extern cstring mtDefaultsDeclList_unparseSep (mtDefaultsDeclList p_s, cstring p_sep) /*@*/ ; | |
32 | ||
33 | extern /*@unused@*/ /*@only@*/ mtDefaultsDeclList mtDefaultsDeclList_new (void) /*@*/ ; | |
34 | ||
35 | extern /*@only@*/ mtDefaultsDeclList mtDefaultsDeclList_single (/*@keep@*/ mtDefaultsDecl p_el) /*@*/ ; | |
36 | ||
37 | extern mtDefaultsDeclList | |
38 | mtDefaultsDeclList_add (/*@returned@*/ mtDefaultsDeclList p_s, /*@keep@*/ mtDefaultsDecl p_el) | |
39 | /*@modifies p_s@*/ ; | |
40 | ||
41 | extern mtDefaultsDeclList | |
42 | mtDefaultsDeclList_prepend (/*@returned@*/ mtDefaultsDeclList p_s, /*@keep@*/ mtDefaultsDecl p_el) | |
43 | /*@modifies p_s@*/ ; | |
44 | ||
45 | extern /*@unused@*/ /*@only@*/ cstring | |
46 | mtDefaultsDeclList_unparse (mtDefaultsDeclList p_s) ; | |
47 | ||
48 | extern void mtDefaultsDeclList_free (/*@only@*/ mtDefaultsDeclList p_s) ; | |
49 | ||
50 | /*@constant int mtDefaultsDeclListBASESIZE;@*/ | |
51 | # define mtDefaultsDeclListBASESIZE MIDBASESIZE | |
52 | ||
53 | /*@iter mtDefaultsDeclList_elements (sef mtDefaultsDeclList x, yield exposed mtDefaultsDecl el); @*/ | |
54 | # define mtDefaultsDeclList_elements(x, m_el) \ | |
55 | { if (mtDefaultsDeclList_isDefined (x)) { \ | |
56 | int m_ind; mtDefaultsDecl *m_elements = &((x)->elements[0]); \ | |
57 | for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \ | |
58 | { mtDefaultsDecl m_el = *(m_elements++); | |
59 | ||
60 | # define end_mtDefaultsDeclList_elements }}} | |
61 | ||
62 | # else | |
63 | # error "Multiple include" | |
64 | # endif | |
65 | ||
66 | ||
67 | ||
68 |