--- ray/src/common/ealloc.c 2003/07/30 10:11:06 2.6 +++ ray/src/common/ealloc.c 2003/11/14 17:22:06 2.8 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ealloc.c,v 2.6 2003/07/30 10:11:06 schorsch Exp $"; +static const char RCSid[] = "$Id: ealloc.c,v 2.8 2003/11/14 17:22:06 schorsch Exp $"; #endif /* * ealloc.c - memory routines which call quit on error. @@ -13,7 +13,7 @@ static const char RCSid[] = "$Id: ealloc.c,v 2.6 2003/ #include "rterror.h" -char * /* return pointer to n uninitialized bytes */ +extern char * /* return pointer to n uninitialized bytes */ emalloc(unsigned int n) { register char *cp; @@ -26,10 +26,11 @@ emalloc(unsigned int n) eputs("Out of memory in emalloc\n"); quit(1); + return NULL; /* pro forma return */ } -char * /* return pointer to initialized memory */ +extern char * /* return pointer to initialized memory */ ecalloc(register unsigned int ne, unsigned int es) { register char *cp; @@ -49,7 +50,7 @@ ecalloc(register unsigned int ne, unsigned int es) } -char * /* reallocate cp to size n */ +extern char * /* reallocate cp to size n */ erealloc(register char *cp, unsigned int n) { if (n == 0) { @@ -68,10 +69,11 @@ erealloc(register char *cp, unsigned int n) eputs("Out of memory in erealloc\n"); quit(1); + return NULL; /* pro forma return */ } -void /* free memory allocated by above */ +extern void /* free memory allocated by above */ efree(char *cp) { free((void *)cp);