summaryrefslogtreecommitdiff
path: root/src/tool_getparam.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-09-30 17:15:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-10-31 08:46:35 +0100
commit502acba2af821391b85a2cd4ac7b91ad8e9d4180 (patch)
treee219be1178db413bffd92033e965c1e1075c4702 /src/tool_getparam.c
parent1833a45dde4d27febfce42813699533b1ae993d1 (diff)
downloadgnurl-502acba2af821391b85a2cd4ac7b91ad8e9d4180.tar.gz
gnurl-502acba2af821391b85a2cd4ac7b91ad8e9d4180.tar.bz2
gnurl-502acba2af821391b85a2cd4ac7b91ad8e9d4180.zip
strcasecompare: is the new name for strequal()
... to make it less likely that we forget that the function actually does case insentive compares. Also replaced several invokes of the function with a plain strcmp when case sensitivity is not an issue (like comparing with "-").
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r--src/tool_getparam.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index e49acf803..34983b94d 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -416,7 +416,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
}
for(j = 0; j < sizeof(aliases)/sizeof(aliases[0]); j++) {
- if(curlx_strnequal(aliases[j].lname, word, fnam)) {
+ if(curlx_strncasecompare(aliases[j].lname, word, fnam)) {
longopt = TRUE;
numhits++;
if(curlx_raw_equal(aliases[j].lname, word)) {
@@ -1109,7 +1109,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
break;
case 'C':
/* This makes us continue an ftp transfer at given position */
- if(!curlx_strequal(nextarg, "-")) {
+ if(strcmp(nextarg, "-")) {
err = str2offset(&config->resume_from, nextarg);
if(err)
return err;
@@ -1153,7 +1153,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
}
if('@' == is_file) {
/* a '@' letter, it means that a file name or - (stdin) follows */
- if(curlx_strequal("-", p)) {
+ if(!strcmp("-", p)) {
file = stdin;
set_binmode(stdin);
}
@@ -1218,7 +1218,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
or - (stdin) follows */
nextarg++; /* pass the @ */
- if(curlx_strequal("-", nextarg)) {
+ if(!strcmp("-", nextarg)) {
file = stdin;
if(subletter == 'b') /* forced data-binary */
set_binmode(stdin);
@@ -1377,7 +1377,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
case 'm': /* TLS authentication type */
if(curlinfo->features & CURL_VERSION_TLSAUTH_SRP) {
GetStr(&config->tls_authtype, nextarg);
- if(!strequal(config->tls_authtype, "SRP"))
+ if(!strcasecompare(config->tls_authtype, "SRP"))
return PARAM_LIBCURL_DOESNT_SUPPORT; /* only support TLS-SRP */
}
else
@@ -1770,7 +1770,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
FILE *file;
const char *fname;
nextarg++; /* pass the @ */
- if(curlx_strequal("-", nextarg)) {
+ if(!strcmp("-", nextarg)) {
fname = "<stdin>";
file = stdin;
}
@@ -1880,7 +1880,7 @@ ParameterError parse_args(struct GlobalConfig *config, int argc,
bool passarg;
char *flag = argv[i];
- if(curlx_strequal("--", argv[i]))
+ if(!strcmp("--", argv[i]))
/* This indicates the end of the flags and thus enables the
following (URL) argument to start with -. */
stillflags = FALSE;
@@ -1936,7 +1936,7 @@ ParameterError parse_args(struct GlobalConfig *config, int argc,
result != PARAM_ENGINES_REQUESTED) {
const char *reason = param2text(result);
- if(orig_opt && !curlx_strequal(":", orig_opt))
+ if(orig_opt && strcmp(":", orig_opt))
helpf(config->errors, "option %s: %s\n", orig_opt, reason);
else
helpf(config->errors, "%s\n", reason);