From cbe5e88e4f6b1ae147ba9c8adf958b9bf584058a Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Tue, 25 Mar 2008 10:18:17 +0000 Subject: using limits.h --- dmenu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dmenu.c') diff --git a/dmenu.c b/dmenu.c index 78c5a75..3d3a928 100644 --- a/dmenu.c +++ b/dmenu.c @@ -1,5 +1,6 @@ /* See LICENSE file for copyright and license details. */ #include +#include #include #include #include @@ -629,7 +630,7 @@ setup(int x, int y, int w) { mw = w ? w : DisplayWidth(dpy, screen); mh = dc.font.height + 2; if(y < 0) { - if(y == ((~(unsigned int)0)/2)+1) + if(y == INT_MIN) y = DisplayHeight(dpy, screen) - mh; else y = (-1 * y) - mh; @@ -709,7 +710,7 @@ main(int argc, char *argv[]) { else if(!strcmp(argv[i], "-y")) { if(++i < argc) if(!strcmp(argv[i], "-0")) - y = ((~(unsigned int)0)/2)+1; + y = INT_MIN; else y = atoi(argv[i]); } -- cgit v1.2.3-13-gbd6f