Various minor fixes for compiler/linter (other then splint itself) warnings.
[splint-patched.git] / src / Headers / paramNodeList.h
blobca5a9828628cc53c2056a7ff9f8360ea8e49f776
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
4 **
5 */
6 # ifndef paramNodeLIST_H
7 # define paramNodeLIST_H
9 typedef /*@null@*/ /*@only@*/ paramNode o_paramNode;
11 abst_typedef /*@null@*/ struct
13 int nelements;
14 int nspace;
15 /*@reldef@*/ /*@relnull@*/ o_paramNode *elements;
16 } *paramNodeList ;
18 /*@iter paramNodeList_elements (sef paramNodeList x, yield exposed paramNode el); @*/
19 # define paramNodeList_elements(x, m_el) \
20 if (paramNodeList_isDefined (x)) \
21 { int m_ind; paramNode *m_elements = &((x)->elements[0]); \
22 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
23 { paramNode m_el = *(m_elements++);
25 # define end_paramNodeList_elements }}
27 extern int paramNodeList_size (/*@sef@*/ paramNodeList);
29 # define paramNodeList_size(s) (paramNodeList_isDefined (s) ? (s)->nelements : 0)
31 extern bool paramNodeList_empty (/*@sef@*/ paramNodeList p_s);
32 # define paramNodeList_empty(s) (paramNodeList_size(s) == 0)
34 extern /*@only@*/ paramNodeList paramNodeList_single (/*@keep@*/ paramNode p_p);
36 extern /*@falsewhennull@*/ bool paramNodeList_isDefined (paramNodeList p_s) /*@*/ ;
37 # define paramNodeList_isDefined(s) ((s) != (paramNodeList)0)
38 extern /*@only@*/ paramNodeList paramNodeList_new (void);
40 extern paramNodeList
41 paramNodeList_add (/*@returned@*/ paramNodeList p_s, /*@null@*/ /*@only@*/ paramNode p_el) ;
43 extern /*@only@*/ cstring paramNodeList_unparse (paramNodeList p_s) ;
44 extern void paramNodeList_free (/*@only@*/ /*@only@*/ paramNodeList p_s) ;
46 extern /*@only@*/ paramNodeList paramNodeList_copy (paramNodeList p_s) ;
47 extern /*@only@*/ cstring paramNodeList_unparseComments (paramNodeList p_s);
49 /*@constant int paramNodeListBASESIZE;@*/
50 # define paramNodeListBASESIZE SMALLBASESIZE
52 /*@constant null paramNodeList paramNodeList_undefined; @*/
53 # define paramNodeList_undefined ((paramNodeList) 0)
55 extern /*@nullwhentrue@*/ bool paramNodeList_isNull (/*@null@*/ paramNodeList p_p);
57 # define paramNodeList_isNull(p) ((p) == paramNodeList_undefined)
59 # else
60 # error "Multiple include"
61 # endif