diff options
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 8 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/tex-file.c | 32 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/tex-make.c | 1 |
3 files changed, 39 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 8ae651ff55f..e0bdd161b9a 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,5 +1,13 @@ 2008-05-31 Karl Berry <karl@tug.org> + * tex-file.c (INIT_FORMAT): construct human-formatted list of + envvars that are considered for each format, as requested by + Nelson Beebe and others over the years. + (init_format) [KPSE_DEBUG]: include it in the debugging output. + (concatn_with_spaces): the function to make the list. + + * tex-make.c: concatn.h unused, removed. + * db.c (DB_HASH_SIZE): 32003 seems a better compromise between the tiny texmf (~1300 entries) and huge texmf-dist (~62000 entries). diff --git a/Build/source/texk/kpathsea/tex-file.c b/Build/source/texk/kpathsea/tex-file.c index 102d4ee1949..ea381a8af7c 100644 --- a/Build/source/texk/kpathsea/tex-file.c +++ b/Build/source/texk/kpathsea/tex-file.c @@ -325,7 +325,8 @@ kpse_set_suffixes PVAR2C(kpse_file_format_type, format, list. Also initialize the fields not needed in setting the path. */ #define INIT_FORMAT(text, default_path, envs) \ FMT_INFO.type = text; \ - init_path (&FMT_INFO, default_path, envs, NULL) + init_path (&FMT_INFO, default_path, envs, NULL); \ + envvar_list = concatn_with_spaces (envs, NULL); /* A few file types allow for runtime generation by an external program. @@ -393,11 +394,39 @@ remove_dbonly P1C(const_string, path) return(ret); } +/* Same as concatn but puts a space between each element. All this just + for nice debugging output. But it's useful. */ + +static string +concatn_with_spaces PVAR1C(const_string, str1, ap) +{ + string arg; + string ret; + + if (!str1) + return NULL; + + ret = xstrdup (str1); + + while ((arg = va_arg (ap, string)) != NULL) + { + string temp = concat3 (ret, " ", arg); + free (ret); + ret = temp; + } + va_end (ap); + + return ret; +}} + + /* Initialize everything for FORMAT. */ const_string kpse_init_format P1C(kpse_file_format_type, format) { + string envvar_list; /* only for debug output, set in INIT_FORMAT */ + /* If we get called twice, don't redo all the work. */ if (FMT_INFO.path) return FMT_INFO.path; @@ -690,6 +719,7 @@ kpse_init_format P1C(kpse_file_format_type, format) DEBUGF1 (" application config file path = %s\n", MAYBE (client_path)); DEBUGF1 (" texmf.cnf path = %s\n", MAYBE (cnf_path)); DEBUGF1 (" compile-time path = %s\n", MAYBE (default_path)); + DEBUGF1 (" environment variables = %s\n", envvar_list); DEBUGF (" default suffixes ="); if (FMT_INFO.suffix) { const_string *ext; diff --git a/Build/source/texk/kpathsea/tex-make.c b/Build/source/texk/kpathsea/tex-make.c index bde28b9dfff..d19891199d6 100644 --- a/Build/source/texk/kpathsea/tex-make.c +++ b/Build/source/texk/kpathsea/tex-make.c @@ -20,7 +20,6 @@ #include <kpathsea/c-fopen.h> #include <kpathsea/c-pathch.h> -#include <kpathsea/concatn.h> #include <kpathsea/db.h> #include <kpathsea/fn.h> #include <kpathsea/magstep.h> |