diff options
Diffstat (limited to 'lib/lib.h')
-rw-r--r-- | lib/lib.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/lib.h b/lib/lib.h new file mode 100644 index 0000000..35cbc3c --- /dev/null +++ b/lib/lib.h @@ -0,0 +1,13 @@ +#pragma once + +#include <stddef.h> + +__attribute__((__noreturn__, format(printf, 1, 2))) +void error_and_die(char *format, ...); + +__attribute__((__noreturn__, format(printf, 1, 2))) +void perror_and_die(char *format, ...); + +void *xalloc(size_t amount); +void *xzalloc(size_t amount); +void *xrealloc(void *ptr, size_t amount); |