#include #include #include /** * Malloc, fatal on error. */ void *abac_xmalloc(size_t size) { void *ret; ret = malloc(size); if (ret == NULL) err(1, "malloc"); return ret; } /** * strdup fatal on error */ char *abac_xstrdup(char *source) { char *ret; if (source == NULL) return NULL; ret = strdup(source); if (ret == NULL) err(1, "strdup"); return ret; }