summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-12-19 23:14:46 +0000
committerKarl Berry <karl@freefriends.org>2009-12-19 23:14:46 +0000
commit90688d404856ed9a20ad5d714a1999acd388d88e (patch)
tree101f6c6610f21c83dd5d3c511a3acd8b72c38efc /Build
parent929d8005a93b27f29b4ed481f31d62f92f67d28b (diff)
revert to checking kpse_fmt_format last, Angelo Graziosi, http://tug.org/pipermail/tlbuild/2009q4/001222.html
git-svn-id: svn://tug.org/texlive/trunk@16452 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog6
-rw-r--r--Build/source/texk/kpathsea/kpsewhich.c19
2 files changed, 23 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index c78d74c5b60..ad7dc8b0237 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,9 @@
+2009-12-20 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (find_format): restore checking of kpse_fmt_format
+ last, since a hang was reported by Angelo Graziosi,
+ http://tug.org/pipermail/tlbuild/2009q4/001222.html.
+
2009-12-17 Karl Berry <karl@tug.org>
* c-proto.h (KPSE_DLL) [WIN32]: #define in this case, per Akira.
diff --git a/Build/source/texk/kpathsea/kpsewhich.c b/Build/source/texk/kpathsea/kpsewhich.c
index 7b8b6a89540..e5c278da18b 100644
--- a/Build/source/texk/kpathsea/kpsewhich.c
+++ b/Build/source/texk/kpathsea/kpsewhich.c
@@ -159,9 +159,24 @@ find_format (kpathsea kpse, string name, boolean is_filename)
if (found)
break;
- }
- ret = f;
+ /* Some trickery here: the extensions for kpse_fmt_format (which
+ is just .fmt) can clash with other extensions in use (how?),
+ and we prefer for those others to be preferred. And we don't
+ want to change the integer value of kpse_fmt_format. So skip
+ it when first encountered, then use it when we've done
+ everything else, and use it as the end-guard. */
+ if (f == kpse_fmt_format) {
+ f = kpse_last_format;
+ } else if (++f == kpse_fmt_format) {
+ f++;
+ } else if (f == kpse_last_format) {
+ f = kpse_fmt_format;
+ }
+
+ /* If there was a match, f will be one past the correct value. */
+ ret = f;
+ }
}
return ret;