diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-09-18 17:46:10 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-09-18 17:46:10 +0000 |
commit | b8187616d11e66d6df2f1711357d47cbca9be20f (patch) | |
tree | e1bf10d8e249277c8daaa3a7851d5766e33108dc /Build/source/texk/web2c/pdftexdir/utils.c | |
parent | ff4c225e209d4b46bbbab536e4d9bcc622aae917 (diff) |
pdfTeX: Adapt to W32TeX (frem Akira)
git-svn-id: svn://tug.org/texlive/trunk@27711 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/utils.c')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/utils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/utils.c b/Build/source/texk/web2c/pdftexdir/utils.c index 965f845b52d..f9012d0d935 100644 --- a/Build/source/texk/web2c/pdftexdir/utils.c +++ b/Build/source/texk/web2c/pdftexdir/utils.c @@ -21,6 +21,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <sys/types.h> #include <regex.h> +#include <kpathsea/config.h> #include <kpathsea/c-proto.h> #include <kpathsea/c-stat.h> #include <kpathsea/c-fopen.h> @@ -767,6 +768,17 @@ void printID(strnumber filename) /* get the file name */ if (getcwd(pwd, sizeof(pwd)) == NULL) pdftex_fail("getcwd() failed (%s), path too long?", strerror(errno)); +#ifdef WIN32 + { + char *p; + for (p = pwd; *p; p++) { + if (*p == '\\') + *p = '/'; + else if (IS_KANJI(p)) + p++; + } + } +#endif file_name = makecstring(filename); md5_append(&state, (const md5_byte_t *) pwd, strlen(pwd)); md5_append(&state, (const md5_byte_t *) "/", 1); |