2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * See LICENSE file for license details.
16 bad_malloc(unsigned int size)
18 eprint("fatal: could not malloc() %u bytes\n", size);
24 emalloc(unsigned int size)
26 void *res = malloc(size);
33 emallocz(unsigned int size)
35 void *res = calloc(1, size);
43 eprint(const char *errstr, ...)
48 vfprintf(stderr, errstr, ap);
54 estrdup(const char *str)
56 void *res = strdup(str);
58 bad_malloc(strlen(str));
63 swap(void **p1, void **p2)