X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=i3bar%2Finclude%2Futil.h;h=43c56c58d3e93794d6f56becc86ae128a73d84bb;hb=6ff3f7abad8bed8c82302a671091d2ad3ac0fa6b;hp=6094932071ec299aed1af14f9fe29d8ec468e44a;hpb=22bac9fd9a6b3a2bf12aea124c519e2c9f22f855;p=i3%2Fi3 diff --git a/i3bar/include/util.h b/i3bar/include/util.h index 60949320..43c56c58 100644 --- a/i3bar/include/util.h +++ b/i3bar/include/util.h @@ -1,9 +1,8 @@ /* - * i3bar - an xcb-based status- and ws-bar for i3 + * vim:ts=4:sw=4:expandtab * - * © 2010-2011 Axel Wagner and contributors - * - * See file LICNSE for license information + * i3 - an improved dynamic tiling window manager + * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE) * */ #ifndef UTIL_H_ @@ -12,7 +11,9 @@ #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)) /* Securely free p */ @@ -52,6 +53,11 @@ } \ } while(0) +/* We will include libi3.h which define its own version of ELOG. + * We want *our* version, so we undef the libi3 one. */ +#if defined(ELOG) +#undef ELOG +#endif #define ELOG(fmt, ...) do { \ fprintf(stderr, "[%s:%d] ERROR: " fmt, __FILE__, __LINE__, ##__VA_ARGS__); \ } while(0)