9 #define LENGTH(x) (sizeof(x) / sizeof(*x))
10 #define MAX(A, B) ((A) > (B) ? (A) : (B))
11 #define MIN(A, B) ((A) < (B) ? (A) : (B))
12 #define BOOLSTR(A) ((A) ? "true" : "false")
14 #define XCB_CONFIG_WINDOW_X_Y_WIDTH_HEIGHT XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT
15 #define XCB_CONFIG_WINDOW_X_Y XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y
18 #define REMLEN(x) (BUFSIZ - strlen(x) - 1)
21 # define PUTS(x) puts(x)
22 # define PRINTF(x,...) printf(x, __VA_ARGS__)
24 # define PUTS(x) ((void)0)
25 # define PRINTF(x,...) ((void)0)
28 void warn(char *, ...);
29 __attribute__((noreturn))
30 void err(char *, ...);
31 uint32_t get_color(char *);
32 void update_pointer_position(xcb_point_t *);