]> git.lizzy.rs Git - bspwm.git/blobdiff - utils.h
the name
[bspwm.git] / utils.h
diff --git a/utils.h b/utils.h
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..22e2c883119bc6fe69dd558f5a80340dd63f9673 100644 (file)
--- a/utils.h
+++ b/utils.h
@@ -0,0 +1,24 @@
+#ifndef _UTILS_H
+#define _UTILS_H
+
+#define LENGTH(x)         (sizeof(x) / sizeof(*x))
+#define MAX(A, B)         ((A) > (B) ? (A) : (B))
+#define MIN(A, B)         ((A) < (B) ? (A) : (B))
+#define RESPONSE_TYPE(e)  (e->response_type & ~0x80)
+
+#if 1
+#  define PUTS(x)            puts(x);
+#  define PRINTF(x,...)      printf(x, ##__VA_ARGS__);
+#else
+#  define PUTS(x)            ;
+#  define PRINTF(x)          ;
+#endif
+
+typedef enum {
+    false,
+    true
+} bool;
+
+void die(const char *, ...);
+
+#endif