1
0
Fork 0

signed ints, ignore negative -l value

This commit is contained in:
Connor Lane Smith 2010-08-18 17:33:34 +01:00
parent 849f1dd7a3
commit e4fdaba88d

View file

@ -39,6 +39,10 @@ static void setup(void);
static void usage(void); static void usage(void);
static char text[BUFSIZ]; static char text[BUFSIZ];
static int bh, mw, mh;
static int inputw = 0;
static int promptw;
static int lines = 0;
static size_t cursor = 0; static size_t cursor = 0;
static const char *font = NULL; static const char *font = NULL;
static const char *prompt = NULL; static const char *prompt = NULL;
@ -46,10 +50,6 @@ static const char *normbgcolor = "#cccccc";
static const char *normfgcolor = "#000000"; static const char *normfgcolor = "#000000";
static const char *selbgcolor = "#0066ff"; static const char *selbgcolor = "#0066ff";
static const char *selfgcolor = "#ffffff"; static const char *selfgcolor = "#ffffff";
static unsigned int bh, mw, mh;
static unsigned int inputw = 0;
static unsigned int lines = 0;
static unsigned int promptw;
static unsigned long normcol[ColLast]; static unsigned long normcol[ColLast];
static unsigned long selcol[ColLast]; static unsigned long selcol[ColLast];
static Atom utf8; static Atom utf8;
@ -444,6 +444,7 @@ setup(void) {
/* menu geometry */ /* menu geometry */
bh = dc->font.height + 2; bh = dc->font.height + 2;
lines = MAX(lines, 0);
mh = (lines + 1) * bh; mh = (lines + 1) * bh;
#ifdef XINERAMA #ifdef XINERAMA
if((info = XineramaQueryScreens(dc->dpy, &n))) { if((info = XineramaQueryScreens(dc->dpy, &n))) {