util.h (611B)
1 /* See LICENSE file for copyright and license details. */ 2 #include <stdint.h> 3 #include <stdarg.h> 4 #include <X11/Xlib.h> 5 6 extern char buf[1024]; 7 8 #define LEN(x) (sizeof (x) / sizeof *(x)) 9 10 extern char *argv0; 11 12 void warn(const char *, ...); 13 void die(const char *, ...); 14 15 int evsnprintf(char *str, size_t size, const char *fmt, va_list ap); 16 int esnprintf(char *str, size_t size, const char *fmt, ...); 17 const char *bprintf(const char *fmt, ...); 18 const char *fmt_human(uintmax_t num, int base); 19 int pscanf(const char *path, const char *fmt, ...); 20 Display *getdisplay(void); 21 void closedisplay(void); 22 void watch(int);