aa1c6c44f7f5de7d114a3a91bbb6d9a631f46630
[games.git] / gnu / lib / libregex / test / xmalloc.c
1 #include <stdio.h>
2 extern char *malloc ();
3
4 #ifndef NULL
5 #define NULL 0
6 #endif
7
8 void *
9 xmalloc (size)
10   unsigned size;
11 {
12   char *new_mem = malloc (size);
13
14   if (new_mem == NULL)
15     {
16       fprintf (stderr, "xmalloc: request for %u bytes failed.\n", size);
17       abort ();
18     }
19
20   return new_mem;
21 }