# HG changeset patch # User Mike Becker # Date 1526315243 -7200 # Node ID 5b97de37aada8aa111893ba506b7545898bd8f27 # Parent 5d28dc8f076555859d962ab6e5d32242be32ca6a finally removes the underscore of ugliness from ucx_str_cmp() and ucx_str_casecmp() diff -r 5d28dc8f0765 -r 5b97de37aada src/string.c --- a/src/string.c Mon May 14 18:25:20 2018 +0200 +++ b/src/string.c Mon May 14 18:27:23 2018 +0200 @@ -487,7 +487,7 @@ return result; } -int ucx_str_cmp(scstr_t s1, scstr_t s2) { +int ucx_strcmp(scstr_t s1, scstr_t s2) { if (s1.length == s2.length) { return memcmp(s1.ptr, s2.ptr, s1.length); } else if (s1.length > s2.length) { @@ -497,7 +497,7 @@ } } -int ucx_str_casecmp(scstr_t s1, scstr_t s2) { +int ucx_strcasecmp(scstr_t s1, scstr_t s2) { if (s1.length == s2.length) { #ifdef _WIN32 return _strnicmp(s1.ptr, s2.ptr, s1.length); diff -r 5d28dc8f0765 -r 5b97de37aada src/ucx/string.h --- a/src/ucx/string.h Mon May 14 18:25:20 2018 +0200 +++ b/src/ucx/string.h Mon May 14 18:27:23 2018 +0200 @@ -403,9 +403,9 @@ * length of s1 is greater than the length of s2 or the result of * memcmp() otherwise (i.e. 0 if the strings match) */ -int ucx_str_cmp(scstr_t s1, scstr_t s2); +int ucx_strcmp(scstr_t s1, scstr_t s2); -#define sstrcmp(s1, s2) ucx_str_cmp(SCSTR(s1), SCSTR(s2)) +#define sstrcmp(s1, s2) ucx_strcmp(SCSTR(s1), SCSTR(s2)) /** * Compares two UCX strings ignoring the case. @@ -421,9 +421,9 @@ * first two differing characters otherwise (i.e. 0 if the strings match and * no characters differ) */ -int ucx_str_casecmp(scstr_t s1, scstr_t s2); +int ucx_strcasecmp(scstr_t s1, scstr_t s2); -#define sstrcasecmp(s1, s2) ucx_str_casecmp(SCSTR(s1), SCSTR(s2)) +#define sstrcasecmp(s1, s2) ucx_strcasecmp(SCSTR(s1), SCSTR(s2)) /** * Creates a duplicate of the specified string.