From b0857cb1d2b8d69c7cba11d3a59a70af55370ded Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 28 Dec 2007 21:30:40 +0000 Subject: set user_progname after reading all options (Hartmut 30 Oct 2005 10:02:45) git-svn-id: svn://tug.org/texlive/trunk@5981 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/lib/ChangeLog | 6 ++++++ Build/source/texk/web2c/lib/texmfmp.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index ac935b13de4..45a2d51acbe 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,9 @@ +2007-12-28 Karl Berry + + * texmfmp.c (parse_options): do not set user_progname at + DUMP_OPTION or efmt. + (maininit): instead, do it here, after options are read. + 2007-09-05 Karl Berry * texmfmp.c (long_options): move output-directory output to be diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index b33882f7c5a..bc44225ca99 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -199,13 +199,16 @@ maininit P2C(int, ac, string *, av) the web (which would read the base file, etc.). */ parse_options (ac, av); + /* If -progname was not specified, default to the dump name. */ + if (!user_progname) user_progname = dump_name; + /* Do this early so we can inspect program_invocation_name and kpse_program_name below, and because we have to do this before any path searching. */ kpse_set_program_name (argv[0], user_progname); /* FIXME: gather engine names in a single spot. */ - xputenv("engine", TEXMFENGINENAME); + xputenv ("engine", TEXMFENGINENAME); /* Were we given a simple filename? */ main_input_file = get_input_file_name(); @@ -963,14 +966,12 @@ parse_options P2C(int, argc, string *, argv) } else if (ARGUMENT_IS (DUMP_OPTION)) { dump_name = optarg; - if (!user_progname) user_progname = optarg; dumpoption = true; #ifdef TeX /* FIXME: Obsolete -- for backward compatibility only. */ } else if (ARGUMENT_IS ("efmt")) { dump_name = optarg; - if (!user_progname) user_progname = optarg; dumpoption = true; #endif -- cgit v1.2.3