You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2016/06/09 01:05:45 UTC
svn commit: r1747478 - in /httpd/httpd/trunk: include/httpd.h server/util.c
Author: wrowe
Date: Thu Jun 9 01:05:45 2016
New Revision: 1747478
URL: http://svn.apache.org/viewvc?rev=1747478&view=rev
Log:
Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen
This time, with merge-ability back into 2.4.x
Modified:
httpd/httpd/trunk/include/httpd.h
httpd/httpd/trunk/server/util.c
Modified: httpd/httpd/trunk/include/httpd.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?rev=1747478&r1=1747477&r2=1747478&view=diff
==============================================================================
--- httpd/httpd/trunk/include/httpd.h (original)
+++ httpd/httpd/trunk/include/httpd.h Thu Jun 9 01:05:45 2016
@@ -2470,23 +2470,32 @@ AP_DECLARE(int) ap_array_str_contains(co
const char *s);
/**
- * Known-fast version of strcasecmp(): ASCII case-folding, POSIX compliant
- * @param s1 The 1st string to compare
- * @param s2 The 2nd string to compare
- * @return 0 if s1 is lexicographically equal to s2 ignoring case;
- * non-0 otherwise.
+ * Perform a case-insensitive comparison of two strings @a atr1 and @a atr2,
+ * treating upper and lower case values of the 26 standard C/POSIX alphabetic
+ * characters as equivalent. Extended latin characters outside of this set
+ * are treated as unique octets, irrespective of the current locale.
+ *
+ * Returns in integer greater than, equal to, or less than 0,
+ * according to whether @a str1 is considered greater than, equal to,
+ * or less than @a str2.
+ *
+ * @note Same code as apr_cstr_casecmp, which arrives in APR 1.6
*/
-AP_DECLARE(int) ap_casecmpstr(const char *s1, const char *s2);
+AP_DECLARE(int) ap_cstr_casecmp(const char *s1, const char *s2);
/**
- * Known-fast version of strncasecmp(): ASCII case-folding, POSIX compliant
- * @param s1 The 1st string to compare
- * @param s2 The 2nd string to compare
- * @param n Maximum number of characters in the strings to compare
- * @return 0 if s1 is lexicographically equal to s2 ignoring case;
- * non-0 otherwise.
+ * Perform a case-insensitive comparison of two strings @a atr1 and @a atr2,
+ * treating upper and lower case values of the 26 standard C/POSIX alphabetic
+ * characters as equivalent. Extended latin characters outside of this set
+ * are treated as unique octets, irrespective of the current locale.
+ *
+ * Returns in integer greater than, equal to, or less than 0,
+ * according to whether @a str1 is considered greater than, equal to,
+ * or less than @a str2.
+ *
+ * @note Same code as apr_cstr_casecmp, which arrives in APR 1.6
*/
-AP_DECLARE(int) ap_casecmpstrn(const char *s1, const char *s2, apr_size_t n);
+AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n);
#ifdef __cplusplus
}
Modified: httpd/httpd/trunk/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1747478&r1=1747477&r2=1747478&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util.c (original)
+++ httpd/httpd/trunk/server/util.c Thu Jun 9 01:05:45 2016
@@ -3316,7 +3316,7 @@ static const short ucharmap[] = {
};
#endif
-AP_DECLARE(int) ap_casecmpstrn(const char *s1, const char *s2)
+AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2)
{
const unsigned char *str1 = (const unsigned char *)s1;
const unsigned char *str2 = (const unsigned char *)s2;
@@ -3333,7 +3333,7 @@ AP_DECLARE(int) ap_casecmpstrn(const cha
}
}
-AP_DECLARE(int) ap_casecmpstrn(const char *s1, const char *s2, apr_size_t n)
+AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n)
{
const unsigned char *str1 = (const unsigned char *)s1;
const unsigned char *str2 = (const unsigned char *)s2;