]> git.lizzy.rs Git - bspwm.git/blobdiff - utils.c
Dump tree
[bspwm.git] / utils.c
diff --git a/utils.c b/utils.c
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..53e076afa722bb1decf5c3b3062af767bd211b93 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -0,0 +1,12 @@
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void die(const char *errstr, ...) {
+    va_list ap;
+
+    va_start(ap, errstr);
+    vfprintf(stderr, errstr, ap);
+    va_end(ap);
+    exit(EXIT_FAILURE);
+}