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
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. */