lilypond-1.3.122
[lilypond.git] / lily / kpath.cc
blob022f929ec376b2002ad65ca3a8f9f5e21ba64c6a
1 /*
2 kpath.cc -- glue kpathsea to lily. Need some ugly kludges for gcc 2.96
4 source file of the GNU LilyPond music typesetter
6 (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
10 #include <stdio.h>
11 #include "config.h"
13 #define popen REALLYUGLYKLUDGE
14 #define pclose ANOTHERREALLYUGLYKLUDGE
16 #if HAVE_KPATHSEA_KPATHSEA_H
17 extern "C" {
18 #include <kpathsea/kpathsea.h>
19 #include <kpathsea/tex-file.h>
21 #endif
23 #include "kpath.hh"
27 char * ly_find_afm (char const * name)
29 #if (KPATHSEA && HAVE_KPSE_FIND_FILE)
30 return kpse_find_file (name, kpse_afm_format, true);
31 #endif
32 return 0;
35 char * ly_find_tfm (char const * name)
37 #if (KPATHSEA && HAVE_KPSE_FIND_FILE)
38 return kpse_find_file (name, kpse_tfm_format, true);
39 #endif
40 return 0;
44 void
45 ly_init_kpath (char *av0)
47 #if KPATHSEA && HAVE_KPATHSEA_KPATHSEA_H
49 initialize kpathsea
51 kpse_set_program_name(av0, NULL);
52 kpse_maketex_option("tfm", TRUE);
53 #endif