* lily/lily-guile.cc: macosx fixes.
2002-08-31 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * lily/kpath.cc:
+ * lily/lily-guile.cc: macosx fixes.
+
* lily/script-column.cc (before_line_breaking): use stable sorting
algorithm to preserve script ordering.
(grob_script_priority_less): new function
* lily/script-engraver.cc (process_music):
- * lily/text-engraver.cc (process_acknowledged_grobs):
+ * lily/text-engraver.cc (process_acknowledged_grobs):
* lily/fingering-engraver.cc (make_script): don't use direction
- for script-priority.
+ for script-priority. This fixes orderings for multiple down
+ script/fingering.
* scripts/ly2dvi.py (run_lilypond): don't exit if LilyPond fails,
but try to assemble the files anyway.
#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.h"
#define popen REALLYUGLYKLUDGE
#include "interval.hh"
#include "pitch.hh"
#include "dimensions.hh"
+
+/* macosx fix:
+
+ source-file.hh includes cmath which undefines isinf and isnan
+*/
+inline int (isinf)(Real r) { return isinf(r); }
+inline int (isnan)(Real r) { return isnan(r); }
+
#include "source-file.hh"
// #define TEST_GC
-#ifdef PARANOID
-#include <libguile/gc.h>
-#undef gh_pair_p
-bool
-ly_pair_p (SCM x)
-{
-#if 0
- assert (!SCM_CONSP (x) || (*(scm_t_bits*) SCM2PTR (SCM_CAR (x))) != scm_tc_free_cell);
- assert (!SCM_CONSP (x) || (*(scm_t_bits*) SCM2PTR (SCM_CDR (x))) != scm_tc_free_cell);
-#elif GUILE_MINOR_VERSION < 5
- assert (!SCM_CONSP (x) || !SCM_FREEP (SCM_CAR (x)));
- assert (!SCM_CONSP (x) || !SCM_FREEP (SCM_CDR (x)));
-#else
- assert (!SCM_CONSP (x) || !SCM_FREE_CELL_P (SCM_CAR (x)));
- assert (!SCM_CONSP (x) || !SCM_FREE_CELL_P (SCM_CDR (x)));
-#endif
- //return SCM_NFALSEP (scm_pair_p (x));
- return gh_pair_p (x);
-}
-#define gh_pair_p ly_pair_p
-#endif
-
SCM
ly_last (SCM list)
{
*/
+#include <iostream.h>
#include <ctype.h>
#include "translator-def.hh"