123456789101112131415161718192021222324252627282930313233343536373839 |
- #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
|