summaryrefslogtreecommitdiffstats
path: root/gl/lib/strcasestr.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:39:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:39:01 +0000
commit0feb9db220a276a2f8f29621dc8f04072bbfdd22 (patch)
tree926d3ec04fbe095eb6465e66c25c10c46aebd62c /gl/lib/strcasestr.c
parentReleasing progress-linux version 2.12.0-4~progress7.99u1. (diff)
downloadman-db-0feb9db220a276a2f8f29621dc8f04072bbfdd22.tar.xz
man-db-0feb9db220a276a2f8f29621dc8f04072bbfdd22.zip
Merging upstream version 2.12.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gl/lib/strcasestr.c')
-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++;
}