home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
328_02
/
wrealloc.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-17
|
519b
|
26 lines
/* WREALLOC.C - shell for realloc() function.
*
*/
#include "wsys.h"
static char OUTOF[] = "OUT OF MEMORY IN ";
void *wrealloc ( void *ptr, size_t size, char *errmsg )
{
char both_messages[80];
ptr = realloc ( ptr, size );
_NORMALIZE (ptr); /* model-dependent */
if ( !ptr && errmsg )
{
strcpy (both_messages, OUTOF);
strcat (both_messages, errmsg);
werror ( 'W', both_messages );
}
return (ptr);
}
/*------------------- end WREALLOC.C --------------------------*/