summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorcflip <cflip@cflip.net>2023-01-11 11:34:19 -0700
committercflip <cflip@cflip.net>2023-01-11 11:34:19 -0700
commit54d0e32bced43dc3d85b41e30bcb1fa430ae90dc (patch)
treee7d961b9dcac64e4ff06f7caa410fbeb3241672c /error.c
parent0324dda2cc779bcd6d3eb425216e29b37a9a95ed (diff)
Use the new error function with the new window and font code
Diffstat (limited to 'error.c')
-rw-r--r--error.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/error.c b/error.c
index 4944ff4..e42bae1 100644
--- a/error.c
+++ b/error.c
@@ -1,11 +1,15 @@
#include "error.h"
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
-void fatal_error(const char *msg)
+void fatal_error(const char *msgfmt, ...)
{
- perror(msg);
+ va_list args;
+ va_start(args, msgfmt);
+ vfprintf(stderr, msgfmt, args);
+ va_end(args);
exit(-1);
}