diff options
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/c-pathch.h | 14 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/kpsewhich.c | 7 |
3 files changed, 14 insertions, 13 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 36b2cb4d473..abfa98aebba 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,10 +1,14 @@ 2018-12-14 Karl Berry <karl@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@freefriends.org> +2018-12-13 Karl Berry <karl@freefriends.org> * c-pathch.h (IS_KPSE_SEP): new macro to check for either : or ; regardless of the current system. diff --git a/Build/source/texk/kpathsea/c-pathch.h b/Build/source/texk/kpathsea/c-pathch.h index 6234b56c9b6..44b10103512 100644 --- a/Build/source/texk/kpathsea/c-pathch.h +++ b/Build/source/texk/kpathsea/c-pathch.h @@ -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 */ diff --git a/Build/source/texk/kpathsea/kpsewhich.c b/Build/source/texk/kpathsea/kpsewhich.c index 879c7998757..d170c454a4f 100644 --- a/Build/source/texk/kpathsea/kpsewhich.c +++ b/Build/source/texk/kpathsea/kpsewhich.c @@ -837,18 +837,13 @@ main (int argc, string *argv) 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 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); } |