freebsd-dev/gnu/lib/libregex/test/xmalloc.c

22 lines
300 B
C
Raw Normal View History

1993-07-30 20:16:53 +00:00
#include <stdio.h>
extern char *malloc ();
#ifndef NULL
#define NULL 0
#endif
void *
xmalloc (size)
unsigned size;
{
1995-05-30 05:05:38 +00:00
char *new_mem = malloc (size);
1993-07-30 20:16:53 +00:00
if (new_mem == NULL)
{
fprintf (stderr, "xmalloc: request for %u bytes failed.\n", size);
abort ();
}
return new_mem;
}