Applied patch dmenu-caseinsensitive-5.0
parent
a140c508b0
commit
d8ff6423a6
6
dmenu.1
6
dmenu.1
|
@ -3,7 +3,7 @@
|
||||||
dmenu \- dynamic menu
|
dmenu \- dynamic menu
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B dmenu
|
.B dmenu
|
||||||
.RB [ \-bfiv ]
|
.RB [ \-bfsv ]
|
||||||
.RB [ \-l
|
.RB [ \-l
|
||||||
.IR lines ]
|
.IR lines ]
|
||||||
.RB [ \-m
|
.RB [ \-m
|
||||||
|
@ -44,8 +44,8 @@ dmenu appears at the bottom of the screen.
|
||||||
dmenu grabs the keyboard before reading stdin if not reading from a tty. This
|
dmenu grabs the keyboard before reading stdin if not reading from a tty. This
|
||||||
is faster, but will lock up X until stdin reaches end\-of\-file.
|
is faster, but will lock up X until stdin reaches end\-of\-file.
|
||||||
.TP
|
.TP
|
||||||
.B \-i
|
.B \-s
|
||||||
dmenu matches menu items case insensitively.
|
dmenu matches menu items case sensitively.
|
||||||
.TP
|
.TP
|
||||||
.BI \-l " lines"
|
.BI \-l " lines"
|
||||||
dmenu lists items vertically, with the given number of lines.
|
dmenu lists items vertically, with the given number of lines.
|
||||||
|
|
11
dmenu.c
11
dmenu.c
|
@ -55,8 +55,9 @@ static Clr *scheme[SchemeLast];
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
|
static char * cistrstr(const char *s, const char *sub);
|
||||||
static char *(*fstrstr)(const char *, const char *) = strstr;
|
static int (*fstrncmp)(const char *, const char *, size_t) = strncasecmp;
|
||||||
|
static char *(*fstrstr)(const char *, const char *) = cistrstr;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
appenditem(struct item *item, struct item **list, struct item **last)
|
appenditem(struct item *item, struct item **list, struct item **last)
|
||||||
|
@ -727,9 +728,9 @@ main(int argc, char *argv[])
|
||||||
topbar = 0;
|
topbar = 0;
|
||||||
else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
|
else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
|
||||||
fast = 1;
|
fast = 1;
|
||||||
else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
|
else if (!strcmp(argv[i], "-s")) { /* case-sensitive item matching */
|
||||||
fstrncmp = strncasecmp;
|
fstrncmp = strncmp;
|
||||||
fstrstr = cistrstr;
|
fstrstr = strstr;
|
||||||
} else if (i + 1 == argc)
|
} else if (i + 1 == argc)
|
||||||
usage();
|
usage();
|
||||||
/* these options take one argument */
|
/* these options take one argument */
|
||||||
|
|
Loading…
Reference in New Issue