]> andersk Git - splint.git/blobdiff - src/ctype.c
Updating for cert move
[splint.git] / src / ctype.c
index cfd20bfa3e1ca8b3a8d99c69314addcfe64ed806..02cd2a5ccb386444c2f2c6141b305b4ea61bcc21 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 */
+
+long 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.029711 seconds and 4 git commands to generate.