From 2578f5b53805e6cf9f731369a0ef217ec1a4de94 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Fri, 29 Mar 2019 22:34:10 +0000 Subject: Improve to record texmf.cnf. (ptex and friends, and w32 only). git-svn-id: svn://tug.org/texlive/trunk@50646 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/lib/ChangeLog | 7 +++++++ Build/source/texk/web2c/lib/openclose.c | 4 ++-- Build/source/texk/web2c/lib/texmfmp.c | 13 ++++++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 9f913eb4bc2..5dd7cd63bc1 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,10 @@ +2019-03-30 Akira Kakuto + + * texmfmp.c: Improve to record texmf.cnf. (ptex and friends, + and w32 only). + * openclose.c: Remove "static" in order to use relevant + functions externally. (w32 only). + 2019-03-23 Akira Kakuto * texmfmp.c: On windows, xetex and pdftex did not record diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c index 945c732672f..63fa0393528 100644 --- a/Build/source/texk/web2c/lib/openclose.c +++ b/Build/source/texk/web2c/lib/openclose.c @@ -43,7 +43,7 @@ static int fsyscp_rename(char *s1, char *s2) return ret; } -static FILE *f_fsyscp_fopen(const char *filename, const char *mode) +FILE *f_fsyscp_fopen(const char *filename, const char *mode) { if(!file_system_codepage) return fopen(filename, mode); @@ -51,7 +51,7 @@ static FILE *f_fsyscp_fopen(const char *filename, const char *mode) return fsyscp_fopen(filename, mode); } -static FILE *f_fsyscp_xfopen(const char *filename, const char *mode) +FILE *f_fsyscp_xfopen(const char *filename, const char *mode) { if(!file_system_codepage) return xfopen(filename, mode); diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index 092e834b0c2..64a7d31160b 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -744,9 +744,16 @@ maininit (int ac, string *av) after the start of kpathsea due to special initializations. Therefore we record texmf.cnf here. */ if (recorder_enabled) { - string p = kpse_find_file ("texmf.cnf", kpse_cnf_format, 0); - if (p) - recorder_record_input (p); + string *p = kpse_find_file_generic ("texmf.cnf", kpse_cnf_format, 0, 1); + if (p && *p) { + string *pp = p; + while (*p) { + recorder_record_input (*p); + free (*p); + p++; + } + free (pp); + } } #endif /* IS_pTeX || (...) */ -- cgit v1.2.3