]> andersk Git - splint.git/blame - src/Headers/cstringSList.h
Fixed line numbering when multi-line macro parameters are used.
[splint.git] / src / Headers / cstringSList.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 cstringSList_H
7# define cstringSList_H
8
9typedef /*@observer@*/ cstring ob_cstring;
10
28bf4b0b 11abst_typedef /*@null@*/ struct s_cstringSList
885824d3 12{
13 int nelements;
14 int nspace;
15 /*@reldef@*/ /*@relnull@*/ ob_cstring *elements;
16} *cstringSList ;
17
18/*@constant null cstringSList cstringSList_undefined;@*/
19# define cstringSList_undefined ((cstringSList) NULL)
20
0e41eb0e 21extern /*@falsewhennull@*/ bool cstringSList_isDefined (cstringSList p_s) /*@*/ ;
885824d3 22# define cstringSList_isDefined(s) ((s) != cstringSList_undefined)
23
24extern int cstringSList_size (/*@sef@*/ cstringSList) /*@*/ ;
25# define cstringSList_size(s) (cstringSList_isDefined (s) ? (s)->nelements : 0)
26
0e41eb0e 27extern /*@falsewhennull@*/ bool cstringSList_empty (/*@sef@*/ cstringSList) /*@*/ ;
885824d3 28# define cstringSList_empty(s) (cstringSList_size(s) == 0)
29
30extern /*@unused@*/ cstring cstringSList_unparseSep (cstringSList p_s, cstring p_sep) /*@*/ ;
31
32extern /*@only@*/ cstringSList cstringSList_new (void) /*@*/ ;
33
34extern /*@unused@*/ /*@only@*/ cstringSList cstringSList_single (/*@exposed@*/ cstring p_el) /*@*/ ;
35
36extern cstringSList
37 cstringSList_add (/*@returned@*/ cstringSList p_s, /*@exposed@*/ cstring p_el)
38 /*@modifies p_s@*/ ;
39
40extern void cstringSList_alphabetize (cstringSList p_s);
41
28bf4b0b 42extern /*@observer@*/ cstring cstringSList_get (cstringSList p_s, int p_index) /*@*/ ;
43
885824d3 44extern /*@only@*/ cstring cstringSList_unparseAbbrev (cstringSList p_s) /*@*/ ;
45extern /*@unused@*/ /*@only@*/ cstring cstringSList_unparse (cstringSList p_s) ;
46extern void cstringSList_free (/*@only@*/ cstringSList p_s) ;
47
abd7f895 48extern void cstringSList_printSpaced (cstringSList p_s, size_t p_indent, size_t p_gap, int p_linelen);
885824d3 49
50/*@constant int cstringSListBASESIZE;@*/
51# define cstringSListBASESIZE MIDBASESIZE
52
53/*@iter cstringSList_elements (sef cstringSList x, yield exposed cstring el); @*/
54# define cstringSList_elements(x, m_el) \
55 { if (cstringSList_isDefined (x)) { \
56 int m_ind; cstring *m_elements = &((x)->elements[0]); \
57 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
58 { cstring m_el = *(m_elements++);
59
60# define end_cstringSList_elements }}}
61
62# else
63# error "Multiple include"
64# endif
65
66
67
68
This page took 0.766304 seconds and 5 git commands to generate.