From 0c9dc7318361c93e837c8f4bc5c29869076c36cd Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 21 Jul 2025 20:48:01 +0900 Subject: feat: implement va_*() functions --- common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'common.c') diff --git a/common.c b/common.c index fcc0790..678065a 100644 --- a/common.c +++ b/common.c @@ -1,5 +1,9 @@ -void fatal_error(const char* msg) { - fprintf(stderr, "%s\n", msg); +void fatal_error(const char* msg, ...) { + va_list args; + va_start(args, msg); + vfprintf(stderr, msg, args); + va_end(args); + fprintf(stderr, "\n"); exit(1); } -- cgit v1.2.3-70-g09d2