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