2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
6 ** uentryList.h (from slist_templace.h)
12 abst_typedef
/*@null@*/ struct {
16 /*@reldef@*/ /*@relnull@*/ o_uentry
*elements
;
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++);
26 # define end_uentryList_elements }}}
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);
32 /*@constant null uentryList uentryList_missingParams; @*/
33 # define uentryList_missingParams uentryList_undefined
35 # define uentryList_makeMissingParams() uentryList_missingParams
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
) /*@*/ ;
42 # define uentryList_isEmpty(s) (uentryList_size(s) == 0)
44 /*@constant null uentryList uentryList_undefined; @*/
45 # define uentryList_undefined ((uentryList)0)
47 # define uentryList_isUndefined(c) ((c) == uentryList_undefined)
48 # define uentryList_isDefined(c) ((c) != uentryList_undefined)
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
) /*@*/ ;
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
) /*@*/ ;
60 extern void uentryList_free (/*@only@*/ uentryList p_s
) ;
61 extern void uentryList_freeShallow (/*@only@*/ uentryList p_s
) ;
62 extern bool uentryList_isVoid (uentryList p_cl
) /*@*/ ;
63 extern /*@only@*/ uentryList
uentryList_copy (uentryList p_s
) /*@*/ ;
64 extern void uentryList_fixMissingNames (uentryList p_cl
) /*@modifies p_cl@*/ ;
66 extern int uentryList_compareStrict (uentryList p_s
, uentryList p_t
) /*@*/ ;
67 extern int uentryList_compareParams (uentryList p_s
, uentryList p_t
) /*@*/ ;
68 extern int uentryList_compareFields (uentryList p_s
, uentryList p_t
) /*@*/ ;
69 extern bool uentryList_equivFields (uentryList p_p1
, uentryList p_p2
) /*@*/ ;
71 extern cstring
uentryList_dumpParams (uentryList p_s
) /*@*/ ;
72 extern uentryList
uentryList_undump (char **p_s
) /*@modifies *p_s@*/ ;
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
);
91 # define uentryList_sameObject(s,t) ((s) == (t))
93 /*@constant int uentryListBASESIZE;@*/
94 # define uentryListBASESIZE MIDBASESIZE
96 /*@constant int uentryList_abbrevBreadth@*/
97 # define uentryList_abbrevBreadth 3
100 # error "Multiple include"