signed ints, ignore negative -l value
e4fdaba8
1 file(s) · +5 −4
| 39 | 39 | static void usage(void); |
|
| 40 | 40 | ||
| 41 | 41 | static char text[BUFSIZ]; |
|
| 42 | + | static int bh, mw, mh; |
|
| 43 | + | static int inputw = 0; |
|
| 44 | + | static int promptw; |
|
| 45 | + | static int lines = 0; |
|
| 42 | 46 | static size_t cursor = 0; |
|
| 43 | 47 | static const char *font = NULL; |
|
| 44 | 48 | static const char *prompt = NULL; |
|
| 46 | 50 | static const char *normfgcolor = "#000000"; |
|
| 47 | 51 | static const char *selbgcolor = "#0066ff"; |
|
| 48 | 52 | static const char *selfgcolor = "#ffffff"; |
|
| 49 | - | static unsigned int bh, mw, mh; |
|
| 50 | - | static unsigned int inputw = 0; |
|
| 51 | - | static unsigned int lines = 0; |
|
| 52 | - | static unsigned int promptw; |
|
| 53 | 53 | static unsigned long normcol[ColLast]; |
|
| 54 | 54 | static unsigned long selcol[ColLast]; |
|
| 55 | 55 | static Atom utf8; |
|
| 444 | 444 | ||
| 445 | 445 | /* menu geometry */ |
|
| 446 | 446 | bh = dc->font.height + 2; |
|
| 447 | + | lines = MAX(lines, 0); |
|
| 447 | 448 | mh = (lines + 1) * bh; |
|
| 448 | 449 | #ifdef XINERAMA |
|
| 449 | 450 | if((info = XineramaQueryScreens(dc->dpy, &n))) { |
|