12345678910111213141516171819202122232425262728293031323334353637383940 |
- #ifndef EMALLOC_SOURCE
- #define EMALLOC_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <errno.h>
- #include "../tools/error.h"
- void * emalloc (size_t length)
- {
- void * memory = malloc (length);
- if (! memory)
- {
- error (1, errno, "need %lu bytes", (long) (length));
- }
- return (memory);
- }
- #endif
|