aboutsummaryrefslogtreecommitdiff
path: root/src/tool_paramhlp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-09-30 18:54:02 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-10-31 08:46:35 +0100
commit811a693b803a8715e15ba56fb161d9e6b3b6b016 (patch)
tree47f61478d7d860eadba5396d88a444e906f6cfb9 /src/tool_paramhlp.c
parent502acba2af821391b85a2cd4ac7b91ad8e9d4180 (diff)
strcasecompare: all case insensitive string compares ignore locale now
We had some confusions on when each function was used. We should not act differently on different locales anyway.
Diffstat (limited to 'src/tool_paramhlp.c')
-rw-r--r--src/tool_paramhlp.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index 820d872bc..c443d779d 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -21,7 +21,7 @@
***************************************************************************/
#include "tool_setup.h"
-#include "rawstr.h"
+#include "strcase.h"
#define ENABLE_CURLX_PRINTF
/* use our own printf() functions */
@@ -312,7 +312,7 @@ long proto2num(struct OperationConfig *config, long *val, const char *str)
}
for(pp=protos; pp->name; pp++) {
- if(curlx_raw_equal(token, pp->name)) {
+ if(curlx_strcasecompare(token, pp->name)) {
switch (action) {
case deny:
*val &= ~(pp->bit);
@@ -355,7 +355,7 @@ int check_protocol(const char *str)
if(!str)
return PARAM_REQUIRES_PARAMETER;
for(pp = curlinfo->protocols; *pp; pp++) {
- if(curlx_raw_equal(*pp, str))
+ if(curlx_strcasecompare(*pp, str))
return PARAM_OK;
}
return PARAM_LIBCURL_UNSUPPORTED_PROTOCOL;
@@ -466,11 +466,11 @@ ParameterError add2list(struct curl_slist **list, const char *ptr)
int ftpfilemethod(struct OperationConfig *config, const char *str)
{
- if(curlx_raw_equal("singlecwd", str))
+ if(curlx_strcasecompare("singlecwd", str))
return CURLFTPMETHOD_SINGLECWD;
- if(curlx_raw_equal("nocwd", str))
+ if(curlx_strcasecompare("nocwd", str))
return CURLFTPMETHOD_NOCWD;
- if(curlx_raw_equal("multicwd", str))
+ if(curlx_strcasecompare("multicwd", str))
return CURLFTPMETHOD_MULTICWD;
warnf(config->global, "unrecognized ftp file method '%s', using default\n",
@@ -481,9 +481,9 @@ int ftpfilemethod(struct OperationConfig *config, const char *str)
int ftpcccmethod(struct OperationConfig *config, const char *str)
{
- if(curlx_raw_equal("passive", str))
+ if(curlx_strcasecompare("passive", str))
return CURLFTPSSL_CCC_PASSIVE;
- if(curlx_raw_equal("active", str))
+ if(curlx_strcasecompare("active", str))
return CURLFTPSSL_CCC_ACTIVE;
warnf(config->global, "unrecognized ftp CCC method '%s', using default\n",
@@ -494,11 +494,11 @@ int ftpcccmethod(struct OperationConfig *config, const char *str)
long delegation(struct OperationConfig *config, char *str)
{
- if(curlx_raw_equal("none", str))
+ if(curlx_strcasecompare("none", str))
return CURLGSSAPI_DELEGATION_NONE;
- if(curlx_raw_equal("policy", str))
+ if(curlx_strcasecompare("policy", str))
return CURLGSSAPI_DELEGATION_POLICY_FLAG;
- if(curlx_raw_equal("always", str))
+ if(curlx_strcasecompare("always", str))
return CURLGSSAPI_DELEGATION_FLAG;
warnf(config->global, "unrecognized delegation method '%s', using none\n",