8 #define LENGTH(x) (sizeof(x) / sizeof(*x))
9 #define MAX(A, B) ((A) > (B) ? (A) : (B))
10 #define MIN(A, B) ((A) < (B) ? (A) : (B))
11 #define BOOLSTR(A) ((A) ? "true" : "false")
13 #define XCB_CONFIG_WINDOW_X_Y_WIDTH_HEIGHT XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT
14 #define XCB_CONFIG_WINDOW_X_Y XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y
17 #define REMLEN(x) (BUFSIZ - strlen(x) - 1)
20 # define PUTS(x) puts(x)
21 # define PRINTF(x,...) printf(x, __VA_ARGS__)
23 # define PUTS(x) ((void)0)
24 # define PRINTF(x,...) ((void)0)
27 void warn(char *, ...);
28 __attribute__((noreturn))
29 void err(char *, ...);
30 uint32_t get_color(char *);