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
--spider don\'t download anything.\n\
-T, --timeout=SECONDS set the read timeout to SECONDS.\n\
-w, --wait=SECONDS wait SECONDS between retrievals.\n\
- --waitretry=SECONDS wait 1...SECONDS between retries of a retrieval.\n\
+ --waitretry=SECONDS wait 1...SECONDS between retries of a retrieval.\n\
-Y, --proxy=on/off turn proxy on or off.\n\
-Q, --quota=NUMBER set retrieval quota to NUMBER.\n\
\n"), _("\
{ "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;
optarg);
exit (1);
}
- free (com);
- free (val);
+ xfree (com);
+ xfree (val);
}
break;
case 'G':
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 ();
opt.dfp = stdout;
else
{
+ struct stat st;
opt.dfp = fopen (opt.output_document, "wb");
if (opt.dfp == NULL)
{
perror (opt.output_document);
exit (1);
}
+ if (fstat (fileno (opt.dfp), &st) == 0 && S_ISREG (st.st_mode))
+ opt.od_known_regular = 1;
}
}
}
log_close ();
cleanup ();
+#ifdef DEBUG_MALLOC
+ print_malloc_debug_stats ();
+#endif
if (status == RETROK)
return 0;
else