/* Command line parsing.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of Wget.
textdomain ("wget");
#endif /* HAVE_NLS */
}
+
+/* It's kosher to declare these here because their interface _has_ to
+ be void foo(void). */
+void url_init PARAMS ((void));
+void host_init PARAMS ((void));
+
+/* This just calls the various initialization functions from the
+ modules that need one-time initialization. */
+static void
+private_initialize (void)
+{
+ url_init ();
+ host_init ();
+}
\f
/* Print the usage message. */
static void
{ "no-directories", no_argument, NULL, 19 },
{ "no-host-directories", no_argument, NULL, 20 },
{ "no-host-lookup", no_argument, NULL, 22 },
+ { "no-http-keep-alive", no_argument, NULL, 28 },
{ "no-parent", no_argument, NULL, 5 },
{ "non-verbose", no_argument, NULL, 18 },
{ "passive-ftp", no_argument, NULL, 11 },
};
i18n_initialize ();
+ private_initialize ();
append_to_log = 0;
case 27:
setval ("bindaddress", optarg);
break;
+ case 28:
+ setval ("httpkeepalive", "off");
+ break;
case 'b':
setval ("background", "on");
break;
case 'V':
printf ("GNU Wget %s\n\n", version_string);
printf ("%s", _("\
-Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.\n\
+Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.\n\
This program is distributed in the hope that it will be useful,\n\
but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
case 'p':
setval ("noparent", "on");
break;
+ case 'k':
+ setval ("httpkeepalive", "off");
+ break;
default:
printf (_("%s: illegal option -- `-n%c'\n"), exec_name, *p);
print_usage ();
{
logprintf (LOG_NOTQUIET,
_("\nFINISHED --%s--\nDownloaded: %s bytes in %d files\n"),
- time_str (NULL), legible_very_long (opt.downloaded),
+ time_str (NULL),
+ (opt.downloaded_overflow ?
+ "<overflow>" : legible_very_long (opt.downloaded)),
opt.numurls);
/* Print quota warning, if exceeded. */
- if (opt.quota && opt.downloaded > opt.quota)
+ if (downloaded_exceeds_quota ())
logprintf (LOG_NOTQUIET,
_("Download quota (%s bytes) EXCEEDED!\n"),
legible (opt.quota));