diff options
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/lib.h | 6 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/tex-file.c | 4 |
3 files changed, 13 insertions, 3 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 52b4e79b673..1feb2ffbb0c 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,9 @@ +2018-02-01 Karl Berry <karl@freefriends.org> + + * lib.h (KPSE_CNF_P): new macro. + * tex-file.c (kpathsea_find_file_generic): use it, + for try_std_extension_first. + 2018-01-27 Karl Berry <karl@freefriends.org> * readable.h: doc fixes. diff --git a/Build/source/texk/kpathsea/lib.h b/Build/source/texk/kpathsea/lib.h index 8c1f8e1ecc4..df380f654d6 100644 --- a/Build/source/texk/kpathsea/lib.h +++ b/Build/source/texk/kpathsea/lib.h @@ -122,6 +122,12 @@ extern "C" { /* If the environment variable TEST is set, return it; otherwise, DEFAULT. This is useful for paths that use more than one envvar. */ #define ENVVAR(test, default) (getenv (test) ? (test) : (default)) + +/* Return whether a kpse configuration is (some sort of) true. Check + for negation values, so a value like "2" will be true, just in case. */ +#define KPSE_CNF_P(val) \ + ((val) && *(val) && *(val) != 'f' && *(val) != '0') + /* Return a fresh copy of S1 followed by S2, et al. */ extern KPSEDLL string concat (const_string s1, const_string s2); diff --git a/Build/source/texk/kpathsea/tex-file.c b/Build/source/texk/kpathsea/tex-file.c index f11753e6244..626e240b82d 100644 --- a/Build/source/texk/kpathsea/tex-file.c +++ b/Build/source/texk/kpathsea/tex-file.c @@ -1079,9 +1079,7 @@ kpathsea_find_file_generic (kpathsea kpse, const_string const_name, try_std_extension_first = kpathsea_var_value (kpse, "try_std_extension_first"); - if (has_any_suffix /* xxx && ! KPSE_CNF_VALUE_P (try_std_extension_first)*/ - && (try_std_extension_first == NULL || *try_std_extension_first == 'f' - || *try_std_extension_first == '0')) { + if (has_any_suffix && !KPSE_CNF_P (try_std_extension_first)) { target_asis_name (kpse, &target, &count, format, name, use_fontmaps, has_potential_suffix, has_any_suffix); target_suffixed_names (kpse, &target, &count, format, name, use_fontmaps, |