]> andersk Git - splint.git/blame - src/Headers/usymIdSet.h
Updating to use the LEnsures and LRequires instead of the ensures requires so
[splint.git] / src / Headers / usymIdSet.h
CommitLineData
885824d3 1/*
2** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2000.
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# include "usymId.h"
15
16abst_typedef /*@null@*/ struct _usymIdSet
17{
18 int entries;
19 int nspace;
20 /*@reldef@*/ /*@relnull@*/ usymId *elements;
21} *usymIdSet ;
22
23extern usymIdSet usymIdSet_new(void);
24extern bool usymIdSet_member (usymIdSet p_s, usymId p_el) /*@*/ ;
25extern usymIdSet usymIdSet_subtract (usymIdSet p_s, usymIdSet p_t);
26extern void usymIdSet_free (/*@only@*/ /*@only@*/ usymIdSet p_s);
27extern /*@only@*/ cstring usymIdSet_unparse (usymIdSet p_ll);
28extern /*@only@*/ cstring usymIdSet_dump (usymIdSet p_lset);
29extern usymIdSet usymIdSet_undump (char **p_s);
30extern /*@only@*/ usymIdSet usymIdSet_single (usymId p_t);
31
32extern int usymIdSet_compare (usymIdSet p_l1, usymIdSet p_l2);
33
34/*@constant int usymIdSetBASESIZE;@*/
35# define usymIdSetBASESIZE SMALLBASESIZE
36
37extern usymIdSet usymIdSet_newUnion (usymIdSet p_s1, usymIdSet p_s2) /*@*/ ;
38extern usymIdSet usymIdSet_add (usymIdSet p_s, usymId p_el) /*@*/ ;
39
40extern /*@only@*/ usymIdSet
41 usymIdSet_removeFresh (/*@temp@*/ usymIdSet p_s, usymId p_el);
42
43/*@constant null usymIdSet usymIdSet_undefined; @*/
44# define usymIdSet_undefined ((usymIdSet) NULL)
45
46extern /*@falsenull@*/ bool usymIdSet_isDefined (usymIdSet p_s) /*@*/ ;
47# define usymIdSet_isDefined(s) ((s) != usymIdSet_undefined)
48
49extern /*@truenull@*/ bool usymIdSet_isUndefined (usymIdSet p_s) /*@*/ ;
50# define usymIdSet_isUndefined(s) ((s) == usymIdSet_undefined)
51
52/*@iter usymIdSet_elements (sef usymIdSet u, yield usymId el); @*/
53# define usymIdSet_elements(x, m_el) \
54 { int m_ind; if (usymIdSet_isDefined (x)) { \
55 for (m_ind = 0 ; m_ind < usymIdSet_size(x); m_ind++) \
56 { usymId m_el = (x)->elements[m_ind];
57
58# define end_usymIdSet_elements }}}
59
60extern int usymIdSet_size (/*@sef@*/ usymIdSet p_s);
61# define usymIdSet_size(s) (usymIdSet_isUndefined(s) ? 0 : (s)->entries)
62
63# else
64# error "Multiple include"
65# endif
66
This page took 0.054318 seconds and 5 git commands to generate.