X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fmain.c;h=fda7d0f3a20f732932fd5480abe49a04fda5b28a;hp=fe4cac7a9045294a00dfbdc3eb0f0a97218bb79d;hb=3450481772898cb948207635fa3343f7ba56a7f2;hpb=d5361eca21c683bd28d0351cdb9bb7cb0de8d75a diff --git a/src/main.c b/src/main.c index fe4cac7a..fda7d0f3 100644 --- a/src/main.c +++ b/src/main.c @@ -825,13 +825,15 @@ print_version (void) 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 @@ -869,11 +871,16 @@ main (int argc, char **argv) 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. */