]> andersk Git - splint.git/blame - src/Headers/usymIdSet.h
Fixed all /*@i...@*/ tags (except 1).
[splint.git] / src / Headers / usymIdSet.h
CommitLineData
885824d3 1/*
c0de361f 2** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
885824d3 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
28bf4b0b 14abst_typedef /*@null@*/ struct
885824d3 15{
16 int entries;
17 int nspace;
18 /*@reldef@*/ /*@relnull@*/ usymId *elements;
19} *usymIdSet ;
20
21extern usymIdSet usymIdSet_new(void);
22extern bool usymIdSet_member (usymIdSet p_s, usymId p_el) /*@*/ ;
23extern usymIdSet usymIdSet_subtract (usymIdSet p_s, usymIdSet p_t);
24extern void usymIdSet_free (/*@only@*/ /*@only@*/ usymIdSet p_s);
25extern /*@only@*/ cstring usymIdSet_unparse (usymIdSet p_ll);
26extern /*@only@*/ cstring usymIdSet_dump (usymIdSet p_lset);
27extern usymIdSet usymIdSet_undump (char **p_s);
28extern /*@only@*/ usymIdSet usymIdSet_single (usymId p_t);
29
30extern int usymIdSet_compare (usymIdSet p_l1, usymIdSet p_l2);
31
32/*@constant int usymIdSetBASESIZE;@*/
33# define usymIdSetBASESIZE SMALLBASESIZE
34
35extern usymIdSet usymIdSet_newUnion (usymIdSet p_s1, usymIdSet p_s2) /*@*/ ;
36extern usymIdSet usymIdSet_add (usymIdSet p_s, usymId p_el) /*@*/ ;
37
38extern /*@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
0e41eb0e 44extern /*@falsewhennull@*/ bool usymIdSet_isDefined (usymIdSet p_s) /*@*/ ;
885824d3 45# define usymIdSet_isDefined(s) ((s) != usymIdSet_undefined)
46
0e41eb0e 47extern /*@nullwhentrue@*/ bool usymIdSet_isUndefined (usymIdSet p_s) /*@*/ ;
885824d3 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
58extern 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.074468 seconds and 5 git commands to generate.