diff options
author | Anselm R Garbe <garbeam@gmail.com> | 2008-03-25 10:18:17 +0000 |
---|---|---|
committer | Anselm R Garbe <garbeam@gmail.com> | 2008-03-25 10:18:17 +0000 |
commit | cbe5e88e4f6b1ae147ba9c8adf958b9bf584058a (patch) | |
tree | 07504350e2c79976e3c49037b2e408a2bcb19a9c /dmenu.c | |
parent | 2fe3ccdf581105f4232d5714cee1ebe40870087f (diff) | |
download | dmenu-cbe5e88e4f6b1ae147ba9c8adf958b9bf584058a.tar.gz dmenu-cbe5e88e4f6b1ae147ba9c8adf958b9bf584058a.tar.bz2 dmenu-cbe5e88e4f6b1ae147ba9c8adf958b9bf584058a.zip |
using limits.h
Diffstat (limited to 'dmenu.c')
-rw-r--r-- | dmenu.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,6 @@ /* See LICENSE file for copyright and license details. */ #include <ctype.h> +#include <limits.h> #include <locale.h> #include <stdarg.h> #include <stdlib.h> @@ -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]); } |