summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dmenu.c5
1 files changed, 3 insertions, 2 deletions
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 <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]);
}
an class='deletions'>-2/+2 2010-05-09changing default value of NOBACKGROUNDGravatar Enno Boland (tox) 1-1/+1 2010-05-09added js-fix by Troels Henriksen. Thanks :)Gravatar Enno Boland (tox) 1-9/+17 2010-05-08Do not set cookie session time if set to 0Gravatar pancake 2-2/+5 2010-05-06implementing naive file locking.Gravatar Enno Boland (tox) 1-0/+7 2010-05-06fixing compilerwarning in newer webkit versionsGravatar Enno Boland (tox) 1-2/+1 2010-05-06fixing config.mkGravatar Enno Boland (tox) 1-1/+1 2010-05-02Adding small fix by Alex Puterbaugh. Thanks.Gravatar Enno Boland (tox) 2-7/+6 2010-04-08remove empty linesGravatar pancake 1-3/+1 2010-03-29whoops... linking OoGravatar Enno Boland (tox) 1-3/+3 2010-03-26typofix.Gravatar Enno Boland (tox) 2-5/+5 2010-03-25reimplementing cookies. Now we need some file locking.Gravatar Enno Boland (tox) 1-2/+14 2010-03-25updating manpage, reformating help output.Gravatar Enno Boland (tox) 2-9/+19 2010-03-24fixing argument parsing.Gravatar Enno Boland (tox) 1-0/+2 2010-03-24fixing downloadsGravatar Enno Boland (tox) 1-8/+6 2010-03-24gotheaders will now be called correctly.Gravatar Enno Boland (tox) 1-1/+6