From 8fe4bd084412f3085638907268c5ffd8bf93c339 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 31 Oct 2016 09:45:17 +0100 Subject: curl_strequal: part of public API/ABI, needs to be kept These two public functions have been mentioned as deprecated since a very long time but since they are still part of the API and ABI we need to keep them around. --- lib/strcase.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'lib/strcase.c') diff --git a/lib/strcase.c b/lib/strcase.c index 22b9692e2..5f2b700e0 100644 --- a/lib/strcase.c +++ b/lib/strcase.c @@ -102,7 +102,7 @@ char Curl_raw_toupper(char in) * @unittest: 1301 */ -int curl_strcasecompare(const char *first, const char *second) +int Curl_strcasecompare(const char *first, const char *second) { while(*first && *second) { if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second)) @@ -120,7 +120,7 @@ int curl_strcasecompare(const char *first, const char *second) /* * @unittest: 1301 */ -int curl_strncasecompare(const char *first, const char *second, size_t max) +int Curl_strncasecompare(const char *first, const char *second, size_t max) { while(*first && *second && max) { if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second)) { @@ -150,3 +150,14 @@ void Curl_strntoupper(char *dest, const char *src, size_t n) *dest++ = Curl_raw_toupper(*src); } while(*src++ && --n); } + +/* --- public functions --- */ + +int curl_strequal(const char *first, const char *second) +{ + return Curl_strcasecompare(first, second); +} +int curl_strnequal(const char *first, const char *second, size_t max) +{ + return Curl_strncasecompare(first, second, max); +} -- cgit v1.2.3