From fc0163bf083b242bd1f4ec4bea90f69b16f68e30 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Thu, 4 Aug 2016 23:00:03 +0800 Subject: [PATCH] Remove hyphens from command names * src/init.c: Remove hyphens from command names * src/main.c: Likewise Options with hyphens (or underscores) in their command name cannot be set in a wgetrc file. Signed-off-by: Jeffery To --- src/init.c | 10 +++++----- src/main.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/init.c b/src/init.c index 06d2e44..9538ae7 100644 --- a/src/init.c +++ b/src/init.c @@ -210,7 +210,7 @@ static const struct { { "header", NULL, cmd_spec_header }, #ifdef HAVE_HSTS { "hsts", &opt.hsts, cmd_boolean }, - { "hsts-file", &opt.hsts_file, cmd_file }, + { "hstsfile", &opt.hsts_file, cmd_file }, #endif { "htmlextension", &opt.adjust_extension, cmd_boolean }, /* deprecated */ { "htmlify", NULL, cmd_spec_htmlify }, @@ -223,7 +223,7 @@ static const struct { #endif { "httpsproxy", &opt.https_proxy, cmd_string }, { "httpuser", &opt.http_user, cmd_string }, - { "if-modified-since", &opt.if_modified_since, cmd_boolean }, + { "ifmodifiedsince", &opt.if_modified_since, cmd_boolean }, { "ignorecase", &opt.ignore_case, cmd_boolean }, { "ignorelength", &opt.ignore_length, cmd_boolean }, { "ignoretags", &opt.ignore_tags, cmd_vector }, @@ -234,7 +234,7 @@ static const struct { #endif { "input", &opt.input_filename, cmd_file }, #ifdef HAVE_METALINK - { "input-metalink", &opt.input_metalink, cmd_file }, + { "inputmetalink", &opt.input_metalink, cmd_file }, #endif { "iri", &opt.enable_iri, cmd_boolean }, { "keepsessioncookies", &opt.keep_session_cookies, cmd_boolean }, @@ -245,7 +245,7 @@ static const struct { { "login", &opt.ftp_user, cmd_string },/* deprecated*/ { "maxredirect", &opt.max_redirect, cmd_number }, #ifdef HAVE_METALINK - { "metalink-over-http", &opt.metalink_over_http, cmd_boolean }, + { "metalinkoverhttp", &opt.metalink_over_http, cmd_boolean }, #endif { "method", &opt.method, cmd_string_uppercase }, { "mirror", NULL, cmd_spec_mirror }, @@ -267,7 +267,7 @@ static const struct { { "postfile", &opt.post_file_name, cmd_file }, { "preferfamily", NULL, cmd_spec_prefer_family }, #ifdef HAVE_METALINK - { "preferred-location", &opt.preferred_location, cmd_string }, + { "preferredlocation", &opt.preferred_location, cmd_string }, #endif { "preservepermissions", &opt.preserve_perm, cmd_boolean }, #ifdef HAVE_SSL diff --git a/src/main.c b/src/main.c index 4d69e03..96a37f5 100644 --- a/src/main.c +++ b/src/main.c @@ -321,7 +321,7 @@ static struct cmdline_option option_data[] = { "host-directories", 0, OPT_BOOLEAN, "addhostdir", -1 }, #ifdef HAVE_HSTS { "hsts", 0, OPT_BOOLEAN, "hsts", -1}, - { "hsts-file", 0, OPT_VALUE, "hsts-file", -1 }, + { "hsts-file", 0, OPT_VALUE, "hstsfile", -1 }, #endif { "html-extension", 'E', OPT_BOOLEAN, "adjustextension", -1 }, /* deprecated */ { "htmlify", 0, OPT_BOOLEAN, "htmlify", -1 }, @@ -340,7 +340,7 @@ static struct cmdline_option option_data[] = #endif { "input-file", 'i', OPT_VALUE, "input", -1 }, #ifdef HAVE_METALINK - { "input-metalink", 0, OPT_VALUE, "input-metalink", -1 }, + { "input-metalink", 0, OPT_VALUE, "inputmetalink", -1 }, #endif { "iri", 0, OPT_BOOLEAN, "iri", -1 }, { "keep-session-cookies", 0, OPT_BOOLEAN, "keepsessioncookies", -1 }, @@ -351,7 +351,7 @@ static struct cmdline_option option_data[] = { "rejected-log", 0, OPT_VALUE, "rejectedlog", -1 }, { "max-redirect", 0, OPT_VALUE, "maxredirect", -1 }, #ifdef HAVE_METALINK - { "metalink-over-http", 0, OPT_BOOLEAN, "metalink-over-http", -1 }, + { "metalink-over-http", 0, OPT_BOOLEAN, "metalinkoverhttp", -1 }, #endif { "method", 0, OPT_VALUE, "method", -1 }, { "mirror", 'm', OPT_BOOLEAN, "mirror", -1 }, @@ -370,7 +370,7 @@ static struct cmdline_option option_data[] = { "post-file", 0, OPT_VALUE, "postfile", -1 }, { "prefer-family", 0, OPT_VALUE, "preferfamily", -1 }, #ifdef HAVE_METALINK - { "preferred-location", 0, OPT_VALUE, "preferred-location", -1 }, + { "preferred-location", 0, OPT_VALUE, "preferredlocation", -1 }, #endif { "preserve-permissions", 0, OPT_BOOLEAN, "preservepermissions", -1 }, { IF_SSL ("private-key"), 0, OPT_VALUE, "privatekey", -1 }, @@ -410,7 +410,7 @@ static struct cmdline_option option_data[] = { "strict-comments", 0, OPT_BOOLEAN, "strictcomments", -1 }, { "timeout", 'T', OPT_VALUE, "timeout", -1 }, { "timestamping", 'N', OPT_BOOLEAN, "timestamping", -1 }, - { "if-modified-since", 0, OPT_BOOLEAN, "if-modified-since", -1 }, + { "if-modified-since", 0, OPT_BOOLEAN, "ifmodifiedsince", -1 }, { "tries", 't', OPT_VALUE, "tries", -1 }, { "unlink", 0, OPT_BOOLEAN, "unlink", -1 }, { "trust-server-names", 0, OPT_BOOLEAN, "trustservernames", -1 }, -- 2.7.4