aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/eprintf.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-01-11 09:11:51 +0100
committerMattias Andrée <maandree@kth.se>2017-01-11 09:11:51 +0100
commitb7a82c980fe7e0c1f9029b55be97422428d65d5a (patch)
tree67bedc856eb1f72a2daa8ef8347b904269b06df5 /src/util/eprintf.h
parentvu-crop: add -t (diff)
downloadblind-b7a82c980fe7e0c1f9029b55be97422428d65d5a.tar.gz
blind-b7a82c980fe7e0c1f9029b55be97422428d65d5a.tar.bz2
blind-b7a82c980fe7e0c1f9029b55be97422428d65d5a.tar.xz
Clean up code
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/util/eprintf.h')
-rw-r--r--src/util/eprintf.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/eprintf.h b/src/util/eprintf.h
new file mode 100644
index 0000000..a9b342f
--- /dev/null
+++ b/src/util/eprintf.h
@@ -0,0 +1,10 @@
+/* See LICENSE file for copyright and license details. */
+#include <stdlib.h>
+
+void weprintf(const char *fmt, ...);
+
+#define eprintf(...)\
+ (weprintf(__VA_ARGS__), exit(1))
+
+#define enprintf(status, ...)\
+ (weprintf(__VA_ARGS__), exit(status))