JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
continued with draw.c abstraction, also started util.{h,c} implementation, that will...
[dwm.git] / util.c
diff --git a/util.c b/util.c
new file mode 100644 (file)
index 0000000..51acd1a
--- /dev/null
+++ b/util.c
@@ -0,0 +1,17 @@
+/* See LICENSE file for copyright and license details. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "util.h"
+
+void
+die(const char *errstr, ...) {
+       va_list ap;
+
+       va_start(ap, errstr);
+       vfprintf(stderr, errstr, ap);
+       va_end(ap);
+       exit(EXIT_FAILURE);
+}
+