X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=helpers.h;h=49684b0bd473cb06661e197afb5a295e8a3178af;hb=931e735e97cb09ef1be14b19513c24918bbc337c;hp=f68e96ec10e6d01f35289a0256d9172b000fed69;hpb=e31accb4b85ccad468268bf5ed60ecdcc99004ae;p=bspwm.git diff --git a/helpers.h b/helpers.h index f68e96e..49684b0 100644 --- a/helpers.h +++ b/helpers.h @@ -1,21 +1,30 @@ #ifndef _HELPERS_H #define _HELPERS_H +#include +#include +#include + #define LENGTH(x) (sizeof(x) / sizeof(*x)) #define MAX(A, B) ((A) > (B) ? (A) : (B)) #define MIN(A, B) ((A) < (B) ? (A) : (B)) #define BOOLSTR(A) ((A) ? "true" : "false") -#define MAXLEN 256 #define XCB_CONFIG_WINDOW_X_Y_WIDTH_HEIGHT XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT #define XCB_CONFIG_WINDOW_X_Y XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y -#if 1 -# define PUTS(x) puts(x); -# define PRINTF(x,...) printf(x, ##__VA_ARGS__); +#ifdef DEBUG +# define PUTS(x) puts(x) +# define PRINTF(x,...) printf(x, __VA_ARGS__) #else -# define PUTS(x) ; -# define PRINTF(x) ; +# define PUTS(x) ((void)0) +# define PRINTF(x,...) ((void)0) #endif +void logmsg(FILE *, char *, va_list); +void warn(char *, ...); +__attribute__((noreturn)) +void die(char *, ...); +uint32_t get_color(char *); + #endif