#include <curl/curl.h>
#include "netrc.h"
+
+#include "strequal.h"
#include "strtok.h"
-#include "strcase.h"
+#include "rawstr.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
switch(state) {
case NOTHING:
- if(strcasecompare("machine", tok)) {
+ if(Curl_raw_equal("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(strcasecompare("default", tok)) {
+ else if(Curl_raw_equal("default", tok)) {
state=HOSTVALID;
retcode=0; /* we did find our host */
}
break;
case HOSTFOUND:
- if(strcasecompare(host, tok)) {
+ if(Curl_raw_equal(host, tok)) {
/* and yes, this is our host! */
state=HOSTVALID;
retcode=0; /* we did find our host */
/* we are now parsing sub-keywords concerning "our" host */
if(state_login) {
if(specific_login) {
- state_our_login = strcasecompare(*loginp, tok);
+ state_our_login = Curl_raw_equal(*loginp, tok);
}
else {
free(*loginp);
}
state_password=0;
}
- else if(strcasecompare("login", tok))
+ else if(Curl_raw_equal("login", tok))
state_login=1;
- else if(strcasecompare("password", tok))
+ else if(Curl_raw_equal("password", tok))
state_password=1;
- else if(strcasecompare("machine", tok)) {
+ else if(Curl_raw_equal("machine", tok)) {
/* ok, there's machine here go => */
state = HOSTFOUND;
state_our_login = FALSE;