From a7bb8ace49f5725e0f92336ab5af28b4c8900aff Mon Sep 17 00:00:00 2001 From: kartofen Date: Mon, 14 Aug 2023 21:20:39 +0300 Subject: parser done --- src/common.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/common.h') 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 +#include #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 -- cgit v1.2.3