diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:38:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:38:57 +0000 |
commit | f5b6b735a731901f09d7f3cc153c1d869269ee83 (patch) | |
tree | 565a1b0f3c6a4094a5f2198879fb239053549f1e /gl/lib/strcasestr.c | |
parent | Adding upstream version 2.12.0. (diff) | |
download | man-db-upstream/2.12.1.tar.xz man-db-upstream/2.12.1.zip |
Adding upstream version 2.12.1.upstream/2.12.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gl/lib/strcasestr.c')
-rw-r--r-- | gl/lib/strcasestr.c | 10 |
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++; } |