summaryrefslogtreecommitdiff
path: root/src/lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.h')
-rw-r--r--src/lib.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib.h b/src/lib.h
new file mode 100644
index 0000000..c007187
--- /dev/null
+++ b/src/lib.h
@@ -0,0 +1,12 @@
+#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 *xrealloc(void *ptr, size_t amount);