| 13 |
|
|
| 14 |
|
#include "rterror.h" |
| 15 |
|
|
| 16 |
< |
char * /* return pointer to n uninitialized bytes */ |
| 16 |
> |
extern char * /* return pointer to n uninitialized bytes */ |
| 17 |
|
emalloc(unsigned int n) |
| 18 |
|
{ |
| 19 |
|
register char *cp; |
| 26 |
|
|
| 27 |
|
eputs("Out of memory in emalloc\n"); |
| 28 |
|
quit(1); |
| 29 |
+ |
return NULL; /* pro forma return */ |
| 30 |
|
} |
| 31 |
|
|
| 32 |
|
|
| 33 |
< |
char * /* return pointer to initialized memory */ |
| 33 |
> |
extern char * /* return pointer to initialized memory */ |
| 34 |
|
ecalloc(register unsigned int ne, unsigned int es) |
| 35 |
|
{ |
| 36 |
|
register char *cp; |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
|
| 53 |
< |
char * /* reallocate cp to size n */ |
| 53 |
> |
extern char * /* reallocate cp to size n */ |
| 54 |
|
erealloc(register char *cp, unsigned int n) |
| 55 |
|
{ |
| 56 |
|
if (n == 0) { |
| 69 |
|
|
| 70 |
|
eputs("Out of memory in erealloc\n"); |
| 71 |
|
quit(1); |
| 72 |
+ |
return NULL; /* pro forma return */ |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
|
| 76 |
< |
void /* free memory allocated by above */ |
| 76 |
> |
extern void /* free memory allocated by above */ |
| 77 |
|
efree(char *cp) |
| 78 |
|
{ |
| 79 |
|
free((void *)cp); |