]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/include/util.h
only LOG() the DPI when it changes, DLOG() it otherwise (Thanks lkraav)
[i3/i3] / i3bar / include / util.h
index 262d7750c80bc7c6ef6c70363e116d50b81e4bcb..468eff3eec59c955107629535e9a70f4558ed95e 100644 (file)
 #include "queue.h"
 
 /* Get the maximum/minimum of x and y */
+#undef MAX
 #define MAX(x,y) ((x) > (y) ? (x) : (y))
+#undef MIN
 #define MIN(x,y) ((x) < (y) ? (x) : (y))
 
+#define STARTS_WITH(string, len, needle) ((len >= strlen(needle)) && strncasecmp(string, needle, strlen(needle)) == 0)
+
 /* Securely free p */
 #define FREE(p) do { \
     if (p != NULL) { \
@@ -44,6 +48,9 @@
     } \
 } while (0)
 
+#if defined(DLOG)
+#undef DLOG
+#endif
 /* Use cool logging-macros */
 #define DLOG(fmt, ...) do { \
     if (config.verbose) { \