summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-10-15 21:43:48 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-10-15 21:43:48 +0000
commita579d6706436615845f57692921e0891fb6e3719 (patch)
tree936f3c7c41195e63bfd13c2f2b0151e1db1db397 /src
parentbe760bed7e544136eaa175f0fe58251da1ff6e41 (diff)
downloadcurl-a579d6706436615845f57692921e0891fb6e3719.tar.gz
- Pascal Terjan filed bug #2154627
(http://curl.haxx.se/bug/view.cgi?id=2154627) which pointed out that libcurl uses strcasecmp() in multiple places where it causes failures when the Turkish locale is used. This is because 'i' and 'I' isn't the same letter so strcasecmp() on those letters are different in Turkish than in English (or just about all other languages). I thus introduced a totally new internal function in libcurl (called Curl_ascii_equal) for doing case insentive comparisons for english-(ascii?) style strings that thus will make "file" and "FILE" match even if the Turkish locale is selected.
Diffstat (limited to 'src')
-rw-r--r--src/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index b547eb5f1..6f1e9b47c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1501,11 +1501,11 @@ static ParameterError add2list(struct curl_slist **list,
static int ftpfilemethod(struct Configurable *config, const char *str)
{
- if(curlx_strequal("singlecwd", str))
+ if(curlx_ascii_equal("singlecwd", str))
return CURLFTPMETHOD_SINGLECWD;
- if(curlx_strequal("nocwd", str))
+ if(curlx_ascii_equal("nocwd", str))
return CURLFTPMETHOD_NOCWD;
- if(curlx_strequal("multicwd", str))
+ if(curlx_ascii_equal("multicwd", str))
return CURLFTPMETHOD_MULTICWD;
warnf(config, "unrecognized ftp file method '%s', using default\n", str);
return CURLFTPMETHOD_MULTICWD;
@@ -1513,9 +1513,9 @@ static int ftpfilemethod(struct Configurable *config, const char *str)
static int ftpcccmethod(struct Configurable *config, const char *str)
{
- if(curlx_strequal("passive", str))
+ if(curlx_ascii_equal("passive", str))
return CURLFTPSSL_CCC_PASSIVE;
- if(curlx_strequal("active", str))
+ if(curlx_ascii_equal("active", str))
return CURLFTPSSL_CCC_ACTIVE;
warnf(config, "unrecognized ftp CCC method '%s', using default\n", str);
return CURLFTPSSL_CCC_PASSIVE;
@@ -1765,7 +1765,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
if(curlx_strnequal(aliases[j].lname, word, fnam)) {
longopt = TRUE;
numhits++;
- if(curlx_strequal(aliases[j].lname, word)) {
+ if(curlx_ascii_equal(aliases[j].lname, word)) {
parse = aliases[j].letter;
hit = j;
numhits = 1; /* a single unique hit */
@@ -2450,7 +2450,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
break;
case 'f': /* crypto engine */
GetStr(&config->engine, nextarg);
- if (config->engine && curlx_strequal(config->engine,"list"))
+ if (config->engine && curlx_ascii_equal(config->engine,"list"))
config->list_engines = TRUE;
break;
case 'g': /* CA info PEM file */