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