2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3 ** See ../LICENSE for license information.
10 /* sgi's don't let you undef NULL */
17 # include "forwardTypes.h"
20 # define sfree(x) do { if (x != NULL) free(x); } while (FALSE)
22 extern void sfree (/*@out@*/ /*@only@*/ /*@null@*/ void *p_x) /*@modifies p_x@*/;
29 extern /*@out@*/ /*@only@*/ void *dimalloc (size_t p_size, const char *p_name, int p_line) /*@ensures maxSet(result) == (p_size - 1); @*/ ;
30 extern /*@only@*/ void *dicalloc (size_t p_num, size_t p_size, const char *p_name, int p_line);
31 extern /*@notnull@*/ /*@out@*/ /*@only@*/ void *
32 direalloc (/*@returned@*/ /*@only@*/ /*@out@*/ /*@null@*/ void *p_x,
33 size_t p_size, char *p_name, int p_line);
35 extern /*@only@*/ void *
36 drealloc (/*@special@*/ /*@null@*/ /*@sef@*/ void *p_x,
37 /*@sef@*/ size_t p_size)
41 extern /*@out@*/ /*@only@*/ void *dmalloc (/*@sef@*/ size_t p_size) /*@*/
42 /*@ensures maxSet(result) == (p_size - 1); @*/ ;
45 /*drl 12/28/01 Work around for self checking */
46 #ifndef LINTBUFFERCHECK
49 # define dmalloc(s) (malloc(s))
50 # define drealloc(s,l) (realloc(s,l))
52 # define dmalloc(s) (dimalloc(s, __FILE__, __LINE__))
53 # define drealloc(s,l) (direalloc(s, l, __FILE__, __LINE__))
58 # include "system_constants.h"
63 # define free(s) ; /* nothing */
72 ** no file except general.c should use primitive
81 # define malloc(s) (dimalloc(s, __FILE__, __LINE__))
82 # define calloc(n, s) (dicalloc(n, s, __FILE__, __LINE__))
83 # define realloc(v, s) (direalloc(v, s, __FILE__, __LINE__))
91 extern void sfreeEventually (/*@owned@*/ /*@null@*/ void *p_x)
92 /*@modifies internalState@*/;
94 typedef /*@dependent@*/ char *d_char;
96 /*@constant int NOT_FOUND;@*/
97 # define NOT_FOUND (-23)
99 unsigned int int_toNonNegative (int p_x) /*@*/;
101 /*drl added 4-15-2002 intened to be called on file names*/
102 extern bool cstring_isDotH (cstring p_name);
104 extern void outputCode (cstring p_st);
108 # error "Multiple include"