]> andersk Git - splint.git/blame - src/Headers/fcnNodeList.h
Updated copyrights
[splint.git] / src / Headers / fcnNodeList.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
7# ifndef FCNNODELIST_H
8# define FCNNODELIST_H
9
10typedef /*@only@*/ fcnNode o_fcnNode;
11
28bf4b0b 12abst_typedef /*@null@*/ struct
885824d3 13{
14 int nelements;
15 int nspace;
16 /*@reldef@*/ /*@relnull@*/ o_fcnNode *elements;
17} *fcnNodeList;
18
19/*@iter fcnNodeList_elements (sef fcnNodeList x, yield exposed fcnNode el); @*/
20# define fcnNodeList_elements(x, m_el) \
21 if (fcnNodeList_isDefined (x)) \
22 { int m_ind; fcnNode *m_elements = &((x)->elements[0]); \
23 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
24 { fcnNode m_el = *(m_elements++);
25
26# define end_fcnNodeList_elements }}
27
28/*@constant null fcnNodeList fcnNodeList_undefined; @*/
29# define fcnNodeList_undefined ((fcnNodeList)0)
30
0e41eb0e 31extern /*@falsewhennull@*/ bool fcnNodeList_isDefined (fcnNodeList p_f);
885824d3 32# define fcnNodeList_isDefined(f) ((f) != fcnNodeList_undefined)
33
0e41eb0e 34extern /*@unused@*/ /*@nullwhentrue@*/ bool
885824d3 35 fcnNodeList_isUndefined (fcnNodeList p_f);
36# define fcnNodeList_isUndefined(f) ((f) == fcnNodeList_undefined)
37
38extern int fcnNodeList_size (/*@sef@*/ fcnNodeList p_f);
39extern bool fcnNodeList_isEmpty (/*@sef@*/ fcnNodeList p_f);
40
41# define fcnNodeList_size(s) (fcnNodeList_isDefined(s) ? (s)->nelements : 0)
42# define fcnNodeList_isEmpty(s) (fcnNodeList_size(s) == 0)
43
44extern /*@only@*/ fcnNodeList fcnNodeList_new(void);
45extern fcnNodeList fcnNodeList_add (/*@returned@*/ fcnNodeList p_s, /*@keep@*/ fcnNode p_el) ;
46
47
48extern /*@unused@*/ /*@only@*/ cstring fcnNodeList_unparse (fcnNodeList p_s) ;
49extern void fcnNodeList_free (/*@null@*/ /*@only@*/ fcnNodeList p_s) ;
50
51/*@constant int fcnNodeListBASESIZE;@*/
52# define fcnNodeListBASESIZE SMALLBASESIZE
53
54# else
55# error "Multiple include"
56# endif
57
58
59
60
This page took 0.071631 seconds and 5 git commands to generate.