diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-02-19 10:59:11 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-02-19 10:59:11 +0000 |
commit | c163881cd5baaca12287e1fff002faaafe849816 (patch) | |
tree | 73e2553130f6ee63a02cc0987d550c1a1c0a3f98 /Build/source/texk | |
parent | 995db80294852b2fd19b4c5fcbd4cf3cd9beea52 (diff) |
xdv2pdf: use kpathsea funcs instead of copied code
git-svn-id: svn://tug.org/texlive/trunk@17101 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/xdv2pdf/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/xdv2pdf/xdv2pdf_main.c | 35 | ||||
-rw-r--r-- | Build/source/texk/xdv2pdf/xdv_kpse_formats.h | 12 |
3 files changed, 50 insertions, 3 deletions
diff --git a/Build/source/texk/xdv2pdf/ChangeLog b/Build/source/texk/xdv2pdf/ChangeLog index ee6b827541f..13f9f0d80a7 100644 --- a/Build/source/texk/xdv2pdf/ChangeLog +++ b/Build/source/texk/xdv2pdf/ChangeLog @@ -1,3 +1,9 @@ +2010-02-18 Peter Breitenlohner <peb@mppmu.mpg.de> + + * xdv2pdf_main.c, xdv_kpse_formats.h: Initialize search paths + via kpse_init_format() and kpse_set_suffixes(). + The old code is still available through '-DXDV2PDF_OLD_FORMATS'. + 2009-06-22 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am (AM_CFLAGS): enable comfiler warnings for C code diff --git a/Build/source/texk/xdv2pdf/xdv2pdf_main.c b/Build/source/texk/xdv2pdf/xdv2pdf_main.c index c7624624b71..64bf700b946 100644 --- a/Build/source/texk/xdv2pdf/xdv2pdf_main.c +++ b/Build/source/texk/xdv2pdf/xdv2pdf_main.c @@ -60,6 +60,8 @@ string progname = NULL; extern int xdv2pdf(int argc, char** argv); +#ifdef XDV2PDF_OLD_FORMATS + #ifndef DEFAULT_OTFFONTS #define DEFAULT_OTFFONTS ".:/usr/local/teTeX/share/texmf/fonts/otf//:/usr/TeX/texmf/fonts/otf//" #endif @@ -195,18 +197,22 @@ init_path(kpse_format_info_type *info, const_string default_path, ...) info->path = kpse_brace_expand (info->path); } +#endif /* XDV2PDF_OLD_FORMATS */ + int main(int argc, char** argv) { +#ifdef XDV2PDF_OLD_FORMATS + kpse_file_format_type format; kpse_set_program_name (argv[0], progname); - + /* It seems to be critical that I do a kpse_cnf_get to trigger the reading of texmf.cnf files BEFORE the INIT_FORMAT stuff below. I don't really understand all the interactions of search paths, config files, etc., but for now this is working for me. */ kpse_cnf_get("TETEXDIR"); - + format = kpse_cnf_format; INIT_FORMAT ("cnf", DEFAULT_TEXMFCNF, CNF_ENVS); SUFFIXES (".cnf"); @@ -215,7 +221,7 @@ main(int argc, char** argv) INIT_FORMAT ("ls-R", DEFAULT_TEXMFDBS, DB_ENVS); SUFFIXES ("ls-R"); FMT_INFO.path = remove_dbonly (FMT_INFO.path); - + format = xdv_kpse_pfb_format; INIT_FORMAT ("type1 fonts", DEFAULT_T1FONTS, TYPE1_ENVS); FMT_INFO.binmode = true; @@ -244,5 +250,28 @@ main(int argc, char** argv) FMT_INFO.suffix_search_only = true; SUFFIXES (".enc"); +#else /* not XDV2PDF_OLD_FORMATS */ + + kpse_set_program_name (argv[0], progname); + + /* It seems to be critical that I do a kpse_cnf_get to trigger the reading of texmf.cnf files + BEFORE the INIT_FORMAT stuff below. I don't really understand all the interactions + of search paths, config files, etc., but for now this is working for me. */ + kpse_cnf_get("TETEXDIR"); + + /* Initialize search paths. */ + kpse_init_format (kpse_cnf_format); + kpse_init_format (kpse_db_format); + kpse_init_format (kpse_type1_format); + kpse_init_format (kpse_opentype_format); + kpse_init_format (kpse_tfm_format); + kpse_init_format (kpse_fontmap_format); + kpse_init_format (kpse_enc_format); + + /* Re-initialize type1 suffix list (without ".pfa"). */ + kpse_set_suffixes (kpse_type1_format, false, ".pfb", NULL); + +#endif /* not XDV2PDF_OLD_FORMATS */ + return xdv2pdf(argc, argv); } diff --git a/Build/source/texk/xdv2pdf/xdv_kpse_formats.h b/Build/source/texk/xdv2pdf/xdv_kpse_formats.h index 9d894a85cbc..e480c36bd6c 100644 --- a/Build/source/texk/xdv2pdf/xdv_kpse_formats.h +++ b/Build/source/texk/xdv2pdf/xdv_kpse_formats.h @@ -28,8 +28,20 @@ use or other dealings in this Software without prior written authorization from SIL International. \****************************************************************************/ +#ifdef XDV2PDF_OLD_FORMATS + #define xdv_kpse_otf_format 0 #define xdv_kpse_pfb_format 1 #define xdv_kpse_tfm_format 2 #define xdv_kpse_font_map_format 3 #define xdv_kpse_enc_format 4 + +#else /* not XDV2PDF_OLD_FORMATS */ + +#define xdv_kpse_otf_format kpse_opentype_format +#define xdv_kpse_pfb_format kpse_type1_format +#define xdv_kpse_tfm_format kpse_tfm_format +#define xdv_kpse_font_map_format kpse_fontmap_format +#define xdv_kpse_enc_format kpse_enc_format + +#endif /* not XDV2PDF_OLD_FORMATS */ |