X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/28bf4b0bfd405a2057d865910f8589c54a40f17b..69db2541c57e431cbd87bf1ae1eb25f34bc70743:/src/Headers/general.h diff --git a/src/Headers/general.h b/src/Headers/general.h index e711a68..e210675 100644 --- a/src/Headers/general.h +++ b/src/Headers/general.h @@ -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. ** */ @@ -19,14 +19,14 @@ # ifdef USEDMALLOC # define sfree(x) do { if (x != NULL) free(x); } while (FALSE) # else -extern void sfree (/*@out@*/ /*@only@*/ /*@null@*/ void *p_x) /*@modifies *p_x@*/; +extern void sfree (/*@out@*/ /*@only@*/ /*@null@*/ void *p_x) /*@modifies p_x@*/; # endif # include "misc.h" # include "cstring.h" # include "bool.h" -extern /*@out@*/ /*@only@*/ void *dimalloc (size_t p_size, const char *p_name, int p_line); +extern /*@out@*/ /*@only@*/ void *dimalloc (size_t p_size, const char *p_name, int p_line) /*@ensures maxSet(result) == (p_size - 1); @*/ ; extern /*@only@*/ void *dicalloc (size_t p_num, size_t p_size, const char *p_name, int p_line); extern /*@notnull@*/ /*@out@*/ /*@only@*/ void * direalloc (/*@returned@*/ /*@only@*/ /*@out@*/ /*@null@*/ void *p_x, @@ -38,7 +38,12 @@ extern /*@only@*/ void * /*@releases p_x@*/ /*@modifies *p_x@*/ ; -extern /*@out@*/ /*@only@*/ void *dmalloc (/*@sef@*/ size_t p_size) /*@*/ ; +extern /*@out@*/ /*@only@*/ void *dmalloc (/*@sef@*/ size_t p_size) /*@*/ + /*@ensures maxSet(result) == (p_size - 1); @*/ ; + + + /*drl 12/28/01 Work around for self checking */ +#ifndef LINTBUFFERCHECK # ifdef USEDMALLOC # define dmalloc(s) (malloc(s)) @@ -48,6 +53,8 @@ extern /*@out@*/ /*@only@*/ void *dmalloc (/*@sef@*/ size_t p_size) /*@*/ ; # define drealloc(s,l) (direalloc(s, l, __FILE__, __LINE__)) # endif +#endif + # include "system_constants.h" # ifdef USEGC @@ -89,6 +96,8 @@ typedef /*@dependent@*/ char *d_char; /*@constant int NOT_FOUND;@*/ # define NOT_FOUND (-23) +unsigned int int_toNonNegative (int p_x) /*@*/; + # else # error "Multiple include" # endif