aboutsummaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2023-08-14 21:20:39 +0300
committerkartofen <mladenovnasko0@gmail.com>2023-08-14 21:20:39 +0300
commita7bb8ace49f5725e0f92336ab5af28b4c8900aff (patch)
tree5d00d7a5d159e9702b46c23542fffc09e591c271 /src/common.h
parentf83187a830deff27ce0cdd4c175ffe2785461685 (diff)
parser done
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