]> andersk Git - splint.git/blobdiff - src/ctype.c
We're now able to generate Maxset constraints for fixed sized arrays.
[splint.git] / src / ctype.c
index cfd20bfa3e1ca8b3a8d99c69314addcfe64ed806..911c00b0377502353acbd1b28291854b03cd4980 100644 (file)
@@ -2377,3 +2377,22 @@ ctype_widest (ctype c1, ctype c2)
       return c1;
     }
 }
+
+/*drl 11/28/2000 */
+/* requires that the type is an fixed array */
+/* return the size of the array */
+
+int ctype_getArraySize (ctype c)
+{
+  ctentry cte = ctype_getCtentry (c);
+  ctbase ctb;
+  llassert ( (ctentry_getKind (cte) ==  CTK_COMPLEX) || (ctentry_getKind(cte) == CTK_ARRAY) );
+
+  ctb = cte->ctbase;
+
+  llassert (ctbase_isDefined (ctb) );
+  
+  llassert (ctb->type == CT_FIXEDARRAY);
+
+  return (ctb->contents.farray->size);
+}
This page took 0.238137 seconds and 4 git commands to generate.