summaryrefslogtreecommitdiff
path: root/crash.c
diff options
context:
space:
mode:
Diffstat (limited to 'crash.c')
-rw-r--r--crash.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/crash.c b/crash.c
new file mode 100644
index 0000000..f28d88a
--- /dev/null
+++ b/crash.c
@@ -0,0 +1,12 @@
+#include "crash.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void crash(const char* format, ...) {
+ va_list args;
+ va_start(args, format);
+ vfprintf(stderr, format, args);
+ exit(1);
+ va_end(args);
+} \ No newline at end of file