summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-26 23:46:41 +0000
committerKarl Berry <karl@freefriends.org>2010-11-26 23:46:41 +0000
commit94b2db834a1eedeb1b612b173b2fd519bacb6917 (patch)
tree20f66012232b40f31fd8a338ac67b82aadf0fc6f /Build/source/texk/kpathsea
parenta881f79f85c5ae2491b5448cd8bc0d5a28b55bf5 (diff)
kpsewhich --all plain, fix from Taco
git-svn-id: svn://tug.org/texlive/trunk@20579 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog11
-rw-r--r--Build/source/texk/kpathsea/db.c8
-rwxr-xr-xBuild/source/texk/kpathsea/kpsewhich.test6
3 files changed, 19 insertions, 6 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index de5c419c0e2..7d1c61fb96e 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-27 Taco Hoekwater <taco@elvenkind.com>
+
+ * db.c (kpathsea_db_search_list): one return list for everything,
+ else kpsewhich --all plain returns nothing, even though
+ kpsewhich plain works. Report from Paul Isambert,
+ 25 Nov 2010 19:09:21.
+
+2010-11-27 Karl Berry <karl@tug.org>
+
+ * kpsewhich.test: test this.
+
2010-11-18 Peter Breitenlohner <peb@mppmu.mpg.de>
* tex-glyph.c (try_format): Drop unused params fontname and dpi;
diff --git a/Build/source/texk/kpathsea/db.c b/Build/source/texk/kpathsea/db.c
index afacca560a0..b2aad8f34f4 100644
--- a/Build/source/texk/kpathsea/db.c
+++ b/Build/source/texk/kpathsea/db.c
@@ -607,6 +607,9 @@ kpathsea_db_search_list (kpathsea kpse, const_string* names,
return NULL;
done = false;
+ ret = XTALLOC1 (str_list_type);
+ *ret = str_list_init ();
+
/* Handle each name. */
for (n = 0; !done && names[n]; n++) {
name = names[n];
@@ -662,9 +665,6 @@ kpathsea_db_search_list (kpathsea kpse, const_string* names,
/* We have an ls-R db. Look up `try'. */
orig_dirs = db_dirs = hash_lookup (kpse->db, ctry);
- ret = XTALLOC1 (str_list_type);
- *ret = str_list_init ();
-
/* For each filename found, see if it matches the path element. For
example, if we have .../cx/cmr10.300pk and .../ricoh/cmr10.300pk,
and the path looks like .../cx, we don't want the ricoh file. */
@@ -727,8 +727,8 @@ kpathsea_db_search_list (kpathsea kpse, const_string* names,
if (path != path_elt)
free((string)path);
}
- return ret;
+ return ret;
}
#if defined(KPSE_COMPAT_API)
diff --git a/Build/source/texk/kpathsea/kpsewhich.test b/Build/source/texk/kpathsea/kpsewhich.test
index 813f6dc8a55..4e7159ec9d2 100755
--- a/Build/source/texk/kpathsea/kpsewhich.test
+++ b/Build/source/texk/kpathsea/kpsewhich.test
@@ -10,9 +10,11 @@ export TEXMFCNF
./kpsewhich --expand-var=\$TEXMFMAIN || exit 1
-BSTINPUTS=$srcdir/../tests/texmf \
- ./kpsewhich plain.bst || exit 1
+TEXINPUTS=$srcdir/../tests/texmf \
+ ./kpsewhich --all plain || exit 1
AFMFONTS=$srcdir/../tests/texmf \
./kpsewhich afmtest.afm || exit 1
+BSTINPUTS=$srcdir/../tests/texmf \
+ ./kpsewhich plain.bst || exit 1