]> andersk Git - splint.git/blame - src/Headers/mtAnnotationList.h
Updated copyrights
[splint.git] / src / Headers / mtAnnotationList.h
CommitLineData
28bf4b0b 1/*
c0de361f 2** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
28bf4b0b 3** See ../LICENSE for license information.
4**
5*/
6# ifndef MTANNOTATIONLIST_H
7# define MTANNOTATIONLIST_H
8
9struct s_mtAnnotationList
10{
11 int nelements;
12 int nspace;
13 /*@reldef@*/ /*@relnull@*/ mtAnnotationDecl *elements;
14} ;
15
16/*@constant null mtAnnotationList mtAnnotationList_undefined;@*/
17# define mtAnnotationList_undefined ((mtAnnotationList) NULL)
18
0e41eb0e 19extern /*@falsewhennull@*/ bool mtAnnotationList_isDefined (mtAnnotationList p_s) /*@*/ ;
28bf4b0b 20# define mtAnnotationList_isDefined(s) ((s) != mtAnnotationList_undefined)
21
22extern int mtAnnotationList_size (/*@sef@*/ mtAnnotationList) /*@*/ ;
23# define mtAnnotationList_size(s) (mtAnnotationList_isDefined (s) ? (s)->nelements : 0)
24
0e41eb0e 25extern /*@unused@*/ /*@falsewhennull@*/ bool mtAnnotationList_empty (/*@sef@*/ mtAnnotationList) /*@*/ ;
28bf4b0b 26# define mtAnnotationList_empty(s) (mtAnnotationList_size(s) == 0)
27
28extern cstring mtAnnotationList_unparseSep (mtAnnotationList p_s, cstring p_sep) /*@*/ ;
29
30extern /*@unused@*/ /*@only@*/ mtAnnotationList mtAnnotationList_new (void) /*@*/ ;
31
32extern /*@only@*/ mtAnnotationList mtAnnotationList_single (/*@keep@*/ mtAnnotationDecl p_el) /*@*/ ;
33
34extern mtAnnotationList
35 mtAnnotationList_add (/*@returned@*/ mtAnnotationList p_s, /*@keep@*/ mtAnnotationDecl p_el)
36 /*@modifies p_s@*/ ;
37
38extern mtAnnotationList
39 mtAnnotationList_prepend (/*@returned@*/ mtAnnotationList p_s, /*@keep@*/ mtAnnotationDecl p_el)
40 /*@modifies p_s@*/ ;
41
42extern /*@unused@*/ /*@only@*/ cstring mtAnnotationList_unparse (mtAnnotationList p_s) ;
43extern void mtAnnotationList_free (/*@only@*/ mtAnnotationList p_s) ;
44
45/*@constant int mtAnnotationListBASESIZE;@*/
46# define mtAnnotationListBASESIZE MIDBASESIZE
47
48/*@iter mtAnnotationList_elements (sef mtAnnotationList x, yield exposed mtAnnotationDecl el); @*/
49# define mtAnnotationList_elements(x, m_el) \
50 { if (mtAnnotationList_isDefined (x)) { \
51 int m_ind; mtAnnotationDecl *m_elements = &((x)->elements[0]); \
52 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
53 { mtAnnotationDecl m_el = *(m_elements++);
54
55# define end_mtAnnotationList_elements }}}
56
57# else
58# error "Multiple include"
59# endif
60
61
62
63
This page took 0.090121 seconds and 5 git commands to generate.