From e3de1c4686dd5cfb32d583c0ec9b080eb5e04cdd Mon Sep 17 00:00:00 2001 From: hanwen Date: Sat, 2 Oct 2004 00:12:24 +0000 Subject: [PATCH] * make/lilypond.fedora.spec.in: rename file. * lily/lily-lexer.cc (mark_smob): don't use ly_cdr() for getting to-be-marked objects. Use SCM_CELL_WORD_1 instead. * Documentation/user/changing-defaults.itely (Changing context properties on the fly): typo. * lily/slur.cc (outside_slur_callback): try three sample points for determining collisions. This fixes: slur-script.ly. --- ChangeLog | 8 ++++++++ Documentation/user/changing-defaults.itely | 2 +- VERSION | 2 +- lily/include/lily-guile.hh | 12 ++++++++++-- lily/input-smob.cc | 2 +- lily/lily-lexer.cc | 2 +- lily/lily-parser.cc | 2 +- lily/paper-system.cc | 2 +- lily/slur.cc | 8 +++++++- lily/stencil.cc | 2 +- ...lypond.redhat.spec.in => lilypond.fedora.spec.in} | 0 11 files changed, 32 insertions(+), 10 deletions(-) rename make/{lilypond.redhat.spec.in => lilypond.fedora.spec.in} (100%) diff --git a/ChangeLog b/ChangeLog index 092d579c69..1136bf0850 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2004-10-02 Han-Wen Nienhuys + * make/lilypond.fedora.spec.in: rename file. + + * lily/lily-lexer.cc (mark_smob): don't use ly_cdr() for getting + to-be-marked objects. Use SCM_CELL_WORD_1 instead. + + * Documentation/user/changing-defaults.itely (Changing context + properties on the fly): typo. + * lily/slur.cc (outside_slur_callback): try three sample points for determining collisions. This fixes: slur-script.ly. diff --git a/Documentation/user/changing-defaults.itely b/Documentation/user/changing-defaults.itely index 6e78b9baeb..04e17f7dff 100644 --- a/Documentation/user/changing-defaults.itely +++ b/Documentation/user/changing-defaults.itely @@ -330,7 +330,7 @@ specified for a bottom context, so the two statements are equivalent. -@cindex @\once +@cindex \once Settings that should only apply to a single time-step can be entered with @code{\once}, for example in diff --git a/VERSION b/VERSION index b4cd143e6a..65a21c169c 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=3 -PATCH_LEVEL=19 +PATCH_LEVEL=20 MY_PATCH_LEVEL= diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 29d57fb45e..055b81a167 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -162,8 +162,16 @@ 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 SCM ly_cdr (SCM x) { return SCM_CDR (x); } -inline SCM ly_car (SCM x) { return SCM_CAR (x); } +inline SCM ly_cdr (SCM x) { + if (SCM_NCONSP(x)) + abort(); + return SCM_CDR (x); +} +inline SCM ly_car (SCM x) { + if (SCM_NCONSP(x)) + abort(); + return SCM_CAR (x); +} inline SCM ly_caar (SCM x) { return SCM_CAAR (x); } inline SCM ly_cdar (SCM x) { return SCM_CDAR (x); } inline SCM ly_cadr (SCM x) { return SCM_CADR (x); } diff --git a/lily/input-smob.cc b/lily/input-smob.cc index f5786d5c3f..b5b5097b62 100644 --- a/lily/input-smob.cc +++ b/lily/input-smob.cc @@ -65,7 +65,7 @@ unsmob_input (SCM s) if (SCM_IMP (s)) return 0; if (SCM_CAR (s) == (SCM)input_tag) // ugh. - return (Input*) ly_cdr (s); + return (Input*) SCM_CDR (s); else return 0; } diff --git a/lily/lily-lexer.cc b/lily/lily-lexer.cc index 790ef1bbbd..919c5d89de 100644 --- a/lily/lily-lexer.cc +++ b/lily/lily-lexer.cc @@ -295,7 +295,7 @@ IMPLEMENT_DEFAULT_EQUAL_P (Lily_lexer); SCM Lily_lexer::mark_smob (SCM s) { - Lily_lexer *lexer = (Lily_lexer*) ly_cdr (s); + Lily_lexer *lexer = (Lily_lexer*) SCM_CELL_WORD_1 (s); scm_gc_mark (lexer->chordmodifier_tab_); scm_gc_mark (lexer->pitchname_tab_stack_); diff --git a/lily/lily-parser.cc b/lily/lily-parser.cc index 6f3c510906..157a765165 100644 --- a/lily/lily-parser.cc +++ b/lily/lily-parser.cc @@ -66,7 +66,7 @@ IMPLEMENT_DEFAULT_EQUAL_P (Lily_parser); SCM Lily_parser::mark_smob (SCM s) { - Lily_parser *parser = (Lily_parser*) ly_cdr (s); + Lily_parser *parser = (Lily_parser*) SCM_CELL_WORD_1 (s); return (parser->lexer_) ? parser->lexer_->self_scm () : SCM_EOL; } diff --git a/lily/paper-system.cc b/lily/paper-system.cc index 885296a3ec..455bb9a667 100644 --- a/lily/paper-system.cc +++ b/lily/paper-system.cc @@ -36,7 +36,7 @@ Paper_system::~Paper_system () SCM Paper_system::mark_smob (SCM smob) { - Paper_system *system = (Paper_system*) ly_cdr (smob); + Paper_system *system = (Paper_system*) SCM_CELL_WORD_1 (smob); return system-> stencil_.expr (); } diff --git a/lily/slur.cc b/lily/slur.cc index a115f5303c..807a8c7c89 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -154,6 +154,7 @@ Slur::outside_slur_callback (SCM grob, SCM axis) Real slur_padding = robust_scm2double (script->get_property ("slur-padding"), 0.0); // todo: slur property, script property? yext.widen (slur_padding); + Real EPS = 1e-3; Interval bezext (curve.control_[0][X_AXIS], curve.control_[3][X_AXIS]); @@ -170,7 +171,12 @@ Slur::outside_slur_callback (SCM grob, SCM axis) if (consider[k]) { - ys[k] = curve.get_other_coordinate (X_AXIS, x); + ys[k] = + (fabs(bezext[LEFT] - x) < EPS) + ? curve.control_[0][Y_AXIS] + : ((fabs(bezext[RIGHT] - x) < EPS) + ? curve.control_[3][Y_AXIS] + : curve.get_other_coordinate (X_AXIS, x)); consider[k] = true; if (yext.contains (ys[k])) diff --git a/lily/stencil.cc b/lily/stencil.cc index 4bae8827b5..d1ff20d0e1 100644 --- a/lily/stencil.cc +++ b/lily/stencil.cc @@ -42,7 +42,7 @@ Stencil::print_smob (SCM, SCM port, scm_print_state *) SCM Stencil::mark_smob (SCM smob) { - Stencil *s = (Stencil*) ly_cdr (smob); + Stencil *s = (Stencil*) SCM_CELL_WORD_1 (smob); return s->expr_; } diff --git a/make/lilypond.redhat.spec.in b/make/lilypond.fedora.spec.in similarity index 100% rename from make/lilypond.redhat.spec.in rename to make/lilypond.fedora.spec.in -- 2.39.5