From: Han-Wen Nienhuys Date: Sun, 6 Mar 2005 19:34:13 +0000 (+0000) Subject: (open_library): dlopen libkpathsea.so X-Git-Tag: release/2.5.14~13 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=92ee5a5e2dfa180b153666f560ea75c3dcb96290;p=lilypond.git (open_library): dlopen libkpathsea.so --- diff --git a/kpath-guile/kpath.c b/kpath-guile/kpath.c index 5e6e9155eb..01f340e4f8 100644 --- a/kpath-guile/kpath.c +++ b/kpath-guile/kpath.c @@ -10,6 +10,9 @@ #include #include "config.hh" + +#if KPATHSEA + #include "guile-compatibility.hh" #include @@ -34,16 +37,12 @@ I found a somewhat more elegant patch for this: Just #include #define pclose ANOTHERREALLYUGLYKLUDGE #define getopt YAKLUDGE -#if HAVE_KPATHSEA_KPATHSEA_H #include #include -#endif -#if KPATHSEA -#if HAVE_KPATHSEA_KPATHSEA_H static void *kpathsea_handle = 0; static char *(*dl_kpse_find_file) (char const*, kpse_file_format_type, boolean) = 0; static void (*dl_kpse_maketex_option) (char const*, boolean) = 0; @@ -75,7 +74,6 @@ kpathsea_find_format (const char* name) } return kpse_last_format; } -#endif // "Return the absolute file name of @var{name}, " // "or @code{#f} if not found.") @@ -109,9 +107,9 @@ SCM ly_kpathsea_expand_variable(SCM var) static char const* LIBKPATHSEA = "libkpathsea.so"; int -open_library () +open_dynamic_library () { -#if KPATHSEA && HAVE_KPATHSEA_KPATHSEA_H +#if HAVE_DYNAMIC_LIBKPATHSEA struct { void **func_pointer; @@ -162,7 +160,7 @@ open_library () void initialize_kpathsea () { - if (open_library ()) + if (open_dynamic_library ()) { fprintf (stderr, "Error opening kpathsea library. Aborting"); exit (1); diff --git a/lily/all-font-metrics.cc b/lily/all-font-metrics.cc index 2e0009a6f9..cb5cb7ffaa 100644 --- a/lily/all-font-metrics.cc +++ b/lily/all-font-metrics.cc @@ -14,7 +14,6 @@ #include "afm.hh" #include "tfm.hh" #include "scm-hash.hh" -#include "kpath.hh" #include "pango-font.hh" static char const *default_font_str0_ = "cmr10"; diff --git a/lily/auto-change-iterator.cc b/lily/auto-change-iterator.cc index eb7f5e39a3..6098d05c76 100644 --- a/lily/auto-change-iterator.cc +++ b/lily/auto-change-iterator.cc @@ -23,7 +23,7 @@ protected: virtual void do_quit (); virtual void construct_children (); virtual void process (Moment); - Array pending_pitch (Moment)const; + Array pending_pitch (Moment) const; private: SCM split_list_; Direction where_dir_; diff --git a/lily/bezier.cc b/lily/bezier.cc index 7a5c60a382..de47a3b0de 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -84,7 +84,7 @@ Bezier::get_other_coordinate (Axis a, Real x) const Offset -Bezier::curve_point (Real t)const +Bezier::curve_point (Real t) const { Real tj = 1; Real one_min_tj = (1-t)* (1-t)* (1-t); @@ -110,7 +110,7 @@ Bezier::curve_point (Real t)const Polynomial -Bezier::polynomial (Axis a)const +Bezier::polynomial (Axis a) const { Polynomial p (0.0); for (int j = 0; j <= 3; j++) @@ -140,7 +140,7 @@ filter_solutions (Array sol) find t such that derivative is proportional to DERIV */ Array -Bezier::solve_derivative (Offset deriv)const +Bezier::solve_derivative (Offset deriv) const { Polynomial xp = polynomial (X_AXIS); Polynomial yp = polynomial (Y_AXIS); @@ -170,7 +170,7 @@ Bezier::solve_point (Axis ax, Real coordinate) const Compute the bounding box dimensions in direction of A. */ Interval -Bezier::extent (Axis a)const +Bezier::extent (Axis a) const { int o = (a+1)%NO_AXES; Offset d; diff --git a/lily/box.cc b/lily/box.cc index 1d69b6ecfb..312252112d 100644 --- a/lily/box.cc +++ b/lily/box.cc @@ -50,7 +50,7 @@ Box::operator[] (Axis a) } Interval -Box::operator[] (Axis a)const +Box::operator[] (Axis a) const { return interval_a_[a]; } diff --git a/lily/folded-repeat-iterator.cc b/lily/folded-repeat-iterator.cc index 62459136eb..a378ce45d7 100644 --- a/lily/folded-repeat-iterator.cc +++ b/lily/folded-repeat-iterator.cc @@ -131,7 +131,7 @@ Folded_repeat_iterator::try_music_in_children (Music * m) const return 0; } void -Folded_repeat_iterator::derived_mark ()const +Folded_repeat_iterator::derived_mark () const { if (main_iter_) scm_gc_mark (main_iter_->self_scm ()); diff --git a/lily/grob.cc b/lily/grob.cc index 35aa13328b..2ca648430c 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -555,7 +555,7 @@ Grob::has_extent_callback (SCM cb, Axis a) const } bool -Grob::has_offset_callback (SCM cb, Axis a)const +Grob::has_offset_callback (SCM cb, Axis a) const { return scm_c_memq (cb, dim_cache_[a].offset_callbacks_) != SCM_BOOL_F; } @@ -616,7 +616,7 @@ Grob::fixup_refpoint (SCM smob) } void -Grob::warning (String s)const +Grob::warning (String s) const { SCM cause = self_scm (); while (Grob *g = unsmob_grob (cause)) @@ -694,8 +694,6 @@ Grob::discretionary_processing () { } - - bool Grob::internal_has_interface (SCM k) { diff --git a/lily/include/kpath-private.hh b/lily/include/kpath-private.hh deleted file mode 100644 index 0814b5c6d6..0000000000 --- a/lily/include/kpath-private.hh +++ /dev/null @@ -1,39 +0,0 @@ -/* - kpath-private.hh -- declare - - source file of the GNU LilyPond music typesetter - - (c) 2005 Han-Wen Nienhuys - -*/ - -#ifndef KPATH_PRIVATE_HH -#define KPATH_PRIVATE_HH - -#include "config.hh" - -#define popen KPATHSEA_HAS_POPEN_PROTOTYPE_PROBLEM -#define pclose KPATHSEA_HAS_PCLOSE_PROTOTYPE_PROBLEM -#define getopt KPATHSEA_HAS_GETOPT_PROTOTYPE_PROBLEM - -#if HAVE_KPATHSEA_KPATHSEA_H -extern "C" { - #include - #include - extern void *kpathsea_handle; - extern char *(*dl_kpse_find_file) (char const*, kpse_file_format_type, - boolean); - extern char const *(*dl_kpse_init_format) (kpse_file_format_type); - extern void (*dl_kpse_maketex_option) (char const*, boolean); - extern void (*dl_kpse_set_program_name) (char const*); - extern char *(*dl_kpse_var_expand) (char const*); - extern kpse_format_info_type (*dl_kpse_format_info)[kpse_last_format]; -} -#endif - -kpse_file_format_type kpathsea_find_format (String name); - -#endif /* KPATH_PRIVATE_HH */ - - - diff --git a/lily/item.cc b/lily/item.cc index 1fc1969d44..180a655452 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -181,7 +181,7 @@ Item::handle_prebroken_dependencies () } SCM -Item::do_derived_mark ()const +Item::do_derived_mark () const { if (broken_to_drul_[LEFT]) scm_gc_mark (broken_to_drul_[LEFT]->self_scm ()); diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 00b71274b3..9cb3f082c4 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -204,9 +204,6 @@ ly_init_ly_module (void *) #if KPATHSEA if (is_TeX_format_global) { - /* - TODO: load this dynamically - */ initialize_kpathsea (); } #endif diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 15a82bbed6..a8271110bd 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -54,11 +54,6 @@ MFTRACE_FLAGS=$(if $(ENCODING_FILE),--encoding $(ENCODING_FILE),) --no-afm # 2. are not included with teTeX # -foe: - echo $(MFINPUTS) - echo $(TEXMF) - kpsewhich exbase.mf - $(outdir)/%.cff.ps $(outdir)/%.cff $(outdir)/%.otf $(outdir)/%.svg: $(outdir)/%.pe (cd $(outdir) && fontforge -script $(notdir $<)) $(PYTHON) $(buildscript-dir)/ps-embed-cff.py $(basename $<).cff `cat $(basename $<).fontname` $(basename $<).cff.ps