caseinsensitive: avoid declaring cistrstr twice

This commit is contained in:
bakkeby 2024-07-17 08:50:07 +02:00
parent a3a5229059
commit 1c584542f4

17
dmenu.c
View File

@ -178,15 +178,6 @@ static Clr *scheme[SchemeLast];
#include "config.h"
#if CASEINSENSITIVE_PATCH
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;
#else
static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
static char *(*fstrstr)(const char *, const char *) = strstr;
#endif // CASEINSENSITIVE_PATCH
static unsigned int
textw_clamp(const char *str, unsigned int n)
{
@ -216,6 +207,14 @@ static void run(void);
static void setup(void);
static void usage(void);
#if CASEINSENSITIVE_PATCH
static int (*fstrncmp)(const char *, const char *, size_t) = strncasecmp;
static char *(*fstrstr)(const char *, const char *) = cistrstr;
#else
static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
static char *(*fstrstr)(const char *, const char *) = strstr;
#endif // CASEINSENSITIVE_PATCH
#include "patch/include.c"
static void