Back to index

tetex-bin  3.0
proginit.c File Reference
#include <kpathsea/config.h>
#include <kpathsea/c-pathch.h>
#include <kpathsea/proginit.h>
#include <kpathsea/tex-file.h>

Go to the source code of this file.


void kpse_init_prog P4C (const_string, prefix, unsigned, dpi, const_string, mode, const_string, fallback)

Function Documentation

void kpse_init_prog P4C ( const_string  ,
prefix  ,
unsigned  ,
dpi  ,
const_string  ,
mode  ,
const_string  ,

Definition at line 30 of file proginit.c.

  string font_var = concat (prefix, "FONTS");
  string header_var = concat (prefix, "HEADERS");
  string makepk_var = concat (prefix, "MAKEPK");
  string size_var = concat (prefix, "SIZES");
  /* Do both `pk_format' and `any_glyph_format' for the sake of xdvi; in
     general, mktexpk might apply to either, and the program will ask
     for the one it wants.  */
  /* 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);

      = 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_gf_format].override_path
    = kpse_format_info[kpse_any_glyph_format].override_path
    = kpse_format_info[kpse_tfm_format].override_path
    = getenv (font_var);

    = getenv (header_var);

  kpse_init_fallback_resolutions (size_var);
  xputenv_int ("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);
  free (font_var);
  free (header_var);
  free (makepk_var);
  free (size_var);

Here is the call graph for this function: