summaryrefslogtreecommitdiffstats
path: root/gl/lib/strcasestr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gl/lib/strcasestr.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gl/lib/strcasestr.c b/gl/lib/strcasestr.c
index 8eea435..b8c0479 100644
--- a/gl/lib/strcasestr.c
+++ b/gl/lib/strcasestr.c
@@ -1,5 +1,5 @@
/* Case-insensitive searching in a string.
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This file is free software: you can redistribute it and/or modify
@@ -23,14 +23,12 @@
#include <ctype.h>
#include <strings.h>
-#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
-
/* Two-Way algorithm. */
#define RETURN_TYPE char *
#define AVAILABLE(h, h_l, j, n_l) \
(!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \
&& ((h_l) = (j) + (n_l)))
-#define CANON_ELEMENT(c) TOLOWER (c)
+#define CANON_ELEMENT(c) tolower (c)
#define CMP_FUNC(p1, p2, l) \
strncasecmp ((const char *) (p1), (const char *) (p2), l)
#include "str-two-way.h"
@@ -52,8 +50,8 @@ strcasestr (const char *haystack_start, const char *needle_start)
NEEDLE if HAYSTACK is too short). */
while (*haystack && *needle)
{
- ok &= (TOLOWER ((unsigned char) *haystack)
- == TOLOWER ((unsigned char) *needle));
+ ok &= (tolower ((unsigned char) *haystack)
+ == tolower ((unsigned char) *needle));
haystack++;
needle++;
}