aboutsummaryrefslogtreecommitdiff
path: root/lib/telnet.c
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 /lib/telnet.c
parentbe760bed7e544136eaa175f0fe58251da1ff6e41 (diff)
- 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 'lib/telnet.c')
-rw-r--r--lib/telnet.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/telnet.c b/lib/telnet.c
index 77f51b523..3b5e1d761 100644
--- a/lib/telnet.c
+++ b/lib/telnet.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -833,7 +833,7 @@ static CURLcode check_telnet_options(struct connectdata *conn)
option_keyword, option_arg) == 2) {
/* Terminal type */
- if(curl_strequal(option_keyword, "TTYPE")) {
+ if(Curl_ascii_equal(option_keyword, "TTYPE")) {
strncpy(tn->subopt_ttype, option_arg, 31);
tn->subopt_ttype[31] = 0; /* String termination */
tn->us_preferred[CURL_TELOPT_TTYPE] = CURL_YES;
@@ -841,7 +841,7 @@ static CURLcode check_telnet_options(struct connectdata *conn)
}
/* Display variable */
- if(curl_strequal(option_keyword, "XDISPLOC")) {
+ if(Curl_ascii_equal(option_keyword, "XDISPLOC")) {
strncpy(tn->subopt_xdisploc, option_arg, 127);
tn->subopt_xdisploc[127] = 0; /* String termination */
tn->us_preferred[CURL_TELOPT_XDISPLOC] = CURL_YES;
@@ -849,7 +849,7 @@ static CURLcode check_telnet_options(struct connectdata *conn)
}
/* Environment variable */
- if(curl_strequal(option_keyword, "NEW_ENV")) {
+ if(Curl_ascii_equal(option_keyword, "NEW_ENV")) {
buf = strdup(option_arg);
if(!buf)
return CURLE_OUT_OF_MEMORY;