summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-17 18:27:08 +0000
committerKarl Berry <karl@freefriends.org>2018-12-17 18:27:08 +0000
commit20a403c668123fd040d0a4c3564529faea2f0cd6 (patch)
treee2b9d3e40fdc3ef9df8a890ccd3dd050083c536a /Build
parentc55e9a1c36849dc79edf07b43e648d3c46da8214 (diff)
default preloaded guess to explicit &dumpname if given (from IgorL)
git-svn-id: svn://tug.org/texlive/trunk@49433 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog7
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c15
2 files changed, 19 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index 66a33f23c4d..1e7b8fe97ba 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,10 @@
+2018-12-17 Igor Liferenko <igor.liferenko@gmail.com>
+
+ * texmfmp.c (maininit): default to guessing an explicit &dumpname
+ as the "preloaded" (not really) format, if one was specified.
+ tex-k msgs of 23 Sep 2018 12:13:06, 23 Sep 2018 18:36:52.
+ (With comment and formatting tinkering from karl.)
+
2018-12-17 Andreas Scherer <https://ascherer.github.io>
* printversion.c (printversionandexit): Search for PROGNAME
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 329a3f9222d..94232cff078 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -783,7 +783,7 @@ maininit (int ac, string *av)
xputenv ("engine", TEXMFENGINENAME);
/* Were we given a simple filename? */
- main_input_file = get_input_file_name();
+ main_input_file = get_input_file_name ();
#ifdef WIN32
if (main_input_file == NULL) {
@@ -853,7 +853,9 @@ maininit (int ac, string *av)
translate_filename = default_translate_filename;
}
/* If we're preloaded, I guess everything is set up. I don't really
- know any more, it's been so long since anyone preloaded. */
+ know any more, it's been so long since anyone truly preloaded. We
+ still use the word "preloaded" in the messages through (via the
+ original .web sources), at Knuth's request. */
if (readyalready != 314159) {
/* The `ini_version' variable is declared/used in the change files. */
boolean virversion = false;
@@ -873,9 +875,16 @@ maininit (int ac, string *av)
#endif /* TeX */
}
+ /* If run like `tex \&foo', reasonable to guess "foo" as the fmt name. */
+ if (!main_input_file) {
+ if (argv[1] && *argv[1] == '&') {
+ dump_name = argv[1] + 1;
+ }
+ }
+
if (!dump_name) {
/* If called as *vir{mf,tex,mpost} use `plain'. Otherwise, use the
- name we were invoked under. */
+ name we were invoked under as our best guess. */
dump_name = (virversion ? "plain" : kpse_program_name);
}
}