X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fmain.c;h=414b62bc30995ea03a8cc5349bfd778478690df0;hp=8cee194c8f794135e7bbb73e5e35da2baad1bf44;hb=26a3eea8e2f42c621ce6c40a93acf5ff1cd12220;hpb=d82f80ecab9bfef857d780f894cca7e890780ce0 diff --git a/src/main.c b/src/main.c index 8cee194c..414b62bc 100644 --- a/src/main.c +++ b/src/main.c @@ -43,9 +43,6 @@ as that of the covered work. */ #include #include #include -#ifdef ENABLE_IRI -#include -#endif #include "utils.h" #include "init.h" @@ -166,6 +163,7 @@ static struct cmdline_option option_data[] = { "cookies", 0, OPT_BOOLEAN, "cookies", -1 }, { "cut-dirs", 0, OPT_VALUE, "cutdirs", -1 }, { WHEN_DEBUG ("debug"), 'd', OPT_BOOLEAN, "debug", -1 }, + { "default-page", 0, OPT_VALUE, "defaultpage", -1 }, { "delete-after", 0, OPT_BOOLEAN, "deleteafter", -1 }, { "directories", 0, OPT_BOOLEAN, "dirstruct", -1 }, { "directory-prefix", 'P', OPT_VALUE, "dirprefix", -1 }, @@ -519,6 +517,9 @@ HTTP options:\n"), --http-password=PASS set http password to PASS.\n"), N_("\ --no-cache disallow server-cached data.\n"), + N_ ("\ + --default-page=NAME Change the default page name (normally\n\ + this is `index.html'.).\n"), N_("\ -E, --html-extension save HTML documents with `.html' extension.\n"), N_("\ @@ -1075,8 +1076,6 @@ for details.\n\n")); if (opt.encoding_remote && !check_encoding_name (opt.encoding_remote)) opt.encoding_remote = NULL; - - /*logprintf (LOG_VERBOSE, "Locale = %s\n", quote (opt.locale));*/ } #else if (opt.enable_iri || opt.locale || opt.encoding_remote) @@ -1199,14 +1198,14 @@ WARNING: Can't reopen standard output in binary mode;\n\ if (url_scheme (*t) == SCHEME_FTP) opt.follow_ftp = 1; - status = retrieve_tree (*t); + status = retrieve_tree (*t, NULL); opt.follow_ftp = old_follow_ftp; } else { struct iri *i = iri_new (); - set_uri_encoding (i, opt.locale); + set_uri_encoding (i, opt.locale, true); status = retrieve_url (*t, &filename, &redirected_URL, NULL, &dt, opt.recursive, i); iri_free (i); @@ -1272,9 +1271,6 @@ WARNING: Can't reopen standard output in binary mode;\n\ xfree (url[i]); cleanup (); -#ifdef DEBUG_MALLOC - print_malloc_debug_stats (); -#endif if (status == RETROK) return 0; else