From df4a225ccf79dd9f5fa3faef4fd68ae87471f0ca Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Fri, 13 Sep 2024 11:11:18 -0400 Subject: better --- lib/error.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/error.c b/lib/error.c index 78f75ef..352a60d 100644 --- a/lib/error.c +++ b/lib/error.c @@ -3,10 +3,14 @@ #include char *current_file = "file.asm"; +int log_disabled = 1; __attribute__((format(printf, 4, 5))) void __log_impl_pos(int line, int column, int type, const char *format, ...) { + if (log_disabled) + return; + va_list list; va_start(list, format); @@ -31,6 +35,9 @@ void __log_impl_pos(int line, int column, int type, const char *format, ...) __attribute__((format(printf, 2, 3))) void __log_impl(int type, const char *format, ...) { + if (log_disabled) + return; + va_list list; va_start(list, format); -- cgit v1.2.3-freya