From f21d46ea7def76221c4173f644eb2188ae9edbb1 Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Sat, 8 Dec 2012 10:13:01 +0100 Subject: continued with draw.c abstraction, also started util.{h,c} implementation, that will be used by draw.c as well --- util.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 util.c (limited to 'util.c') diff --git a/util.c b/util.c new file mode 100644 index 0000000..51acd1a --- /dev/null +++ b/util.c @@ -0,0 +1,17 @@ +/* See LICENSE file for copyright and license details. */ +#include +#include +#include + +#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); +} + -- cgit v1.2.3-54-g00ecf