extern char *system_getrc;
extern char *link_string;
/* defined in build_info.c */
-extern char *compiled_features[];
+extern const char *compiled_features[];
/* Used for --version output in print_version */
#define MAX_CHARS_PER_LINE 72
#define TABULATION 4
{ "timeout", 'T', OPT_VALUE, "timeout", -1 },
{ "timestamping", 'N', OPT_BOOLEAN, "timestamping", -1 },
{ "tries", 't', OPT_VALUE, "tries", -1 },
+ { "use-server-timestamps", 0, OPT_BOOLEAN, "useservertimestamps", -1 },
{ "user", 0, OPT_VALUE, "user", -1 },
{ "user-agent", 'U', OPT_VALUE, "useragent", -1 },
{ "verbose", 'v', OPT_BOOLEAN, "verbose", -1 },
-N, --timestamping don't re-retrieve files unless newer than\n\
local.\n"),
N_("\
+ --no-use-server-timestamps don't set the local file's timestamp by\n\
+ the one on the server.\n"),
+ N_("\
-S, --server-response print server response.\n"),
N_("\
--spider don't download anything.\n"),
int i;
printf (_("GNU Wget %s built on %s.\n\n"), version_string, OS_TYPE);
- /* compiled_features is a char*[]. We limit the characters per
- line to MAX_CHARS_PER_LINE and prefix each line with a constant
- number of spaces for proper alignment. */
+
for (i = 0; compiled_features[i] != NULL; )
{
int line_length = MAX_CHARS_PER_LINE;
printf ("\n");
}
printf ("\n");
+
/* Handle the case when $WGETRC is unset and $HOME/.wgetrc is
absent. */
printf ("%s\n", wgetrc_title);
MAX_CHARS_PER_LINE);
#endif /* def ENABLE_NLS */
- format_and_print_line (compile_title,
- compilation_string,
- MAX_CHARS_PER_LINE);
+ if (compilation_string != NULL)
+ format_and_print_line (compile_title,
+ compilation_string,
+ MAX_CHARS_PER_LINE);
- format_and_print_line (link_title,
- link_string,
- MAX_CHARS_PER_LINE);
+ if (link_string != NULL)
+ format_and_print_line (link_title,
+ link_string,
+ MAX_CHARS_PER_LINE);
printf ("\n");
/* TRANSLATORS: When available, an actual copyright character
i18n_initialize ();
/* Construct the name of the executable, without the directory part. */
+#ifdef __VMS
+ /* On VMS, lose the "dev:[dir]" prefix and the ".EXE;nnn" suffix. */
+ exec_name = vms_basename (argv[0]);
+#else /* def __VMS */
exec_name = strrchr (argv[0], PATH_SEPARATOR);
if (!exec_name)
exec_name = argv[0];
else
++exec_name;
+#endif /* def __VMS [else] */
#ifdef WINDOWS
/* Drop extension (typically .EXE) from executable filename. */