diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2016-11-02 06:34:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-12-05 16:39:32 (GMT) |
commit | 93cc249f3dd7ecd621cd063e4c08bbdb54d971e8 (patch) | |
tree | 4cd65530c3a67921921256010ae5ef0a61596e40 /lib/netrc.c | |
parent | 202adcfe056681109fe61569ecdb3bd69f0b4f97 (diff) | |
download | CMake-93cc249f3dd7ecd621cd063e4c08bbdb54d971e8.zip CMake-93cc249f3dd7ecd621cd063e4c08bbdb54d971e8.tar.gz CMake-93cc249f3dd7ecd621cd063e4c08bbdb54d971e8.tar.bz2 |
curl 2016-11-02 (3c561c65)
Code extracted from:
https://github.com/curl/curl.git
at commit 3c561c657c2f0e553b19115a506592a8bbd744bc (curl-7_51_0).
Diffstat (limited to 'lib/netrc.c')
-rw-r--r-- | lib/netrc.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/netrc.c b/lib/netrc.c index 46f427a..996711d 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -28,10 +28,8 @@ #include <curl/curl.h> #include "netrc.h" - -#include "strequal.h" #include "strtok.h" -#include "rawstr.h" +#include "strcase.h" /* The last 3 #include files should be in this order */ #include "curl_printf.h" @@ -130,20 +128,20 @@ int Curl_parsenetrc(const char *host, switch(state) { case NOTHING: - if(Curl_raw_equal("machine", tok)) { + if(strcasecompare("machine", tok)) { /* the next tok is the machine name, this is in itself the delimiter that starts the stuff entered for this machine, after this we need to search for 'login' and 'password'. */ state=HOSTFOUND; } - else if(Curl_raw_equal("default", tok)) { + else if(strcasecompare("default", tok)) { state=HOSTVALID; retcode=0; /* we did find our host */ } break; case HOSTFOUND: - if(Curl_raw_equal(host, tok)) { + if(strcasecompare(host, tok)) { /* and yes, this is our host! */ state=HOSTVALID; retcode=0; /* we did find our host */ @@ -156,7 +154,7 @@ int Curl_parsenetrc(const char *host, /* we are now parsing sub-keywords concerning "our" host */ if(state_login) { if(specific_login) { - state_our_login = Curl_raw_equal(*loginp, tok); + state_our_login = strcasecompare(*loginp, tok); } else { free(*loginp); @@ -179,11 +177,11 @@ int Curl_parsenetrc(const char *host, } state_password=0; } - else if(Curl_raw_equal("login", tok)) + else if(strcasecompare("login", tok)) state_login=1; - else if(Curl_raw_equal("password", tok)) + else if(strcasecompare("password", tok)) state_password=1; - else if(Curl_raw_equal("machine", tok)) { + else if(strcasecompare("machine", tok)) { /* ok, there's machine here go => */ state = HOSTFOUND; state_our_login = FALSE; |