From 43392fc66ab207e53a6924a2edbcd7ca0acecea8 Mon Sep 17 00:00:00 2001 From: A404M Date: Sat, 18 Jan 2025 20:42:54 +0330 Subject: initial commit --- src/utils/log.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/utils/log.c (limited to 'src/utils/log.c') diff --git a/src/utils/log.c b/src/utils/log.c new file mode 100644 index 0000000..f54394a --- /dev/null +++ b/src/utils/log.c @@ -0,0 +1,15 @@ +#include "log.h" + +#include +#include +#include + +void _printLogBack(const char *format, const char *file, int line, ...) { + va_list args; + va_start(args, end); + char *errorStr; + vasprintf(&errorStr, format, args); + + printf("\e[0;31mError: %s at compiler %s:%d\e[0m\n", errorStr, file, line); + free(errorStr); +} -- cgit v1.2.3