tweaks: elide a subfunction that is used just once
(Forgot to say: the previous two commits addressed https://savannah.gnu.org/bugs/?54044.)master
parent
6c555828c9
commit
ba2e6f43c2
|
@ -530,15 +530,11 @@ char *mbrevstrcasestr(const char *haystack, const char *needle,
|
||||||
return revstrcasestr(haystack, needle, pointer);
|
return revstrcasestr(haystack, needle, pointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function is equivalent to strlen() for multibyte strings. */
|
/* Count the number of (multibyte) characters in the given string. */
|
||||||
size_t mbstrlen(const char *s)
|
size_t mbstrlen(const char *s)
|
||||||
{
|
{
|
||||||
return mbstrnlen(s, (size_t)-1);
|
size_t maxlen = (size_t)-1;
|
||||||
}
|
|
||||||
|
|
||||||
/* This function is equivalent to strnlen() for multibyte strings. */
|
|
||||||
size_t mbstrnlen(const char *s, size_t maxlen)
|
|
||||||
{
|
|
||||||
#ifdef ENABLE_UTF8
|
#ifdef ENABLE_UTF8
|
||||||
if (use_utf8) {
|
if (use_utf8) {
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
|
|
|
@ -222,7 +222,6 @@ char *mbstrcasestr(const char *haystack, const char *needle);
|
||||||
char *revstrstr(const char *haystack, const char *needle, const char *index);
|
char *revstrstr(const char *haystack, const char *needle, const char *index);
|
||||||
char *mbrevstrcasestr(const char *haystack, const char *needle, const char *index);
|
char *mbrevstrcasestr(const char *haystack, const char *needle, const char *index);
|
||||||
size_t mbstrlen(const char *s);
|
size_t mbstrlen(const char *s);
|
||||||
size_t mbstrnlen(const char *s, size_t maxlen);
|
|
||||||
#if !defined(NANO_TINY) || defined(ENABLE_JUSTIFY)
|
#if !defined(NANO_TINY) || defined(ENABLE_JUSTIFY)
|
||||||
char *mbstrchr(const char *s, const char *c);
|
char *mbstrchr(const char *s, const char *c);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue