]> andersk Git - splint.git/blob - src/Headers/fileIdList.h
Updated copyrights
[splint.git] / src / Headers / fileIdList.h
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
4 **
5 */
6 /*
7 ** fileIdList.h
8 */
9
10 # ifndef FILEIDLIST_H
11 # define FILEIDLIST_H
12
13 /*@access ctype fileId ctypeList@*/
14 /*@+allmacros@*/
15
16 /* in forwardTypes:
17    abst_typedef null ctypeList fileIdList;
18 */
19
20 extern /*@falsewhennull@*/ bool fileIdList_isDefined (fileIdList p_f);
21 # define fileIdList_isDefined(f)  (ctypeList_isDefined (f))
22
23 /*@iter fileIdList_elements (sef fileIdList x, yield fileId el); @*/
24 # define fileIdList_elements(x, m_el) \
25    if (fileIdList_isDefined (x)) \
26     { int m_ind; fileId *m_elements = &((x)->elements[0]); \
27       for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
28         { fileId m_el = *(m_elements++); 
29
30 # define end_fileIdList_elements }}
31
32 /*@constant null fileIdList fileIdList_undefined; @*/
33 # define fileIdList_undefined      ctypeList_undefined
34
35 extern fileIdList fileIdList_create (void);
36 # define fileIdList_create()       ctypeList_new()
37
38 extern bool fileIdList_isEmpty (/*@sef@*/ fileIdList p_f) /*@*/ ;
39
40 extern fileIdList fileIdList_append (/*@only@*/ fileIdList p_f1, /*@temp@*/ fileIdList p_f2) 
41    /*@modifies p_f1@*/ ;
42 # define fileIdList_append(f1,f2) ctypeList_append((ctypeList)(f1), (ctypeList)(f2))
43
44 extern void fileIdList_add (fileIdList p_f, fileId p_fid) /*@modifies p_f@*/;
45 # define fileIdList_add(f, el) ctypeList_addh((ctypeList)(f), (ctype)(el))
46
47 extern int fileIdList_size (/*@sef@*/ fileIdList p_f);
48 # define fileIdList_size(ft)       ctypeList_size((ctypeList)(ft))
49
50 extern void fileIdList_free (/*@only@*/ fileIdList p_f) /*@modifies p_f@*/;
51 # define fileIdList_free(ft)       ctypeList_free((ctypeList)(ft)) 
52
53 # define fileIdList_isEmpty(f)     (fileIdList_size (f) == 0)
54 /*@noaccess ctype fileId ctypeList@*/
55
56 # else
57 # error "Multiple include"
58 # endif
59
60
This page took 0.472703 seconds and 5 git commands to generate.