2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
10 ** there is a special ctypeList used to represent the () argument list
11 ** this has nelements = -1
13 ** (that is, not void, so any number of arguments is okay.)
20 /*@reldef@*/ /*@relnull@*/ ctype *elements;
23 extern int ctypeList_size (/*@sef@*/ ctypeList p_s) /*@*/ ;
24 # define ctypeList_size(s) (ctypeList_isDefined(s) ? (s)->nelements : 0)
26 extern /*@only@*/ ctypeList ctypeList_new(void);
27 extern void ctypeList_addh (ctypeList p_s, ctype p_el) /*@modifies p_s@*/;
29 extern /*@only@*/ ctypeList
30 ctypeList_append (/*@returned@*/ /*@only@*/ ctypeList p_s1,
31 ctypeList p_s2) /*@modifies p_s1@*/ ;
33 extern ctypeList ctypeList_add (/*@only@*/ ctypeList p_s, ctype p_el) /*@modifies p_s@*/;
35 extern /*@unused@*/ /*@only@*/ cstring ctypeList_unparse (ctypeList) /*@*/ ;
36 extern void ctypeList_free (/*@only@*/ /*@only@*/ ctypeList p_s) /*@modifies p_s@*/;
38 extern /*@falsewhennull@*/ bool ctypeList_isDefined (/*@null@*/ ctypeList p_ct) /*@*/ ;
39 extern /*@unused@*/ /*@nullwhentrue@*/ bool
40 ctypeList_isUndefined (/*@null@*/ ctypeList p_ct) /*@*/ ;
42 /*@constant null ctypeList ctypeList_undefined; @*/
43 # define ctypeList_undefined ((ctypeList) NULL)
45 # define ctypeList_isDefined(ct) ((ct) != ctypeList_undefined)
46 # define ctypeList_isUndefined(ct) ((ct) == ctypeList_undefined)
48 /*@iter ctypeList_elements (sef ctypeList x, yield ctype el); @*/
49 # define ctypeList_elements(x, m_el) \
50 { if (!ctypeList_isUndefined(x)) \
51 { int m_ind; ctype *m_elements = &((x)->elements[0]); \
52 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
53 { ctype m_el = *(m_elements++);
55 # define end_ctypeList_elements }}}
57 /*@constant int ctypeListBASESIZE;@*/
58 # define ctypeListBASESIZE SMALLBASESIZE
61 # error "Multiple include"