patch: case insensitive by default
This commit is contained in:
parent
9e27e75682
commit
d50a045782
9
dmenu.c
9
dmenu.c
|
|
@ -66,8 +66,9 @@ static Clr *scheme[SchemeLast];
|
|||
|
||||
#include "config.h"
|
||||
|
||||
static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
|
||||
static char *(*fstrstr)(const char *, const char *) = strstr;
|
||||
static char * cistrstr(const char *s, const char *sub);
|
||||
static int (*fstrncmp)(const char *, const char *, size_t) = strncasecmp;
|
||||
static char *(*fstrstr)(const char *, const char *) = cistrstr;
|
||||
|
||||
|
||||
|
||||
|
|
@ -1018,8 +1019,8 @@ main(int argc, char *argv[])
|
|||
else if (!strcmp(argv[i], "-F")) /* grabs keyboard before reading stdin */
|
||||
fuzzy = 0;
|
||||
else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
|
||||
fstrncmp = strncasecmp;
|
||||
fstrstr = cistrstr;
|
||||
fstrncmp = strncmp;
|
||||
fstrstr = strstr;
|
||||
} else if (!strcmp(argv[i], "-P")) /* is the input a password */
|
||||
passwd = 1;
|
||||
else if (!strcmp(argv[i], "-r")) /* reject input which results in no match */
|
||||
|
|
|
|||
Loading…
Reference in New Issue