]> git.donarmstrong.com Git - lilypond.git/commitdiff
(open_library): dlopen libkpathsea.so
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 6 Mar 2005 19:34:13 +0000 (19:34 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 6 Mar 2005 19:34:13 +0000 (19:34 +0000)
kpath-guile/kpath.c
lily/all-font-metrics.cc
lily/auto-change-iterator.cc
lily/bezier.cc
lily/box.cc
lily/folded-repeat-iterator.cc
lily/grob.cc
lily/include/kpath-private.hh [deleted file]
lily/item.cc
lily/lily-guile.cc
mf/GNUmakefile

index 5e6e9155eb25dfcb7760c7db42d7fa9cb355f6ca..01f340e4f8305302d37e838acd8b34efcd7ab991 100644 (file)
@@ -10,6 +10,9 @@
 #include <libguile.h>
 
 #include "config.hh"
+
+#if KPATHSEA
+
 #include "guile-compatibility.hh"
 
 #include <dlfcn.h>
@@ -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 <kpathsea/kpathsea.h>
 #include <kpathsea/tex-file.h>
-#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);
index 2e0009a6f9f535237345434b94847ec0772cfe48..cb5cb7ffaa8d86f46075fc3a30d5b4c709c872ee 100644 (file)
@@ -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";
index eb7f5e39a37f091f383e123ab1979187638457a2..6098d05c7618e1dd2efe686e86d3dc6e147adce1 100644 (file)
@@ -23,7 +23,7 @@ protected:
   virtual void do_quit ();
   virtual void construct_children ();
   virtual void process (Moment);  
-  Array<Pitch> pending_pitch (Moment)const;
+  Array<Pitch> pending_pitch (Moment) const;
 private:
   SCM split_list_;
   Direction where_dir_;
index 7a5c60a3822a960b94aaa255e5a07f4b7caeeb66..de47a3b0de205e6e17c4243d4c2fef1372d46fcf 100644 (file)
@@ -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<Real> sol)
    find t such that derivative is proportional to DERIV
  */
 Array<Real>
-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;
index 1d69b6ecfb0b95139833702a141bffc050ea3d3a..312252112d3748d850ebfbd63c58ad8854cabb89 100644 (file)
@@ -50,7 +50,7 @@ Box::operator[] (Axis a)
 }
 
 Interval
-Box::operator[] (Axis a)const
+Box::operator[] (Axis a) const
 {
   return interval_a_[a];
 }
index 62459136ebfe962fb6009b00eb109ec304ba2280..a378ce45d7fbe0b5671c554b24e3e48ae9cf225c 100644 (file)
@@ -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 ());
index 35aa13328bce881eeb92d8068650efb37edbbea0..2ca648430ce3467ad428e5804046ae7fdce3429b 100644 (file)
@@ -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 (file)
index 0814b5c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  kpath-private.hh -- declare
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
-*/
-
-#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 <kpathsea/kpathsea.h>
-  #include <kpathsea/tex-file.h>
-  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 */
-
-
-
index 1fc1969d44c60cce1c679ae3163b0c9185306a78..180a655452853ac234847245747ea0396e16056c 100644 (file)
@@ -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 ());
index 00b71274b3520eafc68c907502432fa458a26bc6..9cb3f082c46796151c2be80981da3774d1ca8b73 100644 (file)
@@ -204,9 +204,6 @@ ly_init_ly_module (void *)
 #if KPATHSEA
   if (is_TeX_format_global)
     {
-      /*
-       TODO: load this dynamically
-      */
       initialize_kpathsea ();
     }
 #endif
index 15a82bbed67afb20bc14eb41ef026c743c023f37..a8271110bd8db7c3763a30370a8eb9fc9e0e7af0 100644 (file)
@@ -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