** Report stdout close errors.
-** Accept the --bit option.
+** Accept the --report-bps option.
** Enable client certificates when GNU TLS is used.
+2012-06-06 Giuseppe Scrivano <gscrivano@gnu.org>
+
+ * 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.
+
2012-06-04 Tim Ruehsen <tim.ruehsen@gmx.de>
* main.c (main): Check for filename != NULL.
{ "backups", &opt.backups, cmd_number },
{ "base", &opt.base_href, cmd_string },
{ "bindaddress", &opt.bind_address, cmd_string },
- { "bits", &opt.bits_fmt, cmd_boolean},
#ifdef HAVE_SSL
{ "cacertificate", &opt.ca_cert, cmd_file },
#endif
{ "relativeonly", &opt.relative_only, cmd_boolean },
{ "remoteencoding", &opt.encoding_remote, cmd_string },
{ "removelisting", &opt.remove_listing, cmd_boolean },
+ { "reportbps", &opt.report_bps, cmd_boolean},
{ "restrictfilenames", NULL, cmd_spec_restrict_file_names },
{ "retrsymlinks", &opt.retr_symlinks, cmd_boolean },
{ "retryconnrefused", &opt.retry_connrefused, cmd_boolean },
{ "backups", 0, OPT_BOOLEAN, "backups", -1 },
{ "base", 'B', OPT_VALUE, "base", -1 },
{ "bind-address", 0, OPT_VALUE, "bindaddress", -1 },
- { "bits", 0, OPT_BOOLEAN, "bits", -1 },
{ IF_SSL ("ca-certificate"), 0, OPT_VALUE, "cacertificate", -1 },
{ IF_SSL ("ca-directory"), 0, OPT_VALUE, "cadirectory", -1 },
{ "cache", 0, OPT_BOOLEAN, "cache", -1 },
{ "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 },
{ "restrict-file-names", 0, OPT_BOOLEAN, "restrictfilenames", -1 },
{ "retr-symlinks", 0, OPT_BOOLEAN, "retrsymlinks", -1 },
{ "retry-connrefused", 0, OPT_BOOLEAN, "retryconnrefused", -1 },
N_("\
Output format:\n"),
N_("\
- --bits Output bandwidth in bits.\n"),
+ --report-bps Output bandwidth in bits.\n"),
"\n",
N_("Mail bug reports and suggestions to <bug-wget@gnu.org>.\n")
};
bool show_all_dns_entries; /* Show all the DNS entries when resolving a
name. */
- bool bits_fmt; /*Output bandwidth in bits format*/
+ bool report_bps; /*Output bandwidth in bits format*/
};
extern struct options opt;
double dltime = hist->total_time + (dl_total_time - bp->recent_start);
double dlspeed = calc_rate (dlquant, dltime, &units);
sprintf (p, " %4.*f%s", dlspeed >= 99.95 ? 0 : dlspeed >= 9.995 ? 1 : 2,
- dlspeed, !opt.bits_fmt?short_units[units]:short_units_bits[units]);
+ dlspeed, !opt.report_bps ? short_units[units] : short_units_bits[units]);
move_to_end (p);
}
else
e.g. "1022", "247", "12.5", "2.38". */
sprintf (res, "%.*f %s",
dlrate >= 99.95 ? 0 : dlrate >= 9.995 ? 1 : 2,
- dlrate, !opt.bits_fmt? rate_names[units]: rate_names_bits[units]);
+ dlrate, !opt.report_bps ? rate_names[units]: rate_names_bits[units]);
return res;
}
double dlrate;
double bibyte = 1000.0;
- if (!opt.bits_fmt)
+ if (!opt.report_bps)
bibyte = 1024.0;
return buf;
}
-/* Converts the byte to bits format if --bits option is enabled
+/* Converts the byte to bits format if --report-bps option is enabled
*/
wgint
convert_to_bits (wgint num)
{
- if (opt.bits_fmt)
+ if (opt.report_bps)
return num * 8;
return num;
}