summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-01-25 00:25:20 +0000
committerKarl Berry <karl@freefriends.org>2008-01-25 00:25:20 +0000
commit1ff3e8f6dd114f2448eceb4de5d540c5551c40e3 (patch)
tree31035967feeff892bb4e02b2fdb71ae8873522c0
parent8089bedd89720b48917c32301a0d0c924223279b (diff)
tilde expansion for --expand-var too, or mktexnam fails
git-svn-id: svn://tug.org/texlive/trunk@6390 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/kpathsea/ChangeLog6
-rw-r--r--Build/source/texk/kpathsea/kpathsea.info34
-rw-r--r--Build/source/texk/kpathsea/kpathsea.texi8
-rw-r--r--Build/source/texk/kpathsea/variable.c11
-rwxr-xr-xMaster/bin/i386-linux/kpsewhichbin227725 -> 200425 bytes
5 files changed, 37 insertions, 22 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 76cbf90271e..05ed120c3be 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-25 Karl Berry <karl@tug.org>
+
+ * variable.c (expand): do ~ expansion here too, for --expand-var.
+ Report from Werner Lemberg, 24 Jan 2008 02:19:49.
+ * kpathsea.texi (Auxiliary tasks): document this.
+
2008-01-21 Karl Berry <karl@tug.org>
* kpsewhich.c, kpathsea.texi: document --all and --subdir.
diff --git a/Build/source/texk/kpathsea/kpathsea.info b/Build/source/texk/kpathsea/kpathsea.info
index 4f2afae7828..dd2bd8e320a 100644
--- a/Build/source/texk/kpathsea/kpathsea.info
+++ b/Build/source/texk/kpathsea/kpathsea.info
@@ -2828,8 +2828,8 @@ lookup:
* `--expand-braces=STRING' outputs the variable and brace expansion
of STRING. *Note Path expansion::.
- * `--expand-var=STRING' outputs the variable expansion of STRING.
- For example, the `mktex...' scripts run `kpsewhich
+ * `--expand-var=STRING' outputs the variable and tilde expansion of
+ STRING. For example, the `mktex...' scripts run `kpsewhich
--expand-var='$TEXMF'' to find the root of the TeX system
hierarchy. *Note Path expansion::.
@@ -4714,20 +4714,20 @@ Node: Database format106913
Node: Invoking kpsewhich107926
Node: Path searching options108803
Node: Auxiliary tasks115452
-Node: Standard options117262
-Node: TeX support117582
-Node: Supported file formats118873
-Node: File lookup126021
-Node: Glyph lookup127312
-Node: Basic glyph lookup128439
-Node: Fontmap129318
-Node: Fallback font131935
-Node: Suppressing warnings132900
-Node: Programming134005
-Node: Programming overview134518
-Node: Calling sequence136794
-Node: Program-specific files141823
-Node: Programming with config files142861
-Node: Index144161
+Node: Standard options117273
+Node: TeX support117593
+Node: Supported file formats118884
+Node: File lookup126032
+Node: Glyph lookup127323
+Node: Basic glyph lookup128450
+Node: Fontmap129329
+Node: Fallback font131946
+Node: Suppressing warnings132911
+Node: Programming134016
+Node: Programming overview134529
+Node: Calling sequence136805
+Node: Program-specific files141834
+Node: Programming with config files142872
+Node: Index144172

End Tag Table
diff --git a/Build/source/texk/kpathsea/kpathsea.texi b/Build/source/texk/kpathsea/kpathsea.texi
index aa5fcbd8312..bcfe71da4f9 100644
--- a/Build/source/texk/kpathsea/kpathsea.texi
+++ b/Build/source/texk/kpathsea/kpathsea.texi
@@ -1319,10 +1319,10 @@ expansion of @var{string}. @xref{Path expansion}.
@item
@opindex --expand-var=@var{string}
-@samp{--expand-var=@var{string}} outputs the variable expansion of
-@var{string}. For example, the @samp{mktex@dots{}} scripts run
-@samp{kpsewhich --expand-var='$TEXMF'} to find the root of the @TeX{} system
-hierarchy. @xref{Path expansion}.
+@samp{--expand-var=@var{string}} outputs the variable and tilde
+expansion of @var{string}. For example, the @samp{mktex@dots{}}
+scripts run @samp{kpsewhich --expand-var='$TEXMF'} to find the root of
+the @TeX{} system hierarchy. @xref{Path expansion}.
@item
@opindex --expand-path=@var{string}
diff --git a/Build/source/texk/kpathsea/variable.c b/Build/source/texk/kpathsea/variable.c
index 07881f773d3..92576bf4e25 100644
--- a/Build/source/texk/kpathsea/variable.c
+++ b/Build/source/texk/kpathsea/variable.c
@@ -156,6 +156,15 @@ expand P3C(fn_type *, expansion, const_string, start, const_string, end)
expanding (var, true);
value = kpse_var_expand (value);
expanding (var, false);
+
+ { /* Do tilde expansion; see explanation above in kpse_var_value. */
+ string tmp = kpse_tilde_expand (value);
+ if (value != tmp) {
+ free (value);
+ value = tmp;
+ }
+ }
+
fn_grow (expansion, value, strlen (value));
free (value);
}
@@ -181,7 +190,7 @@ expand P3C(fn_type *, expansion, const_string, start, const_string, end)
/* Maybe we should support some or all of the various shell ${...}
- constructs, especially ${var-value}. */
+ constructs, especially ${var-value}. We do do ~ expansion. */
string
kpse_var_expand P1C(const_string, src)
diff --git a/Master/bin/i386-linux/kpsewhich b/Master/bin/i386-linux/kpsewhich
index 8b0a747ca8e..1b43783f1e4 100755
--- a/Master/bin/i386-linux/kpsewhich
+++ b/Master/bin/i386-linux/kpsewhich
Binary files differ