diff --git a/util.c b/util.c index 5230dbe8..3c00b2e0 100644 --- a/util.c +++ b/util.c @@ -30,6 +30,17 @@ #include "util.h" +void +die(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); + abort(); +} + void eprint(const char *fmt, ...) { diff --git a/util.h b/util.h index 7bdc0344..736943c8 100644 --- a/util.h +++ b/util.h @@ -118,6 +118,7 @@ static inline char *a_strdup(const char *s) return len ? p_dup(s, len + 1) : NULL; } +void die(const char *, ...) __attribute__ ((noreturn)) __attribute__ ((format(printf, 1, 2))); void eprint(const char *, ...) __attribute__ ((noreturn)) __attribute__ ((format(printf, 1, 2))); void uicb_spawn(Display *, int, DC *, awesome_config *, const char *); Bool xgettextprop(Display *, Window, Atom, char *, unsigned int);