+ const char *wgetrc_title = _("Wgetrc: ");
+ const char *locale_title = _("Locale: ");
+ const char *compile_title = _("Compile: ");
+ const char *link_title = _("Link: ");
+ char *line;
+ char *env_wgetrc, *user_wgetrc;
+ int i;
+
+ printf (_("GNU Wget %s\n\n"), version_string);
+#ifdef __VMS
+ printf ("GNU Wget %s built on VMS %s %s.\n\n",
+ VERSION_STRING, vms_arch(), vms_vers());
+#else /* def __VMS */
+ printf ("GNU Wget %s built on %s.\n\n", version_string, OS_TYPE);
+#endif /* def __VMS */
+ /* 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;
+ while ((line_length > 0) && (compiled_features[i] != NULL))
+ {
+ printf ("%s ", compiled_features[i]);
+ line_length -= strlen (compiled_features[i]) + 2;
+ i++;
+ }
+ printf ("\n");
+ }
+ printf ("\n");
+ /* Handle the case when $WGETRC is unset and $HOME/.wgetrc is
+ absent. */
+ printf ("%s\n", wgetrc_title);
+ env_wgetrc = wgetrc_env_file_name ();
+ if (env_wgetrc && *env_wgetrc)
+ {
+ printf (" %s (env)\n", env_wgetrc);
+ xfree (env_wgetrc);
+ }
+ user_wgetrc = wgetrc_user_file_name ();
+ if (user_wgetrc)
+ {
+ printf (" %s (user)\n", user_wgetrc);
+ xfree (user_wgetrc);
+ }
+#ifdef SYSTEM_WGETRC
+ printf (" %s (system)\n", SYSTEM_WGETRC);
+#endif
+
+ format_and_print_line (locale_title,
+ LOCALEDIR,
+ MAX_CHARS_PER_LINE);
+
+ format_and_print_line (compile_title,
+ compilation_string,
+ MAX_CHARS_PER_LINE);
+
+ format_and_print_line (link_title,
+ link_string,
+ MAX_CHARS_PER_LINE);
+
+ printf ("\n");