Revert "Apply case-insenstive patch"

This reverts commit d050236423.
This commit is contained in:
Mike Wilson
2025-06-18 12:25:46 -04:00
parent d050236423
commit c433a3bd20
2 changed files with 6 additions and 8 deletions

View File

@@ -8,5 +8,4 @@
### Patches
* [fuzzymatch](https://tools.suckless.org/dmenu/patches/fuzzymatch/)
* [case-insensitive](https://tools.suckless.org/dmenu/patches/case-insensitive/)
* [Fuzzymatch](https://tools.suckless.org/dmenu/patches/fuzzymatch/)

11
dmenu.c
View File

@@ -56,9 +56,8 @@ static Clr *scheme[SchemeLast];
#include "config.h"
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;
static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
static char *(*fstrstr)(const char *, const char *) = strstr;
static unsigned int
textw_clamp(const char *str, unsigned int n)
@@ -822,9 +821,9 @@ main(int argc, char *argv[])
fuzzy = 0;
else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
fast = 1;
else if (!strcmp(argv[i], "-s")) { /* case-sensitive item matching */
fstrncmp = strncmp;
fstrstr = strstr;
else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
fstrncmp = strncasecmp;
fstrstr = cistrstr;
} else if (i + 1 == argc)
usage();
/* these options take one argument */