Various minor fixes for compiler/linter (other then splint itself) warnings.
[splint-patched.git] / src / Headers / lslOpSet.h
blobc1ff4dea4298d27d7108a882dccad01826631503
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
4 **
5 */
6 /*
7 ** lslOpSet.h
8 **
9 ** based on set_template.h
12 # ifndef lslOpSET_H
13 # define lslOpSET_H
15 abst_typedef /*@null@*/ struct
17 int entries;
18 int nspace;
19 /*@reldef@*/ /*@relnull@*/ o_lslOp *elements;
20 } *lslOpSet ;
22 /*@iter lslOpSet_elements (sef lslOpSet s, yield exposed lslOp el); @*/
23 # define lslOpSet_elements(x, m_el) \
24 { if (lslOpSet_isDefined (x)) { int m_ind; \
25 for (m_ind = 0 ; m_ind < (x)->entries; m_ind++) \
26 { lslOp m_el = (x)->elements[m_ind];
28 # define end_lslOpSet_elements }}}
30 /*@constant null lslOpSet lslOpSet_undefined;@*/
31 # define lslOpSet_undefined ((lslOpSet) NULL)
33 extern /*@falsewhennull@*/ bool lslOpSet_isDefined (lslOpSet p_s) /*@*/ ;
34 # define lslOpSet_isDefined(s) ((s) != lslOpSet_undefined)
36 extern /*@unused@*/ int
37 lslOpSet_size (/*@sef@*/ lslOpSet p_s) /*@*/ ;
39 # define lslOpSet_size(s) \
40 (lslOpSet_isDefined(s) ? (s)->entries : 0)
42 extern /*@only@*/ lslOpSet lslOpSet_new (void) /*@*/ ;
43 extern bool lslOpSet_insert (lslOpSet p_s, /*@only@*/ lslOp p_el)
44 /*@modifies p_s@*/ ;
46 extern void lslOpSet_free (/*@only@*/ lslOpSet p_s);
47 extern /*@only@*/ lslOpSet lslOpSet_copy (lslOpSet p_s) /*@*/ ;
49 # else
50 # error "Multiple include"
51 # endif