]>
Commit | Line | Data |
---|---|---|
28bf4b0b | 1 | /* |
c59f5181 | 2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003. |
28bf4b0b | 3 | ** See ../LICENSE for license information. |
4 | ** | |
5 | */ | |
6 | ||
7 | # ifndef FUNCTIONCLAUSELIST_H | |
8 | # define FUNCTIONCLAUSELIST_H | |
9 | ||
517a2db3 | 10 | /*:private:*/ typedef /*@only@*/ functionClause o_functionClause; |
28bf4b0b | 11 | |
12 | struct s_functionClauseList | |
13 | { | |
14 | int nelements; | |
15 | int nspace; | |
16 | /*@reldef@*/ /*@relnull@*/ o_functionClause *elements; | |
17 | } ; | |
18 | ||
19 | /*@constant null functionClauseList functionClauseList_undefined;@*/ | |
20 | # define functionClauseList_undefined ((functionClauseList) NULL) | |
21 | ||
0e41eb0e | 22 | extern /*@falsewhennull@*/ bool functionClauseList_isDefined (functionClauseList p_s) /*@*/ ; |
28bf4b0b | 23 | # define functionClauseList_isDefined(s) ((s) != functionClauseList_undefined) |
24 | ||
0e41eb0e | 25 | extern /*@nullwhentrue@*/ bool functionClauseList_isUndefined (functionClauseList p_s) /*@*/ ; |
28bf4b0b | 26 | # define functionClauseList_isUndefined(s) ((s) == functionClauseList_undefined) |
27 | ||
28 | extern int functionClauseList_size (/*@sef@*/ functionClauseList) /*@*/ ; | |
29 | # define functionClauseList_size(s) (functionClauseList_isDefined (s) ? (s)->nelements : 0) | |
30 | ||
0e41eb0e | 31 | extern /*@unused@*/ /*@falsewhennull@*/ bool functionClauseList_empty (/*@sef@*/ functionClauseList) /*@*/ ; |
28bf4b0b | 32 | # define functionClauseList_empty(s) (functionClauseList_size(s) == 0) |
33 | ||
34 | extern cstring functionClauseList_unparseSep (functionClauseList p_s, cstring p_sep) /*@*/ ; | |
35 | ||
36 | extern /*@unused@*/ /*@only@*/ functionClauseList functionClauseList_new (void) /*@*/ ; | |
37 | ||
38 | extern /*@only@*/ functionClauseList functionClauseList_single (/*@keep@*/ functionClause p_el) /*@*/ ; | |
39 | ||
40 | extern /*@unused@*/ functionClauseList | |
41 | functionClauseList_add (/*@returned@*/ functionClauseList p_s, /*@keep@*/ functionClause p_el) | |
42 | /*@modifies p_s@*/ ; | |
43 | ||
b73d1009 | 44 | extern /*@only@*/ functionClauseList |
45 | functionClauseList_prepend (/*@only@*/ functionClauseList p_s, /*@keep@*/ functionClause p_el) | |
28bf4b0b | 46 | /*@modifies p_s@*/ ; |
47 | ||
48 | extern /*@unused@*/ /*@only@*/ cstring functionClauseList_unparse (functionClauseList p_s) ; | |
49 | extern void functionClauseList_free (/*@only@*/ functionClauseList p_s) ; | |
50 | ||
18b723f4 | 51 | functionClauseList |
52 | functionClauseList_setImplictConstraints (/*@returned@*/ functionClauseList p_s); | |
53 | ||
28bf4b0b | 54 | /*@constant int functionClauseListBASESIZE;@*/ |
55 | # define functionClauseListBASESIZE MIDBASESIZE | |
56 | ||
57 | /*@iter functionClauseList_elements (sef functionClauseList x, yield exposed functionClause el); @*/ | |
58 | # define functionClauseList_elements(x, m_el) \ | |
59 | { if (functionClauseList_isDefined (x)) { \ | |
60 | int m_ind; functionClause *m_elements = &((x)->elements[0]); \ | |
61 | for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \ | |
62 | { functionClause m_el = *(m_elements++); | |
63 | ||
64 | # define end_functionClauseList_elements }}} | |
65 | ||
66 | # else | |
67 | # error "Multiple include" | |
68 | # endif | |
69 | ||
70 | ||
71 | ||
72 |