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 void ctypeList_free (/*@only@*/ /*@only@*/ ctypeList p_s
) /*@modifies p_s@*/;
31 extern /*@falsewhennull@*/ bool ctypeList_isDefined (/*@null@*/ ctypeList p_ct
) /*@*/ ;
32 extern /*@unused@*/ /*@nullwhentrue@*/ bool
33 ctypeList_isUndefined (/*@null@*/ ctypeList p_ct
) /*@*/ ;
35 /*@constant null ctypeList ctypeList_undefined; @*/
36 # define ctypeList_undefined ((ctypeList) NULL)
38 # define ctypeList_isDefined(ct) ((ct) != ctypeList_undefined)
39 # define ctypeList_isUndefined(ct) ((ct) == ctypeList_undefined)
41 /*@iter ctypeList_elements (sef ctypeList x, yield ctype el); @*/
42 # define ctypeList_elements(x, m_el) \
43 { if (!ctypeList_isUndefined(x)) \
44 { int m_ind; ctype *m_elements = &((x)->elements[0]); \
45 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
46 { ctype m_el = *(m_elements++);
48 # define end_ctypeList_elements }}}
50 /*@constant int ctypeListBASESIZE;@*/
51 # define ctypeListBASESIZE SMALLBASESIZE
54 # error "Multiple include"