]> git.lizzy.rs Git - bspwm.git/blob - helpers.h
Dropping Lua for message parsing
[bspwm.git] / helpers.h
1 #ifndef _HELPERS_H
2 #define _HELPERS_H
3
4 #define LENGTH(x)         (sizeof(x) / sizeof(*x))
5 #define MAX(A, B)         ((A) > (B) ? (A) : (B))
6 #define MIN(A, B)         ((A) < (B) ? (A) : (B))
7 #define BOOLSTR(A)        ((A) ? "true" : "false")
8
9 #if 1
10 #  define PUTS(x)            puts(x);
11 #  define PRINTF(x,...)      printf(x, ##__VA_ARGS__);
12 #else
13 #  define PUTS(x)            ;
14 #  define PRINTF(x)          ;
15 #endif
16
17 typedef enum {
18     false,
19     true
20 } bool;
21
22 #endif