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--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
15 #define popen REALLYUGLYKLUDGE
16 #define pclose ANOTHERREALLYUGLYKLUDGE
18 #if HAVE_KPATHSEA_KPATHSEA_H
20 #include <kpathsea/kpathsea.h>
21 #include <kpathsea/tex-file.h>
29 char * ly_find_afm (char const * name)
31 #if (KPATHSEA && HAVE_KPSE_FIND_FILE)
32 return kpse_find_file (name, kpse_afm_format, true);
37 char * ly_find_tfm (char const * name)
39 #if (KPATHSEA && HAVE_KPSE_FIND_FILE)
40 return kpse_find_file (name, kpse_tfm_format, true);
47 ly_init_kpath (char *av0)
49 #if KPATHSEA && HAVE_KPATHSEA_KPATHSEA_H
53 kpse_set_program_name(av0, NULL);
54 kpse_maketex_option("tfm", TRUE);
57 ugh: apparently the program_args is non-functional.
59 #define VERSION MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL
61 #define MY_TFMPATH "$VARTEXFONTS/tfm/lilypond/" VERSION "/"
63 char * mypath = kpse_expand (MY_TFMPATH);
64 String prog = "mktextfm --destdir ";
67 kpse_format_info[kpse_tfm_format].program = strdup (prog.ch_C());
68 kpse_format_info[kpse_tfm_format].client_path = mypath;