]> andersk Git - splint.git/blob - src/Headers/usymIdSet.h
Fixed all /*@i...@*/ tags (except 1).
[splint.git] / src / Headers / usymIdSet.h
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
4 */
5 /*
6 ** usymIdSet.h
7 **
8 ** based on set_template.h
9 */
10
11 # ifndef USYMIDSET_H
12 # define USYMIDSET_H
13
14 abst_typedef /*@null@*/ struct
15 {
16   int entries;
17   int nspace;
18   /*@reldef@*/ /*@relnull@*/ usymId  *elements;
19 } *usymIdSet ;
20
21 extern usymIdSet usymIdSet_new(void);
22 extern bool usymIdSet_member (usymIdSet p_s, usymId p_el) /*@*/ ;
23 extern usymIdSet usymIdSet_subtract (usymIdSet p_s, usymIdSet p_t);
24 extern void usymIdSet_free (/*@only@*/ /*@only@*/ usymIdSet p_s);
25 extern /*@only@*/ cstring usymIdSet_unparse (usymIdSet p_ll);
26 extern /*@only@*/ cstring usymIdSet_dump (usymIdSet p_lset);
27 extern usymIdSet usymIdSet_undump (char **p_s);
28 extern /*@only@*/ usymIdSet usymIdSet_single (usymId p_t);
29
30 extern int usymIdSet_compare (usymIdSet p_l1, usymIdSet p_l2);
31
32 /*@constant int usymIdSetBASESIZE;@*/
33 # define usymIdSetBASESIZE SMALLBASESIZE
34
35 extern usymIdSet usymIdSet_newUnion (usymIdSet p_s1, usymIdSet p_s2) /*@*/ ;
36 extern usymIdSet usymIdSet_add (usymIdSet p_s, usymId p_el) /*@*/ ;
37
38 extern /*@only@*/ usymIdSet 
39   usymIdSet_removeFresh (/*@temp@*/ usymIdSet p_s, usymId p_el);
40
41 /*@constant null usymIdSet usymIdSet_undefined; @*/
42 # define usymIdSet_undefined    ((usymIdSet) NULL)
43
44 extern /*@falsewhennull@*/ bool usymIdSet_isDefined (usymIdSet p_s) /*@*/ ;
45 # define usymIdSet_isDefined(s) ((s) != usymIdSet_undefined)
46
47 extern /*@nullwhentrue@*/ bool usymIdSet_isUndefined (usymIdSet p_s) /*@*/ ;
48 # define usymIdSet_isUndefined(s) ((s) == usymIdSet_undefined)
49
50 /*@iter usymIdSet_elements (sef usymIdSet u, yield usymId el); @*/ 
51 # define usymIdSet_elements(x, m_el) \
52    { int m_ind; if (usymIdSet_isDefined (x)) { \
53      for (m_ind = 0 ; m_ind < usymIdSet_size(x); m_ind++) \
54        { usymId m_el = (x)->elements[m_ind];
55
56 # define end_usymIdSet_elements }}}
57
58 extern int usymIdSet_size (/*@sef@*/ usymIdSet p_s);
59 # define usymIdSet_size(s) (usymIdSet_isUndefined(s) ? 0 : (s)->entries)
60
61 # else
62 # error "Multiple include"
63 # endif
64
This page took 0.606119 seconds and 5 git commands to generate.