]> andersk Git - splint.git/blame - src/Headers/termNodeList.h
Renamed truenull nullwhentrue and falsenull falsewhennull
[splint.git] / src / Headers / termNodeList.h
CommitLineData
885824d3 1/*
28bf4b0b 2** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
885824d3 3** See ../LICENSE for license information.
4*/
5
6# ifndef termNodeLIST_H
7# define termNodeLIST_H
8
9typedef /*@only@*/ termNode o_termNode;
10
28bf4b0b 11struct s_termNodeList
885824d3 12{
13 int nelements;
14 int nspacehigh;
15 int nspacelow;
16 int current;
17 /*@dependent@*/ /*@reldef@*/ /*@relnull@*/ o_termNode *elements;
18 /*@only@*/ /*@reldef@*/ /*@relnull@*/ o_termNode *elementsroot;
19} ;
20
21/*@iter termNodeList_elements (sef termNodeList x, yield exposed termNode el); @*/
22# define termNodeList_elements(x, m_el) \
23 { int m_ind; termNode *m_elements = &((x)->elements[0]); \
24 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
25 { termNode m_el = *(m_elements++);
26
27# define end_termNodeList_elements }}
28
29extern int termNodeList_size (/*@sef@*/ termNodeList);
30# define termNodeList_size(s) (termNodeList_isDefined (s) ? (s)->nelements : 0)
31
32extern bool termNodeList_empty (/*@sef@*/ termNodeList);
33# define termNodeList_empty(s) (termNodeList_size(s) == 0)
34
0e41eb0e 35extern /*@falsewhennull@*/ bool termNodeList_isDefined (termNodeList p_t);
885824d3 36# define termNodeList_isDefined(s) ((s) != (termNodeList) 0)
37
38extern /*@only@*/ termNodeList termNodeList_new(void);
39extern termNodeList termNodeList_push (/*@returned@*/ termNodeList p_s,
40 /*@keep@*/ termNode p_el) ;
41
42extern void termNodeList_addh (termNodeList p_s, /*@keep@*/ termNode p_el) ;
43extern void termNodeList_addl (termNodeList p_s, /*@keep@*/ termNode p_el) ;
44
45extern void termNodeList_reset (termNodeList p_s)
46 /*@modifies p_s@*/ ;
47extern void termNodeList_finish (termNodeList p_s)
48 /*@modifies p_s@*/ ;
49extern void termNodeList_advance (termNodeList p_s)
50 /*@modifies p_s@*/ ;
51
52extern /*@exposed@*/ termNode termNodeList_getN (termNodeList p_s, int p_n) /*@*/ ;
53
54extern /*@only@*/ cstring termNodeList_unparse (termNodeList p_s) ;
55extern /*@only@*/ cstring termNodeList_unparseTail (termNodeList p_s);
56extern /*@only@*/ cstring termNodeList_unparseToCurrent (termNodeList p_s);
57extern /*@only@*/ cstring termNodeList_unparseSecondToCurrent (termNodeList p_s);
58
59extern void termNodeList_free (/*@only@*/ termNodeList p_s) ;
60
61extern /*@exposed@*/ termNode termNodeList_head (termNodeList p_s) ;
62extern /*@exposed@*/ termNode termNodeList_current (termNodeList p_s) ;
63
64extern /*@only@*/ termNodeList termNodeList_copy (termNodeList p_s) ;
65
66/*@constant int termNodeListGROWLOW;@*/
67# define termNodeListGROWLOW 4 /* addl used in abstract.c */
68
69/*@constant int termNodeListGROWHI;@*/
70# define termNodeListGROWHI 4
71
72/*@constant int termNodeListBASESIZE;@*/
73# define termNodeListBASESIZE (termNodeListGROWLOW + termNodeListGROWHI)
74
75# else
76# error "Multiple include"
77# endif
78
79
80
81
This page took 0.087369 seconds and 5 git commands to generate.