CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch: lilypond_2_4
Changes by: Jan Nieuwenhuizen <[EMAIL PROTECTED]> 05/04/27 22:08:11
Modified files:
lily/include : lily-guile.hh dimensions.hh
lily : parser.yy lily-guile.cc kpath.cc
. : ChangeLog
Added files:
lily/include : mingw-compatibility.hh
Log message:
New file.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/include/mingw-compatibility.hh?only_with_tag=lilypond_2_4&rev=1.1.2.1
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/include/lily-guile.hh.diff?only_with_tag=lilypond_2_4&tr1=1.145&tr2=1.145.2.1&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/include/dimensions.hh.diff?only_with_tag=lilypond_2_4&tr1=1.8&tr2=1.8.6.1&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/parser.yy.diff?only_with_tag=lilypond_2_4&tr1=1.435.2.1&tr2=1.435.2.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/lily-guile.cc.diff?only_with_tag=lilypond_2_4&tr1=1.180.2.2&tr2=1.180.2.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/kpath.cc.diff?only_with_tag=lilypond_2_4&tr1=1.34&tr2=1.34.2.1&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?only_with_tag=lilypond_2_4&tr1=1.2780.2.46&tr2=1.2780.2.47&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.2780.2.46 lilypond/ChangeLog:1.2780.2.47
--- lilypond/ChangeLog:1.2780.2.46 Wed Apr 27 14:48:24 2005
+++ lilypond/ChangeLog Wed Apr 27 22:08:11 2005
@@ -1,3 +1,13 @@
+2005-04-28 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
+
+ * lily/include/mingw-compatibility.hh: New file.
+
+2005-04-27 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
+
+ * lily/lily-guile.cc: Bugfix: do not include libintl.h.
+
+ * lily/kpath.cc (LY_DEFINE)[!KPATHSEA]: Compile fixes.
+
2005-04-27 Mats Bengtsson <[EMAIL PROTECTED]>
* scm/lily.scm (postscript->png): Add space between arguments to
Index: lilypond/lily/include/dimensions.hh
diff -u /dev/null lilypond/lily/include/dimensions.hh:1.8.6.1
--- /dev/null Wed Apr 27 22:08:11 2005
+++ lilypond/lily/include/dimensions.hh Wed Apr 27 22:08:11 2005
@@ -0,0 +1,46 @@
+#ifndef DIMENSIONS_HH
+#define DIMENSIONS_HH
+
+#include "real.hh"
+
+class String;
+
+
+const Real INCH_TO_PT=72.270;
+const Real CM_TO_PT=(INCH_TO_PT/2.54);
+const Real MM_TO_PT=(CM_TO_PT/10);
+const Real PT_TO_PT =1.0;
+const Real INCH_TO_BP = 72;
+const Real BIGPOINT_TO_POINT = (INCH_TO_PT/ INCH_TO_BP);
+const Real CHAR_TO_PT =1.0;
+const Real PT_TO_MM = (1.0/MM_TO_PT);
+
+#ifdef POINTS
+
+#define PT *PT_TO_PT
+#define MM *MM_TO_PT
+#define CM *CM_TO_PT
+#define INCH *INCH_TO_PT
+#define BIGPOINT *BIGPOINT_TO_POINT
+#define CHAR *CHAR_TO_PT
+
+
+#define INTERNAL_UNIT "pt"
+
+#else // mm
+
+#define PT *PT_TO_PT *PT_TO_MM
+#define MM *MM_TO_PT *PT_TO_MM
+#define CM *CM_TO_PT *PT_TO_MM
+#define INCH *INCH_TO_PT *PT_TO_MM
+#define BIGPOINT *BIGPOINT_TO_POINT *PT_TO_MM
+#define CHAR *CHAR_TO_PT *PT_TO_MM
+#define INTERNAL_UNIT "mm"
+
+
+#endif
+
+String print_dimen (Real);
+
+#endif // DIMENSIONS_HH
+
Index: lilypond/lily/include/lily-guile.hh
diff -u /dev/null lilypond/lily/include/lily-guile.hh:1.145.2.1
--- /dev/null Wed Apr 27 22:08:11 2005
+++ lilypond/lily/include/lily-guile.hh Wed Apr 27 22:08:11 2005
@@ -0,0 +1,291 @@
+/*
+ lily-guile.hh encapsulate guile
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1998--2004 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
+*/
+
+#ifndef LILY_GUILE_HH
+#define LILY_GUILE_HH
+
+#if __MINGW32__
+#include "mingw-compatibility.hh"
+#endif
+
+#include <libguile.h>
+
+#include "flower-proto.hh"
+
+#include "drul-array.hh"
+#include "direction.hh"
+#include "guile-compatibility.hh"
+
+#ifndef SMOB_FREE_RETURN_VAL
+#define SMOB_FREE_RETURN_VAL(CL) 0
+#endif
+
+#ifndef SCM_PACK
+#define SCM_PACK(x) ((SCM) x)
+#endif
+
+#ifndef SCM_UNPACK
+#define SCM_UNPACK(x) (x)
+#endif
+
+/** Conversion functions follow the GUILE naming convention, i.e.
+ A ly_B2A (B b); */
+
+SCM ly_last (SCM list);
+SCM ly_write2scm (SCM s);
+SCM ly_deep_copy (SCM);
+SCM ly_truncate_list (int k, SCM lst);
+
+#if (__GNUC__ > 2)
+/* Unreliable with gcc-2.x
+ FIXME: should add check for x86 as well? */
+#define CACHE_SYMBOLS
+#endif
+
+#ifdef CACHE_SYMBOLS
+
+/* Using this trick we cache the value of scm_str2symbol ("fooo") where
+ "fooo" is a constant string. This is done at the cost of one static
+ variable per ly_symbol2scm() use, and one boolean evaluation for
+ every call.
+
+ The overall speedup of lily is about 5% on a run of wtk1-fugue2. */
+#define ly_symbol2scm(x) \
+({ \
+ static SCM cached; \
+ /* We store this one locally, since G++ -O2 fucks up else */ \
+ SCM value = cached; \
+ if ( __builtin_constant_p ((x))) \
+ { \
+ if (!cached) \
+ value = cached = scm_gc_protect_object (scm_str2symbol ((x))); \
+ } \
+ else \
+ value = scm_str2symbol ((char*) (x)); \
+ value; \
+})
+#else
+inline SCM ly_symbol2scm(char const* x) { return scm_str2symbol ((x)); }
+#endif
+
+extern SCM global_lily_module;
+
+/*
+ TODO: rename me to ly_c_lily_module_eval
+ */
+#define ly_scheme_function(x) \
+({ \
+ static SCM cached; \
+ /* We store this one locally, since G++ -O2 fucks up else */ \
+ SCM value = cached; \
+ if ( __builtin_constant_p ((x))) \
+ { \
+ if (!cached) \
+ value = cached = scm_gc_protect_object (scm_eval (scm_str2symbol (x), \
+ global_lily_module)); \
+ } \
+ else \
+ value = scm_eval (scm_str2symbol (x), global_lily_module); \
+ value; \
+})
+
+
+String ly_scm2string (SCM s);
+String ly_symbol2string (SCM);
+SCM ly_offset2scm (Offset);
+Offset ly_scm2offset (SCM);
+SCM ly_assoc_chain (SCM key, SCM achain);
+SCM ly_assoc_cdr (SCM key, SCM alist);
+SCM ly_assoc_get (SCM key, SCM alist, SCM def);
+Interval ly_scm2interval (SCM);
+Drul_array<Real> ly_scm2realdrul (SCM);
+Slice int_list_to_slice (SCM l);
+SCM ly_interval2scm (Drul_array<Real>);
+char *ly_scm2newstr (SCM str, size_t *lenp);
+
+Real robust_scm2double (SCM, double);
+int robust_scm2int (SCM, int);
+Drul_array<Real> robust_scm2drul (SCM, Drul_array<Real>);
+Interval robust_scm2interval (SCM, Drul_array<Real>);
+Offset robust_scm2offset (SCM, Offset);
+
+SCM ly_quote_scm (SCM s);
+bool type_check_assignment (SCM val, SCM sym, SCM type_symbol) ;
+String print_scm_val (SCM val);
+SCM ly_number2string (SCM s);
+
+SCM parse_symbol_list (char const *);
+SCM robust_list_ref(int i, SCM l);
+SCM alist_to_hashq (SCM);
+
+
+/* inserts at front, removing dublicates */
+inline SCM ly_assoc_front_x(SCM alist, SCM key, SCM val)
+{
+ return scm_acons(key, val, scm_assoc_remove_x (alist, key));
+}
+inline bool ly_c_char_p (SCM x) { return SCM_CHARP (x); }
+inline bool ly_c_vector_p (SCM x) { return SCM_VECTORP (x); }
+inline bool ly_c_list_p (SCM x) { return SCM_NFALSEP (scm_list_p (x)); }
+inline bool ly_c_procedure_p (SCM x) { return SCM_NFALSEP (scm_procedure_p
(x)); }
+inline bool ly_c_equal_p (SCM x, SCM y) {
+ return SCM_NFALSEP (scm_equal_p (x, y));
+}
+
+
+inline bool ly_scm2bool (SCM x) { return SCM_NFALSEP (x); }
+inline char ly_scm2char (SCM x) { return SCM_CHAR(x); }
+inline unsigned long ly_length (SCM x) {
+ return scm_num2ulong (scm_length (x), 0, "ly_length");
+}
+inline unsigned long ly_vector_length (SCM x) { return SCM_VECTOR_LENGTH (x); }
+
+inline SCM ly_bool2scm (bool x) { return SCM_BOOL (x); }
+
+inline SCM ly_append2 (SCM x1, SCM x2) {
+ return scm_append (scm_listify (x1, x2, SCM_UNDEFINED));
+}
+inline SCM ly_append3 (SCM x1, SCM x2, SCM x3) {
+ return scm_append (scm_listify (x1, x2, x3, SCM_UNDEFINED));
+}
+inline SCM ly_append4 (SCM x1, SCM x2, SCM x3, SCM x4) {
+ return scm_append (scm_listify (x1, x2, x3, x4, SCM_UNDEFINED));
+}
+
+/*
+ display and print newline.
+ */
+extern "C" {
+void ly_display_scm (SCM s);
+}
+
+void read_lily_scm_file (String);
+void ly_c_init_guile ();
+
+bool is_direction (SCM s);
+bool is_number_pair (SCM);
+bool is_axis (SCM);
+
+/*
+ these conversion functions also do a typecheck on the argument, and
+ return a default value if S has the wrong type.
+*/
+
+Direction to_dir (SCM s);
+bool to_boolean (SCM s);
+
+void init_ly_protection ();
+unsigned int ly_scm_hash (SCM s);
+
+SCM index_get_cell (SCM cell, Direction d);
+SCM index_set_cell (SCM cell, Direction d, SCM val);
+
+SCM ly_snoc (SCM s, SCM list);
+SCM ly_split_list (SCM s, SCM lst);
+SCM ly_unique (SCM lst);
+SCM ly_list_qsort_uniq_x (SCM lst);
+
+SCM ly_output_formats();
+SCM ly_kpathsea_expand_path (SCM);
+
+/*
+ snarfing.
+ */
+void add_scm_init_func (void (*) ());
+
+extern "C" {
+typedef SCM (*Scheme_function_unknown) ();
+}
+
+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 96
+typedef SCM (*Scheme_function_0) ();
+typedef SCM (*Scheme_function_1) (SCM);
+typedef SCM (*Scheme_function_2) (SCM,SCM);
+typedef SCM (*Scheme_function_3) (SCM,SCM, SCM);
+#else
+typedef SCM (*Scheme_function_0) (...);
+typedef SCM (*Scheme_function_1) (...);
+typedef SCM (*Scheme_function_2) (...);
+typedef SCM (*Scheme_function_3) (...);
+#endif
+
+
+/*
+ Adds the NAME as a Scheme function, and a variable to store the SCM
+ version of the function in the static variable NAME_proc
+ */
+#define DECLARE_SCHEME_CALLBACK(NAME, ARGS) \
+ static SCM NAME ARGS; \
+ static SCM NAME ## _proc
+
+/*
+ Make TYPE::FUNC available as a Scheme function.
+ */
+#define MAKE_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT) \
+SCM TYPE :: FUNC ## _proc; \
+void \
+TYPE ## _ ## FUNC ## _init_functions () \
+{ \
+ TYPE :: FUNC ## _proc = scm_c_define_gsubr (#TYPE "::" #FUNC, \
+ (ARGCOUNT), 0, 0, \
+ (Scheme_function_unknown)TYPE :: FUNC); \
+ scm_c_export (#TYPE "::" #FUNC, NULL); \
+} \
+ \
+ADD_SCM_INIT_FUNC (TYPE ## _ ## FUNC ## _callback, \
+ TYPE ## _ ## FUNC ## _init_functions);
+
+
+void
+ly_add_function_documentation (SCM proc, char const *fname,
+ char const *varlist,
+ char const *doc);
+
+#define ADD_SCM_INIT_FUNC(name, func) \
+class name ## _scm_initter \
+{ \
+public: \
+ name ## _scm_initter () \
+ { \
+ add_scm_init_func (func); \
+ } \
+} _ ## name ## _scm_initter; \
+/* end define */
+
+#define LY_DEFINE_WITHOUT_DECL(INITPREFIX, FNAME, PRIMNAME, REQ, OPT, VAR, \
+ ARGLIST, DOCSTRING) \
+SCM FNAME ## _proc; \
+void \
+INITPREFIX ## init () \
+{ \
+ FNAME ## _proc = scm_c_define_gsubr (PRIMNAME,REQ, OPT, VAR, \
+ (Scheme_function_unknown) FNAME); \
+ ly_add_function_documentation (FNAME ## _proc, PRIMNAME, #ARGLIST, \
+ DOCSTRING); \
+ scm_c_export (PRIMNAME, NULL); \
+} \
+ADD_SCM_INIT_FUNC (INITPREFIX ## init_unique_prefix, INITPREFIX ## init); \
+SCM \
+FNAME ARGLIST
+
+
+#define LY_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \
+SCM FNAME ARGLIST; \
+LY_DEFINE_WITHOUT_DECL (FNAME, FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, \
+ DOCSTRING)
+
+#define LY_DEFINE_MEMBER_FUNCTION(CLASS, FNAME, PRIMNAME, REQ, OPT, VAR, \
+ ARGLIST, DOCSTRING) \
+SCM FNAME ARGLIST; \
+LY_DEFINE_WITHOUT_DECL (CLASS ## FNAME, CLASS::FNAME, PRIMNAME, REQ, OPT, \
+ VAR, ARGLIST, DOCSTRING)
+
+#define get_property(x) internal_get_property (ly_symbol2scm (x))
+#define set_property(x,y) internal_set_property (ly_symbol2scm (x), y)
+
+#endif /* LILY_GUILE_HH */
Index: lilypond/lily/include/mingw-compatibility.hh
diff -u /dev/null lilypond/lily/include/mingw-compatibility.hh:1.1.2.1
--- /dev/null Wed Apr 27 22:08:11 2005
+++ lilypond/lily/include/mingw-compatibility.hh Wed Apr 27 22:08:11 2005
@@ -0,0 +1,74 @@
+/*
+ mingw-compatibility.hh -- MINGW workarounds
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2005 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
+*/
+
+#ifndef MINGW_COMPATIBILITY_HH
+#define MINGW_COMPATIBILITY_HH
+
+#if __MINGW32__
+
+/* Mingw uses invalid names for typedefs and defines. Not yet
+ investigated whether this is a mingw bug or a windows bug (ie,
+ mingw compatibility feature), also not reported yet. */
+
+# ifdef CHAR
+# define LILY_CHAR CHAR
+# undef CHAR
+# endif
+# define CHAR MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_CHAR
+
+# ifdef CONTEXT
+# define LILY_CONTEXT CONTEXT
+# undef CONTEXT
+# endif
+# define CONTEXT MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_CONTEXT
+
+# ifdef RELATIVE
+# define LILY_RELATIVE RELATIVE
+# undef RELATIVE
+# endif
+# define RELATIVE MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_RELATIVE
+
+# ifdef THIS
+# define LILY_THIS THIS
+# undef THIS
+# endif
+# define THIS MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_THIS
+
+//# include <winsock2.h>
+
+#if defined (__MINGW32__) && !defined (STATIC)
+# define SCM_IMPORT 1
+#endif
+
+# include <libguile.h>
+
+# undef CHAR
+# ifdef LILY_CHAR
+# define CHAR LILY_CHAR
+# endif
+
+# undef CONTEXT
+# ifdef LILY_CONTEXT
+# define CONTEXT LILY_CONTEXT
+# endif
+# undef CONTEXT
+
+# undef RELATIVE
+# ifdef LILY_RELATIVE
+# define RELATIVE LILY_RELATIVE
+# endif
+
+# undef THIS
+# ifdef LILY_THIS
+# define THIS LILY_THIS
+# endif
+
+
+#endif /* __MINGW__ */
+
+#endif /* MINGW_COMPATIBILITY_HH */
Index: lilypond/lily/kpath.cc
diff -u /dev/null lilypond/lily/kpath.cc:1.34.2.1
--- /dev/null Wed Apr 27 22:08:11 2005
+++ lilypond/lily/kpath.cc Wed Apr 27 22:08:11 2005
@@ -0,0 +1,206 @@
+/*
+ kpath.cc -- glue kpathsea to lily. Need some ugly kludges for gcc 2.96
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000--2004 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+*/
+
+#include <stdio.h>
+#include <string.h>
+
+/*
+
+The problem, as far as I can tell, is that MacOS X has its getopt
+prototype in <unistd.h>, while I think other operating systems have it
+in other places. <unistd.h> is included by kpathsea.h, so you end up
+renaming both conflicting prototypes to YAKLUDGE.
+
+I found a somewhat more elegant patch for this: Just #include
+<unistd.h> before defining YAKLUDGE.
+
+*/
+#include <unistd.h>
+#include "config.hh"
+
+#define popen REALLYUGLYKLUDGE
+#define pclose ANOTHERREALLYUGLYKLUDGE
+#define getopt YAKLUDGE
+
+#if HAVE_KPATHSEA_KPATHSEA_H
+extern "C" {
+#include <kpathsea/kpathsea.h>
+#include <kpathsea/tex-file.h>
+}
+#endif
+
+#include "file-path.hh"
+#include "string.hh"
+#include "main.hh"
+#include "kpath.hh"
+#include "source-file.hh"
+#include "warn.hh"
+
+String
+kpathsea_find_afm (char const * name)
+{
+#if (KPATHSEA && HAVE_KPSE_FIND_FILE)
+ char * name_ptr = kpse_find_file (name, kpse_afm_format, false);
+
+ if (!name_ptr)
+ {
+ /*
+ don't mutter about afms, since we try to find them first, and lots of
+ TFMs don't have AFMs.
+ */
+ // warning (_f ("kpathsea couldn't find AFM file `%s'", name));
+ }
+ else
+ return name_ptr;
+
+#endif
+ return "";
+}
+
+String
+kpathsea_find_tfm (char const *name)
+{
+ String filename = global_path.find (String (name) + ".tfm");
+#if (KPATHSEA && HAVE_KPSE_FIND_FILE)
+ if (filename.is_empty ())
+ {
+ /* If invoked for a TeX font, we could do TRUE (must exist).
+ We could also do:
+ p = kpse_find_file (name, kpse_mf_format, false);
+ if (p)
+ p = kpse_find_file (name, kpse_mf_format, true);
+
+ but we assume that if there is a .PFA, there is also a .TFM,
+ and it's no use generating TFMs on the fly, because PFAs cannot
+ be generated on the fly. */
+ char *p = kpse_find_file (name, kpse_tfm_format, false);
+ if (!p)
+ warning (_f ("kpathsea can not find TFM file: `%s'", name));
+ else
+ filename = p;
+ }
+#endif
+ return filename;
+}
+
+#if KPATHSEA
+/* FIXME: this should be part of kpathsea */
+
+static kpse_file_format_type
+kpathsea_find_format (String name)
+{
+ for (int i = 0; i < kpse_last_format; i++)
+ {
+ if (!kpse_format_info[i].type)
+ kpse_init_format ((kpse_file_format_type) i);
+
+ char const **suffixes[] = { kpse_format_info[i].suffix,
+ kpse_format_info[i].alt_suffix };
+ for (int j = 0; j < 2; j++)
+ for (char const **p = suffixes[j]; p && *p; p++)
+ {
+ String suffix = *p;
+ if (name.right_string (suffix.length ()) == suffix)
+ return (kpse_file_format_type) i;
+ }
+ }
+ return kpse_last_format;
+}
+#endif
+
+String
+kpathsea_gulp_file_to_string (String name)
+{
+ String filename = global_path.find (name);
+
+#if (KPATHSEA && HAVE_KPSE_FIND_FILE)
+ if (filename.is_empty ())
+ {
+ char *p = kpse_find_file (name.to_str0 (), kpathsea_find_format (name),
+ true);
+ if (p)
+ filename = p;
+ else
+ warning (_f ("kpathsea can not find file: `%s'", name));
+ }
+#endif
+
+ if (filename.is_empty ())
+ error (_f ("can't find file: `%s'", name));
+
+ if (verbose_global_b)
+ progress_indication ("[" + filename);
+
+ int filesize;
+ char *str = gulp_file (filename, &filesize);
+ String string (str);
+ delete[] str;
+
+ if (verbose_global_b)
+ progress_indication ("]");
+
+ return string;
+}
+
+
+
+LY_DEFINE (ly_kpathsea_expand_path, "ly:kpathsea-expand-path",
+ 1, 0, 0, (SCM name),
+ "Return the expanded path of @var{name}, or"
+ "@code{#f} if not found.")
+{
+ SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__,
"string");
+
+ String nm = ly_scm2string (name);
+ String filename = global_path.find (nm);
+#if KPATHSEA
+ if (filename.is_empty ())
+ {
+ char *p = kpse_find_file (nm.to_str0 (), kpathsea_find_format (nm),
+ true);
+ if (p)
+ return scm_makfrom0str (p);
+ else
+ return SCM_BOOL_F;
+ }
+#endif /* KPATHSEA */
+ return scm_makfrom0str (filename.to_str0 ());
+}
+
+
+LY_DEFINE (ly_kpathsea_expand_variable, "ly:kpathsea-expand-variable",
+ 1, 0, 0, (SCM var),
+ "Return the expanded version @var{var}.")
+{
+ SCM_ASSERT_TYPE (scm_is_string (var), var, SCM_ARG1, __FUNCTION__, "string");
+#if KPATHSEA
+
+ String nm = ly_scm2string (var);
+ char *result = kpse_var_expand (nm.to_str0 ());
+ SCM ret = scm_makfrom0str (result);
+ delete[] result;
+
+ return ret;
+#else
+ return scm_makfrom0str ("");
+#endif
+}
+
+
+void
+initialize_kpathsea (char *av0)
+{
+#if KPATHSEA && HAVE_KPATHSEA_KPATHSEA_H
+
+ /*
+ initialize kpathsea
+ */
+ kpse_set_program_name (av0, NULL);
+ kpse_maketex_option ("tfm", TRUE);
+#endif
+}
Index: lilypond/lily/lily-guile.cc
diff -u lilypond/lily/lily-guile.cc:1.180.2.2
lilypond/lily/lily-guile.cc:1.180.2.3
--- lilypond/lily/lily-guile.cc:1.180.2.2 Mon Feb 28 11:24:04 2005
+++ lilypond/lily/lily-guile.cc Wed Apr 27 22:08:11 2005
@@ -7,37 +7,47 @@
Han-Wen Nienhuys <[EMAIL PROTECTED]>
*/
+#include "lily-guile.hh"
#include <stdio.h>
#include <stdlib.h>
-#include <libintl.h> // gettext on macos x
#include <math.h> /* isinf */
#include <string.h> /* strdup, strchr */
#include <ctype.h>
-#include "lily-proto.hh"
-#include "version.hh"
+/* source-file.hh includes cmath
-/* MacOS S fix:
- source-file.hh includes cmath which undefines isinf and isnan
+ 1. No it doesn't
+ 2. If it did, move this to sources.hh
+ 3. Do not change the code when ! __APPLE__
+
+ which undefines isinf and isnan
- FIXME: #ifdef MACOS_X?
-*/
+#ifdef __APPLE__
inline int my_isinf (Real r) { return isinf (r); }
inline int my_isnan (Real r) { return isnan (r); }
+#define isinf my_isinf
+#define isnan my_isnan
+#endif
+*/
+
+#include "config.hh"
+#include "lily-proto.hh"
+
+#include "dimensions.hh"
+#include "direction.hh"
+#include "file-path.hh"
+#include "international.hh"
+#include "interval.hh"
#include "libc-extension.hh"
-#include "lily-guile.hh"
#include "main.hh"
-#include "file-path.hh"
-#include "warn.hh"
-#include "direction.hh"
#include "offset.hh"
-#include "interval.hh"
#include "pitch.hh"
-#include "dimensions.hh"
#include "source-file.hh"
+#include "version.hh"
+#include "warn.hh"
// #define TEST_GC
@@ -368,7 +378,7 @@
{
Real r (scm_to_double (s));
- if (my_isinf (r) || my_isnan (r))
+ if (isinf (r) || isnan (r))
{
programming_error ("Infinity or NaN encountered while converting Real
number; setting to zero.");
r = 0.0;
Index: lilypond/lily/parser.yy
diff -u lilypond/lily/parser.yy:1.435.2.1 lilypond/lily/parser.yy:1.435.2.2
--- lilypond/lily/parser.yy:1.435.2.1 Fri Nov 19 23:52:13 2004
+++ lilypond/lily/parser.yy Wed Apr 27 22:08:11 2005
@@ -24,9 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
-
#include "book.hh"
-
#include "context-def.hh"
#include "dimensions.hh"
#include "event.hh"
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs