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/xdirname.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/xdirname.c')
-rw-r--r-- | Build/source/texk/kpathsea/xdirname.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/xdirname.c b/Build/source/texk/kpathsea/xdirname.c index 62da3d95c9c..8b3585ecea8 100644 --- a/Build/source/texk/kpathsea/xdirname.c +++ b/Build/source/texk/kpathsea/xdirname.c @@ -1,6 +1,6 @@ /* xdirname.c: return the directory part of a path. - Copyright 1999, 2008 Karl Berry. + Copyright 1999, 2008, 2011 Karl Berry. Copyright 2005 Olaf Weber. This library is free software; you can redistribute it and/or @@ -30,6 +30,9 @@ xdirname (const_string name) { string ret; unsigned limit = 0, loc; +#if defined(WIN32) + string p; +#endif /* Ignore a NULL name. */ if (!name) @@ -76,6 +79,17 @@ xdirname (const_string name) ret[loc] = '\0'; } +#if defined(WIN32) + for (p = ret; *p; p++) { + if (IS_KANJI(p)) { + p++; + continue; + } + if (*p == '\\') + *p = '/'; + } +#endif + return ret; } @@ -116,4 +130,3 @@ Local variables: standalone-compile-command: "gcc -g -I. -I.. -DTEST xdirname.c kpathsea.a" End: */ - |