texlive[49410] Build/source/texk/kpathsea: IS_KPSE_SEP: check for
commits+karl at tug.org
commits+karl at tug.org
Fri Dec 14 00:29:33 CET 2018
Revision: 49410
http://tug.org/svn/texlive?view=revision&revision=49410
Author: karl
Date: 2018-12-14 00:29:33 +0100 (Fri, 14 Dec 2018)
Log Message:
-----------
IS_KPSE_SEP: check for both : and ; only on Unix
Modified Paths:
--------------
trunk/Build/source/texk/kpathsea/ChangeLog
trunk/Build/source/texk/kpathsea/c-pathch.h
trunk/Build/source/texk/kpathsea/kpsewhich.c
Modified: trunk/Build/source/texk/kpathsea/ChangeLog
===================================================================
--- trunk/Build/source/texk/kpathsea/ChangeLog 2018-12-13 23:17:44 UTC (rev 49409)
+++ trunk/Build/source/texk/kpathsea/ChangeLog 2018-12-13 23:29:33 UTC (rev 49410)
@@ -1,10 +1,14 @@
2018-12-14 Karl Berry <karl at tug.org>
+ * c-pathch.h (IS_KPSE_SEP): check for both : and ; only on Unix.
+ On Windows, : is the c: drive separator and must not ever be
+ a path separator.
+
* texmf.cnf (TEXMFDOTDIR): new variable, used instead of
literal "." in all search paths, so that it can be redefined as
".//". Suggestion from Linas Stonys, tex-k 4 Dec 2018 10:09:35.
-2018-12-12 Karl Berry <karl at freefriends.org>
+2018-12-13 Karl Berry <karl at freefriends.org>
* c-pathch.h (IS_KPSE_SEP): new macro to check for either : or ;
regardless of the current system.
Modified: trunk/Build/source/texk/kpathsea/c-pathch.h
===================================================================
--- trunk/Build/source/texk/kpathsea/c-pathch.h 2018-12-13 23:17:44 UTC (rev 49409)
+++ trunk/Build/source/texk/kpathsea/c-pathch.h 2018-12-13 23:29:33 UTC (rev 49410)
@@ -90,6 +90,10 @@
#else
# define ENV_SEP ':'
# define ENV_SEP_STRING ":"
+/* Because paths in Kpathsea cnf files allow use of either ; or : separators
+ regardless of the current system, on Unix we sometimes need to check
+ for either . */
+# define IS_KPSE_SEP(ch) ((ch) == ':' || (ch) == ';')
#endif
#endif /* not ENV_SEP */
@@ -97,13 +101,11 @@
#define IS_ENV_SEP(ch) ((ch) == ENV_SEP)
#endif
-/* Because paths in Kpathsea cnf files are system-independent, allowing
- use of either ; or : regardless of the current system, sometimes we
- need to check for either of the possible path separators. */
#ifndef IS_KPSE_SEP
-#define IS_KPSE_SEP(ch) ((ch) == ':' || (ch) == ';')
-/* In principle we should do it differently on VMS and VMCMS,
- but I'm guessing no one is compiling current kpathsea sources there. */
+/* But for Windows, we do not want to consider : as a path separator,
+ ever, because it is the drive separator (as in c:\tex). So just
+ check for the regular separator (;). */
+#define IS_KPSE_SEP(ch) (IS_ENV_SEP (ch))
#endif
#endif /* not C_PATHCH_H */
Modified: trunk/Build/source/texk/kpathsea/kpsewhich.c
===================================================================
--- trunk/Build/source/texk/kpathsea/kpsewhich.c 2018-12-13 23:17:44 UTC (rev 49409)
+++ trunk/Build/source/texk/kpathsea/kpsewhich.c 2018-12-13 23:29:33 UTC (rev 49410)
@@ -837,11 +837,6 @@
value = "";
}
-#if 0
-/* must think about
- selfautoloc=c:/texlive/texlive2018/bin/win32
- kpsewhich --var-value selfautoloc
-
/* It is helpful for users to output the fully-expanded (as a
string, no filesystem checks) value. We can't call brace_expand
as part of kpathsea_var_value, though, because unfortunately it
@@ -848,7 +843,7 @@
is not reentrant. We use var_value in lots of places in the
source, and it clobbers the static buffer in the kpse structure. */
value = kpathsea_brace_expand (kpse, value);
-#endif
+
puts (value);
}
More information about the tex-live-commits
mailing list