home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #1
/
MONSTER.ISO
/
prog
/
gen
/
regex011.taz
/
regex011
/
regex-0.11
/
test
/
xmalloc.c
< prev
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-09-16
|
303 b
|
22 lines
#include <stdio.h>
extern char *malloc ();
#ifndef NULL
#define NULL 0
#endif
void *
xmalloc (size)
unsigned size;
{
char *new_mem = malloc (size);
if (new_mem == NULL)
{
fprintf (stderr, "xmalloc: request for %u bytes failed.\n", size);
abort ();
}
return new_mem;
}