extern char *link_string;
/* defined in build_info.c */
extern char *compiled_features[];
-extern char *system_wgetrc;
-extern char *locale_dir;
/* Used for --version output in print_version */
static const int max_chars_per_line = 72;
}
printf ("\n");
+
+ /* FIXME: Responsibility for deallocation should be handled by
+ whatever allocated it, wherever possible. These two lines result
+ in unnecessary strdup calls in the print_version function. */
xfree (prefix);
xfree (line);
}
printf ("%s (user)\n%s", user_wgetrc, prefix_spaces);
xfree (user_wgetrc);
}
- printf ("%s (system)\n", system_wgetrc);
+#ifdef SYSTEM_WGETRC
+ printf ("%s (system)\n", SYSTEM_WGETRC);
+#endif
format_and_print_line (strdup (locale_title),
- strdup (locale_dir),
+ strdup (LOCALEDIR),
max_chars_per_line);
format_and_print_line (strdup (compile_title),
exit (0);
}
+char *program_name; /* Needed by lib/error.c. */
+
int
main (int argc, char **argv)
{
int nurl, status;
bool append_to_log = false;
+ program_name = argv[0];
+
i18n_initialize ();
/* Construct the name of the executable, without the directory part. */
xfree (url[i]);
cleanup ();
-#ifdef DEBUG_MALLOC
- print_malloc_debug_stats ();
-#endif
if (status == RETROK)
return 0;
else