summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
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);
}