aboutsummaryrefslogtreecommitdiff
path: root/surf/common.c
diff options
context:
space:
mode:
authorMarvin Borner2019-03-05 01:09:01 +0100
committerMarvin Borner2019-03-05 01:09:01 +0100
commit55457187d18221e76bd12f0fb2cfab65c49b92fb (patch)
tree8db042d2d80710d54100c2709ad4332153ac848a /surf/common.c
Initial commit
Diffstat (limited to 'surf/common.c')
-rw-r--r--surf/common.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/surf/common.c b/surf/common.c
new file mode 100644
index 0000000..42662ed
--- /dev/null
+++ b/surf/common.c
@@ -0,0 +1,15 @@
+#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(1);
+}
+