mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
chore: remove unused function tr_strcasestr() (#2552)
This commit is contained in:
@@ -568,9 +568,7 @@ set(NEEDED_FUNCTIONS
|
|||||||
pwrite
|
pwrite
|
||||||
sendfile64
|
sendfile64
|
||||||
statvfs
|
statvfs
|
||||||
strcasestr
|
|
||||||
strlcpy
|
strlcpy
|
||||||
strsep
|
|
||||||
syslog
|
syslog
|
||||||
uselocale)
|
uselocale)
|
||||||
|
|
||||||
|
|||||||
@@ -3283,11 +3283,8 @@
|
|||||||
"-DWITH_UTP",
|
"-DWITH_UTP",
|
||||||
"-D__TRANSMISSION__",
|
"-D__TRANSMISSION__",
|
||||||
"-DHAVE_STRLCPY",
|
"-DHAVE_STRLCPY",
|
||||||
"-DHAVE_STRLCAT",
|
|
||||||
"-DHAVE_ASPRINTF",
|
"-DHAVE_ASPRINTF",
|
||||||
"-DHAVE_LIBGEN",
|
"-DHAVE_LIBGEN",
|
||||||
"-DHAVE_STRCASECMP",
|
|
||||||
"-DHAVE_STRCASESTR",
|
|
||||||
"-DHAVE_ZLIB",
|
"-DHAVE_ZLIB",
|
||||||
"-DHAVE_ICONV",
|
"-DHAVE_ICONV",
|
||||||
);
|
);
|
||||||
@@ -3478,11 +3475,8 @@
|
|||||||
"-DWITH_UTP",
|
"-DWITH_UTP",
|
||||||
"-D__TRANSMISSION__",
|
"-D__TRANSMISSION__",
|
||||||
"-DHAVE_STRLCPY",
|
"-DHAVE_STRLCPY",
|
||||||
"-DHAVE_STRLCAT",
|
|
||||||
"-DHAVE_ASPRINTF",
|
"-DHAVE_ASPRINTF",
|
||||||
"-DHAVE_LIBGEN",
|
"-DHAVE_LIBGEN",
|
||||||
"-DHAVE_STRCASECMP",
|
|
||||||
"-DHAVE_STRCASESTR",
|
|
||||||
"-DHAVE_ZLIB",
|
"-DHAVE_ZLIB",
|
||||||
"-DHAVE_ICONV",
|
"-DHAVE_ICONV",
|
||||||
);
|
);
|
||||||
@@ -3730,11 +3724,8 @@
|
|||||||
"-DWITH_UTP",
|
"-DWITH_UTP",
|
||||||
"-D__TRANSMISSION__",
|
"-D__TRANSMISSION__",
|
||||||
"-DHAVE_STRLCPY",
|
"-DHAVE_STRLCPY",
|
||||||
"-DHAVE_STRLCAT",
|
|
||||||
"-DHAVE_ASPRINTF",
|
"-DHAVE_ASPRINTF",
|
||||||
"-DHAVE_LIBGEN",
|
"-DHAVE_LIBGEN",
|
||||||
"-DHAVE_STRCASECMP",
|
|
||||||
"-DHAVE_STRCASESTR",
|
|
||||||
"-DHAVE_ZLIB",
|
"-DHAVE_ZLIB",
|
||||||
"-DHAVE_ICONV",
|
"-DHAVE_ICONV",
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -466,23 +466,6 @@ bool tr_wildmat(char const* text, char const* p)
|
|||||||
return (p[0] == '*' && p[1] == '\0') || (DoMatch(text, p) != 0);
|
return (p[0] == '*' && p[1] == '\0') || (DoMatch(text, p) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
char const* tr_strcasestr(char const* haystack, char const* needle)
|
|
||||||
{
|
|
||||||
#ifdef HAVE_STRCASESTR
|
|
||||||
|
|
||||||
return strcasestr(haystack, needle);
|
|
||||||
|
|
||||||
#elif defined(_WIN32)
|
|
||||||
|
|
||||||
return StrStrIA(haystack, needle);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#error please open a PR to implement tr_strcasestr() for your platform
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
char* tr_strdup_printf(char const* fmt, ...)
|
char* tr_strdup_printf(char const* fmt, ...)
|
||||||
{
|
{
|
||||||
evbuffer* const buf = evbuffer_new();
|
evbuffer* const buf = evbuffer_new();
|
||||||
|
|||||||
@@ -276,9 +276,6 @@ char const* tr_strerror(int errnum);
|
|||||||
/** @brief Returns true if the string ends with the specified case-insensitive suffix */
|
/** @brief Returns true if the string ends with the specified case-insensitive suffix */
|
||||||
bool tr_str_has_suffix(char const* str, char const* suffix);
|
bool tr_str_has_suffix(char const* str, char const* suffix);
|
||||||
|
|
||||||
/** @brief Portability wrapper for strcasestr() that uses the system implementation if available */
|
|
||||||
char const* tr_strcasestr(char const* haystack, char const* needle);
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
std::string tr_strlower(T in)
|
std::string tr_strlower(T in)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user