40 |
#include <stdio.h> |
#include <stdio.h> |
41 |
|
|
42 |
#ifndef HAVE_STDLIB_H |
#ifndef HAVE_STDLIB_H |
|
char *malloc (); |
|
|
char *realloc (); |
|
43 |
char *getenv (); |
char *getenv (); |
|
#else |
|
|
#include <stdlib.h> |
|
44 |
#endif |
#endif |
45 |
|
|
46 |
char *xmalloc __P ((unsigned)); |
char *xmalloc __P ((unsigned)); |
164 |
xmalloc (size) |
xmalloc (size) |
165 |
unsigned size; |
unsigned size; |
166 |
{ |
{ |
167 |
char *result = malloc (size); |
char *result = (char *) malloc (size); |
168 |
if (!result) |
if (!result) |
169 |
fatal ("virtual memory exhausted", 0); |
fatal ("virtual memory exhausted", 0); |
170 |
return result; |
return result; |
175 |
char *ptr; |
char *ptr; |
176 |
unsigned size; |
unsigned size; |
177 |
{ |
{ |
178 |
char *result = realloc (ptr, size); |
char *result = (char *) realloc (ptr, size); |
179 |
if (!result) |
if (!result) |
180 |
fatal ("virtual memory exhausted", 0); |
fatal ("virtual memory exhausted", 0); |
181 |
return result; |
return result; |