]> andersk Git - splint.git/blame - src/Headers/paramNodeList.h
Updated copyrights
[splint.git] / src / Headers / paramNodeList.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# ifndef paramNodeLIST_H
7# define paramNodeLIST_H
8
9typedef /*@null@*/ /*@only@*/ paramNode o_paramNode;
10
28bf4b0b 11abst_typedef /*@null@*/ struct
885824d3 12{
13 int nelements;
14 int nspace;
15 /*@reldef@*/ /*@relnull@*/ o_paramNode *elements;
16} *paramNodeList ;
17
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++);
24
25# define end_paramNodeList_elements }}
26
27extern int paramNodeList_size (/*@sef@*/ paramNodeList);
28
29# define paramNodeList_size(s) (paramNodeList_isDefined (s) ? (s)->nelements : 0)
30
31extern bool paramNodeList_empty (/*@sef@*/ paramNodeList p_s);
32# define paramNodeList_empty(s) (paramNodeList_size(s) == 0)
33
34extern /*@only@*/ paramNodeList paramNodeList_single (/*@keep@*/ paramNode p_p);
35
0e41eb0e 36extern /*@falsewhennull@*/ bool paramNodeList_isDefined (paramNodeList p_s) /*@*/ ;
885824d3 37# define paramNodeList_isDefined(s) ((s) != (paramNodeList)0)
38extern /*@only@*/ paramNodeList paramNodeList_new (void);
39
40extern paramNodeList
41 paramNodeList_add (/*@returned@*/ paramNodeList p_s, /*@null@*/ /*@only@*/ paramNode p_el) ;
42
43extern /*@only@*/ cstring paramNodeList_unparse (paramNodeList p_s) ;
44extern void paramNodeList_free (/*@only@*/ /*@only@*/ paramNodeList p_s) ;
45
46extern /*@only@*/ paramNodeList paramNodeList_copy (paramNodeList p_s) ;
47extern /*@only@*/ cstring paramNodeList_unparseComments (paramNodeList p_s);
48
49/*@constant int paramNodeListBASESIZE;@*/
50# define paramNodeListBASESIZE SMALLBASESIZE
51
52/*@constant null paramNodeList paramNodeList_undefined; @*/
53# define paramNodeList_undefined ((paramNodeList) 0)
54
0e41eb0e 55extern /*@nullwhentrue@*/ bool paramNodeList_isNull (/*@null@*/ paramNodeList p_p);
885824d3 56
57# define paramNodeList_isNull(p) ((p) == paramNodeList_undefined)
58
59# else
60# error "Multiple include"
61# endif
62
63
64
65
This page took 0.074028 seconds and 5 git commands to generate.