add a die() function to util
This commit is contained in:
parent
c74c9c80a4
commit
2222164c27
11
util.c
11
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, ...)
|
||||
{
|
||||
|
|
1
util.h
1
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);
|
||||
|
|
Loading…
Reference in New Issue