From 84ee267b5da8be94e7e5b17298ce1f101c79cc67 Mon Sep 17 00:00:00 2001 From: Lorenzo Torres Date: Sun, 2 Nov 2025 20:58:04 +0100 Subject: [PATCH] added fatal() in log.h --- core/log.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/log.h b/core/log.h index 03173c8..fdb0a2a 100644 --- a/core/log.h +++ b/core/log.h @@ -3,6 +3,7 @@ #define LOG_H #include +#include #define log_error_code(msg) do { printf("\x1b[31m" "[ERROR]" "\x1b[0m" "(" __FILE__ ":" __LINE__ "): %s", (msg)); } while (0) #define log_warning_code(msg) do { printf("\x1b[33m" "[WARN]" "\x1b[0m" "(" __FILE__ ":" __LINE__ "): %s", (msg)); } while (0) @@ -12,4 +13,6 @@ #define log_warning(msg) do { printf("\x1b[33m" "[WARN]" "\x1b[0m: %s", (msg)); } while (0) #define log_info(msg) do { printf("\x1b[32m" "[INFO]" "\x1b[0m: %s", (msg)); } while (0) +#define fatal(msg) do { log_error(msg); exit(1); } while (0) + #endif