]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
28bf4b0b | 2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001. |
885824d3 | 3 | ** See ../LICENSE for license information. |
4 | */ | |
5 | /* | |
6 | ** uentryList.h (from slist_templace.h) | |
7 | */ | |
8 | ||
9 | # ifndef uentryLIST_H | |
10 | # define uentryLIST_H | |
11 | ||
28bf4b0b | 12 | abst_typedef /*@null@*/ struct { |
885824d3 | 13 | int nelements; |
14 | int nspace; | |
15 | int current; | |
16 | /*@reldef@*/ /*@relnull@*/ o_uentry *elements; | |
28bf4b0b | 17 | } *uentryList; |
885824d3 | 18 | |
19 | /*@iter uentryList_elements (sef uentryList x, yield exposed uentry el); @*/ | |
20 | # define uentryList_elements(x, m_el) \ | |
21 | { if (!uentryList_isUndefined(x) && !uentryList_isVoid(x))\ | |
22 | { int m_ind; uentry *m_elements = &((x)->elements[0]); \ | |
23 | for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \ | |
24 | { uentry m_el = *(m_elements++); | |
25 | ||
26 | # define end_uentryList_elements }}} | |
27 | ||
28 | extern void uentryList_clear (uentryList p_s) /*@modifies p_s@*/ ; | |
29 | extern int uentryList_size (uentryList p_s) /*@*/ ; | |
30 | extern /*@only@*/ uentryList uentryList_makeMissingParams (void); | |
31 | ||
32 | /*@constant null uentryList uentryList_missingParams; @*/ | |
33 | # define uentryList_missingParams uentryList_undefined | |
34 | ||
35 | # define uentryList_makeMissingParams() uentryList_missingParams | |
36 | ||
0e41eb0e | 37 | extern /*@nullwhentrue@*/ bool uentryList_isMissingParams (uentryList p_s) /*@*/ ; |
38 | extern /*@nullwhentrue@*/ bool uentryList_isUndefined (uentryList p_s) /*@*/ ; | |
39 | extern /*@unused@*/ /*@nullwhentrue@*/ bool uentryList_isEmpty (uentryList p_s) /*@*/ ; | |
40 | extern /*@unused@*/ /*@falsewhennull@*/ bool uentryList_isDefined (uentryList p_s) /*@*/ ; | |
885824d3 | 41 | |
42 | # define uentryList_isEmpty(s) (uentryList_size(s) == 0) | |
43 | ||
44 | /*@constant null uentryList uentryList_undefined; @*/ | |
45 | # define uentryList_undefined ((uentryList)0) | |
46 | ||
47 | # define uentryList_isUndefined(c) ((c) == uentryList_undefined) | |
48 | # define uentryList_isDefined(c) ((c) != uentryList_undefined) | |
49 | ||
50 | extern /*@notnull@*/ /*@only@*/ uentryList uentryList_new(void); | |
51 | extern uentryList uentryList_add (/*@returned@*/ uentryList p_s, /*@keep@*/ uentry p_el) /*@modifies p_s@*/ ; | |
52 | extern /*@only@*/ uentryList uentryList_single (/*@keep@*/ uentry p_el) /*@*/ ; | |
53 | extern /*@exposed@*/ uentry uentryList_getN (uentryList p_p, int p_n) /*@*/ ; | |
54 | ||
55 | extern /*@unused@*/ cstring uentryList_unparseFull (uentryList p_s) /*@*/ ; | |
56 | extern cstring uentryList_unparse (uentryList p_s) /*@*/ ; | |
57 | extern cstring uentryList_unparseAbbrev (uentryList p_p) /*@*/ ; | |
58 | extern cstring uentryList_unparseParams (uentryList p_s) /*@*/ ; | |
59 | ||
60 | extern void uentryList_free (/*@only@*/ uentryList p_s) ; | |
61 | extern bool uentryList_isVoid (uentryList p_cl) /*@*/ ; | |
62 | extern /*@only@*/ uentryList uentryList_copy (uentryList p_s) /*@*/ ; | |
63 | extern void uentryList_fixMissingNames (uentryList p_cl) /*@modifies p_cl@*/ ; | |
64 | ||
65 | extern int uentryList_compareStrict (uentryList p_s, uentryList p_t) /*@*/ ; | |
66 | extern int uentryList_compareParams (uentryList p_s, uentryList p_t) /*@*/ ; | |
67 | extern int uentryList_compareFields (uentryList p_s, uentryList p_t) /*@*/ ; | |
28bf4b0b | 68 | extern bool uentryList_equivFields (uentryList p_p1, uentryList p_p2) /*@*/ ; |
69 | ||
885824d3 | 70 | extern cstring uentryList_dumpParams (uentryList p_s) /*@*/ ; |
71 | extern uentryList uentryList_undump (char **p_s) /*@modifies *p_s@*/ ; | |
72 | ||
73 | extern bool uentryList_hasReturned (uentryList p_ul) /*@*/ ; | |
74 | extern void uentryList_advanceSafe (uentryList p_s) /*@modifies p_s@*/; | |
75 | extern bool uentryList_isFinished (uentryList p_s) /*@*/ ; | |
76 | extern void uentryList_reset (uentryList p_s) /*@modifies p_s@*/ ; | |
77 | extern /*@exposed@*/ uentry uentryList_current (uentryList p_s) /*@*/ ; | |
78 | extern int uentryList_lookupRealName (uentryList p_s, cstring p_name) /*@*/ ; | |
79 | extern /*@exposed@*/ uentry | |
80 | uentryList_lookupField (uentryList p_f, cstring p_name) /*@*/ ; | |
81 | extern uentryList uentryList_mergeFields (/*@only@*/ uentryList p_f1, /*@only@*/ uentryList p_f2); | |
82 | extern void uentryList_showFieldDifference (uentryList p_p1, uentryList p_p2); | |
83 | extern /*@only@*/ uentryList uentryList_undumpFields (char **p_s, fileloc p_loc); | |
84 | extern /*@only@*/ cstring uentryList_dumpFields (uentryList p_s); | |
85 | extern void uentryList_fixImpParams (uentryList p_cl); | |
86 | extern bool uentryList_sameObject (uentryList, uentryList); | |
87 | extern bool uentryList_matchFields (uentryList p_p1, uentryList p_p2); | |
88 | extern bool uentryList_matchParams (uentryList p_p1, uentryList p_p2, bool p_force, bool p_arg); | |
89 | ||
495af944 | 90 | extern cstring uentryList_unparseParamsComplete (uentryList p_s); |
91 | ||
885824d3 | 92 | # define uentryList_sameObject(s,t) ((s) == (t)) |
93 | ||
885824d3 | 94 | /*@constant int uentryListBASESIZE;@*/ |
95 | # define uentryListBASESIZE MIDBASESIZE | |
96 | ||
abd7f895 | 97 | /*@constant int uentryList_abbrevBreadth@*/ |
98 | # define uentryList_abbrevBreadth 3 | |
99 | ||
885824d3 | 100 | # else |
101 | # error "Multiple include" | |
102 | # endif | |
103 | ||
104 | ||
105 | ||
106 |