X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/dba23062bad40afb1a90f60b6897cf9e1ca5035b..605630c14522759a0a7521d3d74ee2340591147f:/util.c?ds=sidebyside diff --git a/util.c b/util.c index 930b374..3e5fd1e 100644 --- a/util.c +++ b/util.c @@ -2,24 +2,15 @@ * (C)opyright MMVI Anselm R. Garbe * See LICENSE file for license details. */ +#include "dwm.h" #include #include #include -#include #include #include -#include "dwm.h" - -void -eprint(const char *errstr, ...) { - va_list ap; - va_start(ap, errstr); - vfprintf(stderr, errstr, ap); - va_end(ap); - exit(1); -} +/* static */ static void bad_malloc(unsigned int size) @@ -29,6 +20,8 @@ bad_malloc(unsigned int size) exit(1); } +/* extern */ + void * emallocz(unsigned int size) { @@ -38,6 +31,15 @@ emallocz(unsigned int size) return res; } +void +eprint(const char *errstr, ...) { + va_list ap; + va_start(ap, errstr); + vfprintf(stderr, errstr, ap); + va_end(ap); + exit(1); +} + void spawn(Arg *arg) {