From 950363bc086d0866d611b165705543876819042d Mon Sep 17 00:00:00 2001 From: sebastid Date: Fri, 4 Nov 2005 23:10:34 +0000 Subject: [PATCH] Correct contains definition. SVN revision: 18302 --- src/bin/e.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e.h b/src/bin/e.h index dfed7a124..ce20b2b9d 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -69,7 +69,7 @@ typedef struct _E_Rect E_Rect; #define E_FN_DEL(_fn, _h) if (_h) { _fn(_h); _h = NULL; } #define E_INTERSECTS(x, y, w, h, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && (((x) + (w)) > (xx)) && (((y) + (h)) > (yy))) #define E_INSIDE(x, y, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && ((x) >= (xx)) && ((y) >= (yy))) -#define E_CONTAINS(x, y, w, h, xx, yy, ww, hh) (((xx) >= (x)) && (((x) + (w)) <= ((xx) + (ww))) && ((yy) >= (y)) && (((y) + (h)) <= ((yy) + (hh)))) +#define E_CONTAINS(x, y, w, h, xx, yy, ww, hh) (((xx) >= (x)) && (((x) + (w)) >= ((xx) + (ww))) && ((yy) >= (y)) && (((y) + (h)) >= ((yy) + (hh)))) #define E_SPANS_COMMON(x1, w1, x2, w2) (!((((x2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1))))) #define E_REALLOC(p, s, n) p = (s *)realloc(p, sizeof(s) * n) #define E_NEW(s, n) (s *)calloc(n, sizeof(s))