Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
setup.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2000, Matias Atria
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  */
18 
19 #include <config.h>
20 #include <stdlib.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <ctype.h>
24 
25 #include "mdvi.h"
26 #include "private.h"
27 
28 void mdvi_init_kpathsea(const char *program,
29  const char *mfmode, const char *font, int dpi,
30  const char *texmfcnf)
31 {
32  const char *p;
33 
34  /* Stop meaningless output generation. */
35  kpse_make_tex_discard_errors = FALSE;
36 
37  p = strrchr(program, '/');
38  p = (p ? p + 1 : program);
39  kpse_set_program_name(program, p);
40  kpse_init_prog(p, dpi, mfmode, font);
41  kpse_set_program_enabled(kpse_any_glyph_format, 1, kpse_src_compile);
42  kpse_set_program_enabled(kpse_pk_format, 1, kpse_src_compile);
43  kpse_set_program_enabled(kpse_tfm_format, 1, kpse_src_compile);
44  kpse_set_program_enabled(kpse_ofm_format, 1, kpse_src_compile);
45  if (texmfcnf != NULL)
46  xputenv("TEXMFCNF", texmfcnf);
47 }
48