diff options
Diffstat (limited to 'Build/source/texk/kpathsea/proginit.c')
-rw-r--r-- | Build/source/texk/kpathsea/proginit.c | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/Build/source/texk/kpathsea/proginit.c b/Build/source/texk/kpathsea/proginit.c index 2c4b89d124b..a2127d6500b 100644 --- a/Build/source/texk/kpathsea/proginit.c +++ b/Build/source/texk/kpathsea/proginit.c @@ -27,8 +27,8 @@ mess, but still better than repeating the code. */ void -kpse_init_prog P4C(const_string, prefix, unsigned, dpi, const_string, mode, - const_string, fallback) +kpathsea_init_prog (kpathsea kpse, const_string prefix, unsigned dpi, + const_string mode, const_string fallback) { string font_var = concat (prefix, "FONTS"); string header_var = concat (prefix, "HEADERS"); @@ -42,35 +42,44 @@ kpse_init_prog P4C(const_string, prefix, unsigned, dpi, const_string, mode, /* Might have a program-specific name for mktexpk itself. */ if (getenv (makepk_var)) { /* If we did, we want to enable the program, I think. */ - kpse_set_program_enabled (kpse_pk_format, 1, kpse_src_env); - kpse_set_program_enabled (kpse_any_glyph_format, 1, kpse_src_env); + kpathsea_set_program_enabled (kpse, kpse_pk_format, 1, kpse_src_env); + kpathsea_set_program_enabled (kpse, kpse_any_glyph_format, 1, kpse_src_env); - kpse_format_info[kpse_pk_format].program - = kpse_format_info[kpse_any_glyph_format].program + kpse->format_info[kpse_pk_format].program + = kpse->format_info[kpse_any_glyph_format].program = getenv (makepk_var); } /* A couple font paths have traditionally had application-specific environment variables to override all else; namely, XDVIFONTS and DVIPSHEADERS. So set those if we have them. */ - kpse_format_info[kpse_pk_format].override_path - = kpse_format_info[kpse_gf_format].override_path - = kpse_format_info[kpse_any_glyph_format].override_path - = kpse_format_info[kpse_tfm_format].override_path + kpse->format_info[kpse_pk_format].override_path + = kpse->format_info[kpse_gf_format].override_path + = kpse->format_info[kpse_any_glyph_format].override_path + = kpse->format_info[kpse_tfm_format].override_path = getenv (font_var); - kpse_format_info[kpse_tex_ps_header_format].override_path + kpse->format_info[kpse_tex_ps_header_format].override_path = getenv (header_var); - kpse_init_fallback_resolutions (size_var); - xputenv_int ("MAKETEX_BASE_DPI", dpi); - kpse_fallback_font = fallback; + kpathsea_init_fallback_resolutions (kpse, size_var); + kpathsea_xputenv_int (kpse, "MAKETEX_BASE_DPI", dpi); + kpse->fallback_font = fallback; /* Ugliness. See comments in kpse_make_tex in kpathsea/tex-make.c. */ - xputenv ("MAKETEX_MODE", mode ? mode : DIR_SEP_STRING); + kpathsea_xputenv (kpse, "MAKETEX_MODE", mode ? mode : DIR_SEP_STRING); free (font_var); free (header_var); free (makepk_var); free (size_var); } + +#if defined (KPSE_COMPAT_API) +void +kpse_init_prog (const_string prefix, unsigned dpi, + const_string mode, const_string fallback) +{ + kpathsea_init_prog(kpse_def,prefix,dpi,mode,fallback); +} +#endif |