summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/xbasename.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-06-28 10:20:13 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-06-28 10:20:13 +0000
commitba2c33bcc94b39c1eabe62fee838173aa14e76c4 (patch)
treefb6cf347803b10bcf894aa69535dc0b2b60d6809 /Build/source/texk/kpathsea/xbasename.c
parentf39500686f1d59c546088298de78c179dc55189e (diff)
kpathsea: Eliminate global and static variables (w32 only)
git-svn-id: svn://tug.org/texlive/trunk@41557 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/xbasename.c')
-rw-r--r--Build/source/texk/kpathsea/xbasename.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Build/source/texk/kpathsea/xbasename.c b/Build/source/texk/kpathsea/xbasename.c
index c66da1cf622..c3f29b7828e 100644
--- a/Build/source/texk/kpathsea/xbasename.c
+++ b/Build/source/texk/kpathsea/xbasename.c
@@ -1,6 +1,6 @@
/* xbasename.c: return the last element in a path.
- Copyright 1992, 1994, 1995, 1996, 2008, 2011 Karl Berry.
+ Copyright 1992, 1994, 1995, 1996, 2008, 2011, 2016 Karl Berry.
Copyright 2005 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -38,13 +38,13 @@ xbasename (const_string name)
unsigned limit;
for (limit = 2; name[limit] && !IS_DIR_SEP (name[limit]); limit++)
-#if defined(WIN32)
+#if defined(WIN32) && defined (KPSE_COMPAT_API)
if (IS_KANJI(name+limit)) limit++
#endif
;
if (name[limit++] && name[limit] && !IS_DIR_SEP (name[limit])) {
for (; name[limit] && !IS_DIR_SEP (name[limit]); limit++)
-#if defined(WIN32)
+#if defined(WIN32) && defined (KPSE_COMPAT_API)
if (IS_KANJI(name+limit)) limit++
#endif
;
@@ -57,7 +57,7 @@ xbasename (const_string name)
for (p = base; *p; p++) {
if (IS_DIR_SEP(*p))
base = p + 1;
-#if defined(WIN32)
+#if defined(WIN32) && defined (KPSE_COMPAT_API)
else if (IS_KANJI(p))
p++;
#endif