X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fmain.c;h=4c2eb45b29286945bc1ea1e1c14e591537860d6d;hb=b1838bdfd197ec970d834ce5042995df92516841;hp=aac01ac875b85b6fea4f3bffb179ea78d48ccad1;hpb=f5a10978710a3e9907fbef31b7df9f414acccb16;p=wget diff --git a/src/main.c b/src/main.c index aac01ac8..4c2eb45b 100644 --- a/src/main.c +++ b/src/main.c @@ -56,7 +56,6 @@ as that of the covered work. */ #include "http.h" /* for save_cookies */ #include "ptimer.h" #include "warc.h" -#include "closeout.h" #include #include #include @@ -168,7 +167,6 @@ static struct cmdline_option option_data[] = { "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 }, @@ -269,6 +267,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-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 }, @@ -460,6 +459,8 @@ Logging and input file:\n"), -v, --verbose be verbose (this is the default).\n"), N_("\ -nv, --no-verbose turn off verboseness, without being quiet.\n"), + N_("\ + --report-speed=TYPE Output bandwidth as TYPE. TYPE can be bits.\n"), N_("\ -i, --input-file=FILE download URLs found in local or external FILE.\n"), N_("\ @@ -760,12 +761,6 @@ Recursive accept/reject:\n"), N_("\ -np, --no-parent don't ascend to the parent directory.\n"), "\n", - - N_("\ -Output format:\n"), - N_("\ - --bits Output bandwidth in bits.\n"), - "\n", N_("Mail bug reports and suggestions to .\n") }; @@ -986,8 +981,6 @@ main (int argc, char **argv) i18n_initialize (); - atexit (close_stdout); - /* Construct the name of the executable, without the directory part. */ #ifdef __VMS /* On VMS, lose the "dev:[dir]" prefix and the ".EXE;nnn" suffix. */ @@ -1056,7 +1049,7 @@ main (int argc, char **argv) } if (!userrc_ret) { - fprintf (stderr, "Exiting due to error in %s\n", optarg); + fprintf (stderr, _("Exiting due to error in %s\n"), optarg); exit (2); } else @@ -1195,7 +1188,7 @@ main (int argc, char **argv) { fprintf (stderr, _("Both --no-clobber and --convert-links were specified," - "only --convert-links will be used.\n")); + " only --convert-links will be used.\n")); opt.noclobber = false; } @@ -1566,7 +1559,7 @@ outputting to a regular file.\n")); &dt, opt.recursive, iri, true); } - if (opt.delete_after && file_exists_p(filename)) + if (opt.delete_after && filename != NULL && file_exists_p (filename)) { DEBUGP (("Removing file due to --delete-after in main():\n")); logprintf (LOG_VERBOSE, _("Removing %s.\n"), filename); @@ -1633,14 +1626,6 @@ outputting to a regular file.\n")); if (opt.convert_links && !opt.delete_after) convert_all_links (); - /* Close WARC file. */ - if (opt.warc_filename != 0) - warc_close (); - - log_close (); - - for (i = 0; i < nurl; i++) - xfree (url[i]); cleanup (); exit (get_exit_status ());