2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2000.
3 ** See ../LICENSE for license information.
9 abst_typedef /*@null@*/ struct _cstringList
13 /*@reldef@*/ /*@relnull@*/ o_cstring *elements;
16 /*@constant null cstringList cstringList_undefined;@*/
17 # define cstringList_undefined ((cstringList) NULL)
19 extern /*@falsenull@*/ bool cstringList_isDefined (cstringList p_s) /*@*/ ;
20 # define cstringList_isDefined(s) ((s) != cstringList_undefined)
22 extern int cstringList_size (/*@sef@*/ cstringList) /*@*/ ;
23 # define cstringList_size(s) (cstringList_isDefined (s) ? (s)->nelements : 0)
25 extern /*@unused@*/ /*@falsenull@*/ bool cstringList_empty (/*@sef@*/ cstringList) /*@*/ ;
26 # define cstringList_empty(s) (cstringList_size(s) == 0)
28 extern cstring cstringList_unparseSep (cstringList p_s, cstring p_sep) /*@*/ ;
30 extern /*@unused@*/ /*@only@*/ cstringList cstringList_new (void) /*@*/ ;
32 extern /*@only@*/ cstringList cstringList_single (/*@keep@*/ cstring p_el) /*@*/ ;
35 cstringList_add (/*@returned@*/ cstringList p_s, /*@keep@*/ cstring p_el)
38 extern /*@unused@*/ void cstringList_alphabetize (cstringList p_s);
39 extern /*@unused@*/ /*@only@*/ cstring cstringList_unparseAbbrev (cstringList p_s) /*@*/ ;
40 extern /*@unused@*/ /*@only@*/ cstring cstringList_unparse (cstringList p_s) ;
41 extern void cstringList_free (/*@only@*/ cstringList p_s) ;
43 extern /*@unused@*/ void cstringList_printSpaced (cstringList p_s, int p_indent, int p_gap, int p_linelen);
45 /*@constant int cstringListBASESIZE;@*/
46 # define cstringListBASESIZE MIDBASESIZE
48 /*@iter cstringList_elements (sef cstringList x, yield exposed cstring el); @*/
49 # define cstringList_elements(x, m_el) \
50 { if (cstringList_isDefined (x)) { \
51 int m_ind; cstring *m_elements = &((x)->elements[0]); \
52 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
53 { cstring m_el = *(m_elements++);
55 # define end_cstringList_elements }}}
58 # error "Multiple include"