]> andersk Git - splint.git/blobdiff - src/Headers/ctypeList.h
Added va_copy to standard.h.
[splint.git] / src / Headers / ctypeList.h
index 59825d0d234a2e9c501551261e5781d421e2ac3d..d7e66ecc557f60aefd5334f3ccb3739bd0db8e09 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2000.
+** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
 ** See ../LICENSE for license information.
 **
 */
 ** (that is, not void, so any number of arguments is okay.)
 */
 
-abst_typedef /*@null@*/ struct _ctypeList
+struct s_ctypeList
 {
   int nelements;
   int nspace;
   /*@reldef@*/ /*@relnull@*/ ctype  *elements;
-} *ctypeList ;
+} ;
 
 extern int ctypeList_size (/*@sef@*/ ctypeList p_s) /*@*/ ;
 # define ctypeList_size(s)  (ctypeList_isDefined(s) ? (s)->nelements : 0)   
@@ -26,11 +26,17 @@ extern int ctypeList_size (/*@sef@*/ ctypeList p_s) /*@*/ ;
 extern /*@only@*/ ctypeList ctypeList_new(void);
 extern void ctypeList_addh (ctypeList p_s, ctype p_el) /*@modifies p_s@*/;
 
+extern /*@only@*/ ctypeList 
+   ctypeList_append (/*@returned@*/ /*@only@*/ ctypeList p_s1,
+                    ctypeList p_s2) /*@modifies p_s1@*/ ;
+
+extern ctypeList ctypeList_add (/*@only@*/ ctypeList p_s, ctype p_el) /*@modifies p_s@*/;
+
 extern /*@unused@*/ /*@only@*/ cstring ctypeList_unparse (ctypeList) /*@*/ ;
 extern void ctypeList_free (/*@only@*/ /*@only@*/ ctypeList p_s) /*@modifies p_s@*/;
 
-extern /*@falsenull@*/ bool ctypeList_isDefined (/*@null@*/ ctypeList p_ct) /*@*/ ;
-extern /*@unused@*/ /*@truenull@*/ bool 
+extern /*@falsewhennull@*/ bool ctypeList_isDefined (/*@null@*/ ctypeList p_ct) /*@*/ ;
+extern /*@unused@*/ /*@nullwhentrue@*/ bool 
   ctypeList_isUndefined (/*@null@*/ ctypeList p_ct) /*@*/ ;
 
 /*@constant null ctypeList ctypeList_undefined; @*/
@@ -39,6 +45,15 @@ extern /*@unused@*/ /*@truenull@*/ bool
 # define ctypeList_isDefined(ct)   ((ct) != ctypeList_undefined)
 # define ctypeList_isUndefined(ct) ((ct) == ctypeList_undefined)
 
+/*@iter ctypeList_elements (sef ctypeList x, yield ctype el); @*/
+# define ctypeList_elements(x, m_el) \
+   { if (!ctypeList_isUndefined(x)) \
+       { int m_ind; ctype *m_elements = &((x)->elements[0]); \
+          for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
+           { ctype m_el = *(m_elements++); 
+
+# define end_ctypeList_elements }}}
+
 /*@constant int ctypeListBASESIZE;@*/
 # define ctypeListBASESIZE SMALLBASESIZE
 
This page took 0.037551 seconds and 4 git commands to generate.