From: Axel Wagner Date: Thu, 16 Sep 2010 23:16:53 +0000 (+0200) Subject: Define Macros MAX and MIN X-Git-Tag: 4.0.1~7^2~69 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4ec3e7a61956a1b5ec81ac29fdadc4402226ad3b;p=i3%2Fi3 Define Macros MAX and MIN --- diff --git a/i3bar/include/util.h b/i3bar/include/util.h index 0f5dd3e3..7e638152 100644 --- a/i3bar/include/util.h +++ b/i3bar/include/util.h @@ -11,6 +11,10 @@ #include "queue.h" +/* Get the maximum/minimum of x and y */ +#define MAX(x,y) ((x) > (y) ? (x) : (y)) +#define MIN(x,y) ((x) < (y) ? (x) : (y)) + /* Securely free p */ #define FREE(p) do { \ if (p != NULL) { \