mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Rename, again, --reports-bits to report-speed.
This commit is contained in:
parent
96418c6885
commit
6b5c0c742d
2
NEWS
2
NEWS
@ -21,7 +21,7 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
|
||||
|
||||
** Report stdout close errors.
|
||||
|
||||
** Accept the --report-bps option.
|
||||
** Accept the --report-speed option.
|
||||
|
||||
** Enable client certificates when GNU TLS is used.
|
||||
|
||||
|
@ -1,9 +1,15 @@
|
||||
2012-06-06 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||
|
||||
* main.c (print_help): Rename --bits to --report-bps.
|
||||
(cmdline_options): Likewise.
|
||||
* init.c (commands): Rename --report-bps to --report-speed.
|
||||
(cmd_spec_report_speed): New function.
|
||||
|
||||
* options.h (struct options): Rename `bits_fmt' to `report_bps'.
|
||||
* main.c (print_help): Rename --bits to --report-bps.
|
||||
(cmdline_options): Likewise.
|
||||
* init.c (commands): Likewise
|
||||
|
||||
* progress.c (create_image): Adjust caller.
|
||||
* retr.c (retr_rate): Likewise.
|
||||
* utils.c (convert_to_bits): Likewise.
|
||||
|
12
src/init.c
12
src/init.c
@ -100,6 +100,7 @@ CMD_DECLARE (cmd_spec_progress);
|
||||
CMD_DECLARE (cmd_spec_recursive);
|
||||
CMD_DECLARE (cmd_spec_regex_type);
|
||||
CMD_DECLARE (cmd_spec_restrict_file_names);
|
||||
CMD_DECLARE (cmd_spec_report_speed);
|
||||
#ifdef HAVE_SSL
|
||||
CMD_DECLARE (cmd_spec_secure_protocol);
|
||||
#endif
|
||||
@ -247,7 +248,7 @@ static const struct {
|
||||
{ "relativeonly", &opt.relative_only, cmd_boolean },
|
||||
{ "remoteencoding", &opt.encoding_remote, cmd_string },
|
||||
{ "removelisting", &opt.remove_listing, cmd_boolean },
|
||||
{ "reportbps", &opt.report_bps, cmd_boolean},
|
||||
{ "reportspeed", &opt.report_bps, cmd_spec_report_speed},
|
||||
{ "restrictfilenames", NULL, cmd_spec_restrict_file_names },
|
||||
{ "retrsymlinks", &opt.retr_symlinks, cmd_boolean },
|
||||
{ "retryconnrefused", &opt.retry_connrefused, cmd_boolean },
|
||||
@ -1451,6 +1452,15 @@ cmd_spec_restrict_file_names (const char *com, const char *val, void *place_igno
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
cmd_spec_report_speed (const char *com, const char *val, void *place_ignored)
|
||||
{
|
||||
opt.report_bps = strcasecmp (val, "bits") == 0;
|
||||
if (!opt.report_bps)
|
||||
fprintf (stderr, _("%s: %s: Invalid value %s.\n"), exec_name, com, quote (val));
|
||||
return opt.report_bps;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
static bool
|
||||
cmd_spec_secure_protocol (const char *com, const char *val, void *place)
|
||||
|
@ -268,7 +268,7 @@ static struct cmdline_option option_data[] =
|
||||
{ "relative", 'L', OPT_BOOLEAN, "relativeonly", -1 },
|
||||
{ "remote-encoding", 0, OPT_VALUE, "remoteencoding", -1 },
|
||||
{ "remove-listing", 0, OPT_BOOLEAN, "removelisting", -1 },
|
||||
{ "report-bps", 0, OPT_BOOLEAN, "reportbps", -1 },
|
||||
{ "report-speed", 0, OPT_BOOLEAN, "reportspeed", -1 },
|
||||
{ "restrict-file-names", 0, OPT_BOOLEAN, "restrictfilenames", -1 },
|
||||
{ "retr-symlinks", 0, OPT_BOOLEAN, "retrsymlinks", -1 },
|
||||
{ "retry-connrefused", 0, OPT_BOOLEAN, "retryconnrefused", -1 },
|
||||
@ -764,7 +764,7 @@ Recursive accept/reject:\n"),
|
||||
N_("\
|
||||
Output format:\n"),
|
||||
N_("\
|
||||
--report-bps Output bandwidth in bits.\n"),
|
||||
--report-speed=TYPE Output bandwidth as TYPE. TYPE can be bits.\n"),
|
||||
"\n",
|
||||
N_("Mail bug reports and suggestions to <bug-wget@gnu.org>.\n")
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user