diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-07-26 10:20:07 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-07-26 10:20:07 +0000 |
commit | 8d4af963a232f6c2cdbf510179c05af4140d3264 (patch) | |
tree | 919ffa0fb8d422560c77a04760bb2001729e9070 /Build/source/texk/kpathsea/tilde.c | |
parent | b682bb00112f1062d00240543c0a0038413d148a (diff) |
kpathsea: More changes to reduce diffs with W32TeX
git-svn-id: svn://tug.org/texlive/trunk@23230 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/tilde.c')
-rw-r--r-- | Build/source/texk/kpathsea/tilde.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Build/source/texk/kpathsea/tilde.c b/Build/source/texk/kpathsea/tilde.c index 5d4c6274b0e..2f3ff76bb01 100644 --- a/Build/source/texk/kpathsea/tilde.c +++ b/Build/source/texk/kpathsea/tilde.c @@ -1,7 +1,7 @@ /* tilde.c: expand user's home directories. Copyright 1997, 1998, 2005, Olaf Weber. - Copyright 1993, 1995, 1996, 1997, 2008 Karl Berry. + Copyright 1993, 1995, 1996, 1997, 2008, 2011 Karl Berry. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -41,10 +41,24 @@ kpathsea_tilde_expand (kpathsea kpse, string name) string expansion; const_string home; const_string prefix; +#if defined(WIN32) + string p; +#endif (void)kpse; /* currenty not used */ assert (name); +#if defined(WIN32) + for (p = name; *p; p++) { + if (IS_KANJI(p)) { + p++; + continue; + } + if (*p == '\\') + *p = '/'; + } +#endif + /* If there is a leading "!!", set prefix to "!!", otherwise use the empty string. After this, we can test whether a prefix was found by checking *prefix, and it is safe to unconditionally |