aboutsummaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index a1daa03..f67af22 100644
--- a/src/common.h
+++ b/src/common.h
@@ -2,6 +2,7 @@
#define COMMON_H
#include <stdio.h>
+#include <stdlib.h>
#define __RED__ "\033[0;31m"
#define __GREEN__ "\033[0;32m"
@@ -17,4 +18,13 @@
// #define info(...) printf(__VA_ARGS__);
// #define err(...) printf(__VA_ARGS__);
+#define die(...) do { \
+ err(__VA_ARGS__); \
+ abort(); \
+ } while(0)
+
+void *xmalloc(size_t size);
+void *xcalloc(size_t nmemb, size_t size);
+void *xrealloc(void *ptr, size_t size);
+
#endif