projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test-stddef: test for (some) offsetof bugs
[gnulib.git]
/
lib
/
c-strcasestr.c
diff --git
a/lib/c-strcasestr.c
b/lib/c-strcasestr.c
index
0185ba9
..
86908d6
100644
(file)
--- a/
lib/c-strcasestr.c
+++ b/
lib/c-strcasestr.c
@@
-1,5
+1,5
@@
/* c-strcasestr.c -- case insensitive substring search in C locale
/* c-strcasestr.c -- case insensitive substring search in C locale
- Copyright (C) 2005-20
08
Free Software Foundation, Inc.
+ Copyright (C) 2005-20
10
Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This program is free software: you can redistribute it and/or modify
Written by Bruno Haible <bruno@clisp.org>, 2005.
This program is free software: you can redistribute it and/or modify
@@
-28,11
+28,11
@@
/* Two-Way algorithm. */
#define RETURN_TYPE char *
/* 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)) \
+#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
&& ((h_l) = (j) + (n_l)))
#define CANON_ELEMENT c_tolower
-#define CMP_FUNC(p1, p2, l) \
+#define CMP_FUNC(p1, p2, l)
\
c_strncasecmp ((const char *) (p1), (const char *) (p2), l)
#include "str-two-way.h"
c_strncasecmp ((const char *) (p1), (const char *) (p2), l)
#include "str-two-way.h"
@@
-52,7
+52,7
@@
c_strcasestr (const char *haystack_start, const char *needle_start)
NEEDLE if HAYSTACK is too short). */
while (*haystack && *needle)
ok &= (c_tolower ((unsigned char) *haystack++)
NEEDLE if HAYSTACK is too short). */
while (*haystack && *needle)
ok &= (c_tolower ((unsigned char) *haystack++)
- == c_tolower ((unsigned char) *needle++));
+
== c_tolower ((unsigned char) *needle++));
if (*needle)
return NULL;
if (ok)
if (*needle)
return NULL;
if (ok)
@@
-66,12
+66,12
@@
c_strcasestr (const char *haystack_start, const char *needle_start)
ISO C 99 section 6.2.6.1. */
if (needle_len < LONG_NEEDLE_THRESHOLD)
return two_way_short_needle ((const unsigned char *) haystack,
ISO C 99 section 6.2.6.1. */
if (needle_len < LONG_NEEDLE_THRESHOLD)
return two_way_short_needle ((const unsigned char *) haystack,
- haystack_len,
- (const unsigned char *) needle_start,
- needle_len);
+
haystack_len,
+
(const unsigned char *) needle_start,
+
needle_len);
return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
- (const unsigned char *) needle_start,
- needle_len);
+
(const unsigned char *) needle_start,
+
needle_len);
}
#undef LONG_NEEDLE_THRESHOLD
}
#undef LONG_NEEDLE_THRESHOLD