]> git.lizzy.rs Git - bspwm.git/blobdiff - helpers.h
Cosmetic changes
[bspwm.git] / helpers.h
index e89fa09f6dae94a965fe595c0e169bfb5c5451dc..9a1037c22b6874a2916d1a9aff18c4a0f55c2080 100644 (file)
--- a/helpers.h
+++ b/helpers.h
 #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
+#define MAXLEN 256
 
-#if 1
-#  define PUTS(x)            puts(x);
-#  define PRINTF(x,...)      printf(x, ##__VA_ARGS__);
+#define REMLEN(x)         (BUFSIZ - strlen(x) - 1)
+
+#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 *, ...);
+void err(char *, ...);
 uint32_t get_color(char *);
 
 #endif