11 # define UTIL_INLINE __inline__ 12 # if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 13 # define UTIL_UNUSED __attribute__ ((unused)) 23 #define SIZEOF_VOID_P 4 32 #if SIZEOF_VOID_P == 8 && SIZEOF_INT == 4 41 #define strsav util_strsav 44 #define NIL(type) ((type *) 0) 46 #if defined(USE_MM) || defined(MNEMOSYNE) 58 #include "mnemosyne.h" 59 #define ALLOC(type, num) \ 60 ((num) ? ((type *) malloc(sizeof(type) * (num))) : \ 61 ((type *) malloc(sizeof(long)))) 63 #define ALLOC(type, num) \ 64 ((type *) malloc(sizeof(type) * (num))) 66 #define REALLOC(type, obj, num) \ 67 (obj) ? ((type *) realloc((char *) obj, sizeof(type) * (num))) : \ 68 ((type *) malloc(sizeof(type) * (num))) 70 ((obj) ? (free((char *) (obj)), (obj) = 0) : 0) 76 #define ALLOC(type, num) \ 77 ((type *) MMalloc((long) sizeof(type) * (long) (num))) 78 #define REALLOC(type, obj, num) \ 79 ((type *) MMrealloc((char *) (obj), (long) sizeof(type) * (long) (num))) 81 ((obj) ? (free((char *) (obj)), (obj) = 0) : 0) 86 #if defined(ultrix) || defined(SABER) || defined(aiws) || defined(hpux) || defined(apollo) || defined(__osf__) || defined(__SVR4) || defined(__GNUC__) 87 #define VOID_OR_INT void 88 #define VOID_OR_CHAR void 90 #define VOID_OR_INT int 91 #define VOID_OR_CHAR char 101 #if !defined(__STDC__) && !defined(__cplusplus) 108 #if (defined(__STDC__) || defined(__cplusplus) || defined(ultrix)) && !defined(MNEMOSYNE) || defined(__SVR4) 114 # if !defined(MNEMOSYNE) && !defined(_IBMR2) 120 extern double atof();
125 #if defined(__STDC__) || defined(__cplusplus) || defined(_IBMR2) || defined(ultrix) 141 #define assert(ex) {\ 143 (void) fprintf(stderr,\ 144 "Assertion failed: file %s, line %d\n\"%s\"\n",\ 145 __FILE__, __LINE__, "ex");\ 146 (void) fflush(stdout);\ 157 (void) fprintf(stderr, "Fatal error: file %s, line %d\n%s\n",\ 158 __FILE__, __LINE__, why);\ 159 (void) fflush(stdout);\ 168 #define ALLOC(type, num) (((type *) 0) + (num)) 169 #define REALLOC(type, obj, num) ((obj) + (num)) 174 #define ABS(a) ((a) < 0 ? -(a) : (a)) 175 #define MAX(a,b) ((a) > (b) ? (a) : (b)) 176 #define MIN(a,b) ((a) < (b) ? (a) : (b)) 189 extern int util_pipefork (
char *
const *, FILE **, FILE **,
int *);
195 extern void util_restart (
char const *,
char const *,
int);
int util_pipefork(char *const *, FILE **, FILE **, int *)
void util_restart(char const *, char const *, int)
int util_save_image(char const *, char const *)
void MMout_of_memory(long)
char * util_file_search(char const *, char *, char const *)
unsigned long getSoftDataLimit(void)
void(* MMoutOfMemory)(long)
char * MMrealloc(char *, long)
void util_print_cpu_stats(FILE *)
char * util_tilde_expand(char const *)
char * util_strsav(char const *)
char * util_print_time(unsigned long)
char * util_path_search(char const *)