diff options
author | Anselm R Garbe | 2012-12-08 10:13:01 +0100 |
---|---|---|
committer | Anselm R Garbe | 2012-12-08 10:13:01 +0100 |
commit | 56de9e990a460177ce10ad0776c495bce7a08cd0 (patch) | |
tree | 2b2b76ebd5dcbf43603b5ad580242b98102a041e /util.c | |
parent | ab6d8eafe9593ef98c83a9fe16c2353278f54b1a (diff) | |
download | aur-56de9e990a460177ce10ad0776c495bce7a08cd0.tar.gz |
continued with draw.c abstraction, also started util.{h,c} implementation, that will be used by draw.c as well
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/util.c b/util.c new file mode 100644 index 000000000000..51acd1aed516 --- /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); +} + |