]> andersk Git - splint.git/blobdiff - src/Headers/lctype.h
Changes to fix malloc size problem.
[splint.git] / src / Headers / lctype.h
index a58ebaa1c62815f99403f4122bc8ab7f6ccd0a18..41de16e2d343f1d65083ab27971348a4847f099e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
+** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
 ** See ../LICENSE for license information.
 **
 */
@@ -25,7 +25,8 @@ typedef enum
   CT_UNKNOWN, 
   CT_PRIM, 
   CT_USER, 
-  CT_ABST, 
+  CT_ABST,
+  CT_NUMABST, 
   CT_ENUM, 
   CT_PTR, 
   CT_ARRAY, 
@@ -73,7 +74,6 @@ typedef enum
        
 typedef enum 
 { 
-  CTK_ANYTYPE = -4,
   CTK_UNKNOWN = -3,
   CTK_INVALID = -2, 
   CTK_DNE = -1,
@@ -98,9 +98,6 @@ extern int ctkind_toInt (ctkind p_x);
 /*@constant ctype ctype_dne; @*/
 # define ctype_dne        ((ctype) CTK_DNE)
 
-/*@constant ctype ctype_anytype; @*/
-# define ctype_anytype    ((ctype) CTK_ANYTYPE)
-
 /*@constant ctype ctype_unknown; @*/
 # define ctype_unknown    CTX_UNKNOWN
 
@@ -170,6 +167,7 @@ extern bool ctype_genMatch (ctype p_c1, ctype p_c2, bool p_force, bool p_arg, bo
 
 extern bool ctype_isSimple (ctype p_c) /*@*/ ;
 extern bool ctype_isAbstract (ctype p_c) /*@*/ ;
+extern bool ctype_isNumAbstract (ctype p_c) /*@*/ ;
 extern bool ctype_isArray (ctype p_c) /*@*/ ;
 extern bool ctype_isFixedArray (ctype p_c) /*@*/ ;
 extern bool ctype_isIncompleteArray (ctype p_c) /*@*/ ;
@@ -205,7 +203,8 @@ extern bool ctype_isDouble (ctype p_c) /*@*/ ;
 extern bool ctype_isSigned (ctype p_c) /*@*/ ;
 extern bool ctype_isUnsigned (ctype p_c) /*@*/ ;
 extern bool ctype_isRealAP (ctype p_c) /*@*/ ;
-extern bool ctype_isRealAbstract(ctype p_c)  /*@*/ ;
+extern bool ctype_isRealAbstract(ctype p_c) /*@*/ ;
+extern bool ctype_isRealNumAbstract(ctype p_c) /*@*/ ;
 extern bool ctype_isRealArray (ctype p_c) /*@*/ ;
 extern bool ctype_isRealBool (ctype p_c) /*@*/ ;
 extern bool ctype_isRealFunction (ctype p_c) /*@*/ ;
@@ -215,7 +214,7 @@ extern bool ctype_isRealPointer (ctype p_c) /*@*/ ;
 extern bool ctype_isRealSU (ctype p_c) /*@*/ ;
 extern bool ctype_isRealVoid (ctype p_c) /*@*/ ;
 extern bool ctype_isStruct (ctype p_c) /*@*/ ;
-extern bool ctype_isStructorUnion(ctype p_c)  /*@*/ ;
+extern bool ctype_isStructorUnion(ctype p_c) /*@*/ ;
 extern bool ctype_isUA (ctype p_c) /*@*/ ;
 extern bool ctype_isUnion (ctype p_c) /*@*/ ;
 extern bool ctype_isVoid (ctype p_c) /*@*/ ;
@@ -236,17 +235,20 @@ extern ctkind ctkind_fromInt (int p_i) /*@*/ ;
 
 extern bool ctype_matchDef (ctype p_c1, ctype p_c2) /*@*/ ;
 extern ctype ctype_undump (char **p_c);
-extern ctype ctype_adjustPointers(int p_np, ctype p_c);
+extern ctype ctype_adjustPointers (pointers p_p, ctype p_c);
 extern ctype ctype_baseArrayPtr (ctype p_c) /*@*/ ;
 extern ctype ctype_combine (ctype p_dominant, ctype p_modifier) ;
 
 extern ctype ctype_createAbstract (typeId p_u)  /*@*/ ;
-extern ctype 
-  ctype_createEnum (/*@keep@*/ cstring p_tag, /*@keep@*/ enumNameList p_el);
+extern ctype ctype_createNumAbstract (typeId p_u)  /*@*/ ;
+
 extern ctype ctype_createForwardStruct (/*@only@*/ cstring p_n)  /*@*/ ;
 extern ctype ctype_createForwardUnion (/*@only@*/ cstring p_n)  /*@*/ ;
+extern ctype ctype_createForwardEnum (/*@only@*/ cstring p_n) /*@*/ ;
+
 extern ctype ctype_createStruct (/*@only@*/ cstring p_n, /*@only@*/ uentryList p_f);
 extern ctype ctype_createUnion (/*@only@*/ cstring p_n, /*@only@*/ uentryList p_f);
+extern ctype ctype_createEnum (/*@keep@*/ cstring p_tag, /*@keep@*/ enumNameList p_el);
 
 extern ctype ctype_createUnnamedStruct (/*@only@*/ uentryList p_f) ;
 extern ctype ctype_createUnnamedUnion (/*@only@*/ uentryList p_f) ;
@@ -255,6 +257,17 @@ extern ctype ctype_createUser (typeId p_u) ;
 extern bool ctype_isUnnamedSU (ctype p_c) /*@*/ ;
 extern bool ctype_isUser (ctype p_c) /*@*/ ;
 
+extern int ctype_getSize (ctype p_c) 
+  /* EFFECTS: Returns the expected size of type p_c.  Various flags to control? 
+  **          Returns -1 if the size is unknown (or should not be guessed). 
+  */
+ /*@*/ ;
+
+extern ctype ctype_biggerType (ctype p_c1, ctype p_c2) 
+  /* EFFECTS: returns whichever of c1 or c2 is bigger (storage requirements).
+        If they are equal, returns c1. */
+  /*@*/ ;
+
 extern ctype ctype_expectFunction(ctype p_c) ;
 extern ctype ctype_dontExpectFunction (ctype p_c) ;
 
@@ -262,12 +275,14 @@ extern ctype ctype_fixArrayPtr (ctype p_c);
 
 extern ctype ctype_getBaseType (ctype p_c) /*@*/ ;
 
+extern ctype ctype_makeAnytype (void) /*@*/ ;
+extern bool ctype_isAnytype (ctype) /*@*/ ;
+
 extern ctype ctype_makeArray (ctype p_c);
-extern ctype ctype_makeFixedArray (ctype p_c, long p_size);
+extern ctype ctype_makeFixedArray (ctype p_c, size_t p_size);
+extern ctype ctype_makeInnerFixedArray (ctype p_c, size_t p_size);
 extern ctype ctype_makeInnerArray (ctype p_c);
-extern ctype ctype_makeInnerFixedArray (ctype p_c, long p_size);
-
-extern ctype ctype_makeConj (ctype p_c1, ctype p_c2);
+extern ctype ctype_makeConj (ctype p_c1, ctype p_c2) /*@modifies internalState@*/ ;
 extern ctype ctype_makeParamsFunction (ctype p_base, /*@only@*/ uentryList p_p);
 extern ctype ctype_makeFunction (ctype p_base, /*@only@*/ uentryList p_p) /*@*/ ;
 extern ctype ctype_makeNFParamsFunction (ctype p_base, /*@only@*/ uentryList p_p) /*@*/ ;
@@ -347,9 +362,6 @@ extern bool ctype_isUndefined (ctype p_c) /*@*/ ;
 extern bool ctype_isUnknown (ctype p_c) /*@*/;
 # define ctype_isUnknown(c)       ((c) == CTX_UNKNOWN)
 
-extern bool ctype_isAnytype (ctype p_c) /*@*/;
-# define ctype_isAnytype(c)       ((c) == ctype_anytype)
-
 extern bool ctype_isBogus (/*@sef@*/ ctype p_c) /*@*/ ;
 # define ctype_isBogus(c)         (ctype_isUndefined(c) || ctype_isUnknown(c))
 
@@ -368,7 +380,7 @@ extern /*@unused@*/ void ctype_printTable (void);
 extern ctype ctype_widest (ctype, ctype) /*@*/ ;
 
 /* drl modified */
-extern long int ctype_getArraySize (ctype p_c);
+extern size_t ctype_getArraySize (ctype p_c);
 /*end drl add functions */
 
 /* Should only be used in uentry.c */
This page took 0.041144 seconds and 4 git commands to generate.