]> andersk Git - splint.git/blame - src/Headers/sRefList.h
Renamed truenull nullwhentrue and falsenull falsewhennull
[splint.git] / src / Headers / sRefList.h
CommitLineData
28bf4b0b 1/*
2** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3** See ../LICENSE for license information.
4*/
5/*
6** sRefList.h (from slist_templace.h)
7*/
8
9# ifndef sRefLIST_H
10# define sRefLIST_H
11
12typedef /*@dependent@*/ sRef d_sRef ;
13
14struct s_sRefList
15{
16 int nelements;
17 int nspace;
18 /*@reldef@*/ /*@relnull@*/ d_sRef *elements;
19} ;
20
21/*@iter sRefList_elements (sef sRefList x, yield exposed sRef el); @*/
22# define sRefList_elements(x, m_el) \
23 { if (!sRefList_isUndefined(x)) \
24 { int m_ind; sRef *m_elements = &((x)->elements[0]); \
25 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
26 { sRef m_el = *(m_elements++);
27
28# define end_sRefList_elements }}}
29
30extern int sRefList_size (sRefList p_s) /*@*/ ;
31
0e41eb0e 32extern /*@nullwhentrue@*/ bool sRefList_isUndefined (sRefList p_s) /*@*/ ;
33extern /*@unused@*/ /*@nullwhentrue@*/ bool sRefList_isEmpty (sRefList p_s) /*@*/ ;
34extern /*@unused@*/ /*@falsewhennull@*/ bool sRefList_isDefined (sRefList p_s) /*@*/ ;
28bf4b0b 35
36# define sRefList_isEmpty(s) (sRefList_size(s) == 0)
37
38/*@constant null sRefList sRefList_undefined; @*/
39# define sRefList_undefined ((sRefList)0)
40
41# define sRefList_isUndefined(c) ((c) == sRefList_undefined)
42# define sRefList_isDefined(c) ((c) != sRefList_undefined)
43
44extern /*@only@*/ sRefList sRefList_new (void);
45extern /*@only@*/ sRefList sRefList_single (/*@dependent@*/ sRef p_el);
46
47extern /*@notnull@*/ sRefList
48 sRefList_add (/*@returned@*/ sRefList p_s, /*@exposed@*/ sRef p_el) /*@modifies p_s@*/ ;
49
50extern cstring sRefList_unparse (sRefList p_s) /*@*/ ;
51extern void sRefList_free (/*@only@*/ sRefList p_s) ;
52extern /*@only@*/ sRefList sRefList_copy (sRefList p_s) /*@*/ ;
53
54/*@constant int sRefListBASESIZE;@*/
55# define sRefListBASESIZE MIDBASESIZE
56
57# else
58# error "Multiple include"
59# endif
60
61
62
63
This page took 0.065705 seconds and 5 git commands to generate.