From 754d360118e26e2e48ec080849d9c0f94d1c7416 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 9 Oct 2004 13:27:58 +0000 Subject: [PATCH] * lily/moment.cc (robust_scm2moment): new function. * scm/titling.scm (default-score-title): remove caps for piece. * lily/slur-scoring.cc (Slur_score_state): change static functions to methods of Slur_score_state. --- ChangeLog | 4 ++++ lily/auto-beam-engraver.cc | 5 +++-- lily/include/moment.hh | 1 + lily/moment.cc | 10 ++++++++++ lily/slur-scoring.cc | 1 + po/lilypond.pot | 27 ++++++++++++++++++++++++++- scm/titling.scm | 2 +- 7 files changed, 46 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 50dfcfe2ef..c68ee31d0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-10-09 Han-Wen Nienhuys + * lily/moment.cc (robust_scm2moment): new function. + + * scm/titling.scm (default-score-title): remove caps for piece. + * lily/include/slur-scoring.hh (struct Slur_score_state): new file * lily/include/slur-configuration.hh (class Slur_configuration): diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index d09e7519e8..2f9fa0d693 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -320,9 +320,10 @@ Auto_beam_engraver::begin_beam () beam_settings_ = updated_grob_properties (context (), ly_symbol2scm ("Beam")); beam_start_moment_ = now_mom (); - beam_start_location_ = *unsmob_moment (get_property ("measurePosition")); + beam_start_location_ = + robust_scm2moment (unsmob_moment (get_property ("measurePosition"), Moment(0)); subdivide_beams_ = ly_scm2bool (get_property ("subdivideBeams")); - beat_length_ = *unsmob_moment (get_property ("beatLength")); + beat_length_ = robust_scm2moment (get_property ("beatLength"), Moment(1,4)); } void diff --git a/lily/include/moment.hh b/lily/include/moment.hh index b735ce4c4d..894c9d7017 100644 --- a/lily/include/moment.hh +++ b/lily/include/moment.hh @@ -60,6 +60,7 @@ DECLARE_UNSMOB(Moment,moment); int compare (Moment const&,Moment const&); INSTANTIATE_COMPARE (Moment const&, Moment::compare); +Moment robust_scm2moment (SCM, Moment); #ifdef STREAM_SUPPORT std::ostream & operator << (std::ostream &, Moment const &); diff --git a/lily/moment.cc b/lily/moment.cc index 72e138b4a9..f30f361367 100644 --- a/lily/moment.cc +++ b/lily/moment.cc @@ -247,3 +247,13 @@ operator << (std::ostream &os, Moment const &m) return os; } #endif + +Moment +robust_scm2moment (SCM m, Moment d) +{ + Moment * p = unsmob_moment (m); + if (!p) + return d; + else + return *p; +} diff --git a/lily/slur-scoring.cc b/lily/slur-scoring.cc index d7e0129aa3..4cc4490aaf 100644 --- a/lily/slur-scoring.cc +++ b/lily/slur-scoring.cc @@ -124,6 +124,7 @@ Slur_score_parameters::fill (Grob *me) edge_slope_exponent_ = get_detail (details, ly_symbol2scm ("edge-slope-exponent")); } + Real broken_trend_y (Slur_score_state const &state, Direction hdir) { diff --git a/po/lilypond.pot b/po/lilypond.pot index 991b13ea0f..3832072577 100644 --- a/po/lilypond.pot +++ b/po/lilypond.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2004-10-09 03:01+0200\n" +"POT-Creation-Date: 2004-10-09 12:49+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -142,6 +142,8 @@ msgstr "" #. for --output-format. #. Bug in option parser: --output=foe is taken as an abbreviation #. for --output-format. +#. Bug in option parser: --output=foe is taken as an abbreviation +#. for --output-format. #: lilypond-book.py:89 main.cc:130 lily/main.cc:130 msgid "EXT" msgstr "" @@ -643,6 +645,7 @@ msgstr "" #. FIXME: broken sentence #. FIXME: broken sentence #. FIXME: broken sentence +#. FIXME: broken sentence #: all-font-metrics.cc:95 lily/all-font-metrics.cc:95 #, c-format msgid "checksum mismatch for font file: `%s'" @@ -803,6 +806,12 @@ msgstr "" #. #. last->translator_id_string () = get_change ()->change_to_id_string (); #. +#. +#. We could change the current translator's id, but that would make +#. errors hard to catch +#. +#. last->translator_id_string () = get_change ()->change_to_id_string (); +#. #: change-iterator.cc:93 lily/change-iterator.cc:93 msgid "I'm one myself" msgstr "" @@ -1195,6 +1204,7 @@ msgstr "" #. No version number or newline here. It confuses help2man. #. No version number or newline here. It confuses help2man. #. No version number or newline here. It confuses help2man. +#. No version number or newline here. It confuses help2man. #: main.cc:192 lily/main.cc:192 #, c-format msgid "Usage: %s [OPTIONS]... FILE..." @@ -1298,6 +1308,9 @@ msgstr "" #. #. music for the softenon children? #. +#. +#. music for the softenon children? +#. #: new-fingering-engraver.cc:155 lily/new-fingering-engraver.cc:155 msgid "music for the martians." msgstr "" @@ -1504,6 +1517,7 @@ msgstr "" #. FIXME: #. FIXME: #. FIXME: +#. FIXME: #: script-engraver.cc:102 lily/script-engraver.cc:102 msgid "Do not know how to interpret articulation: " msgstr "" @@ -1520,6 +1534,7 @@ msgstr "" #. this shouldn't happen, but let's continue anyway. #. this shouldn't happen, but let's continue anyway. #. this shouldn't happen, but let's continue anyway. +#. this shouldn't happen, but let's continue anyway. #: separation-item.cc:53 separation-item.cc:97 lily/separation-item.cc:53 #: lily/separation-item.cc:97 msgid "Separation_item: I've been drinking too much" @@ -1561,6 +1576,7 @@ msgstr "" #. FIXME: #. FIXME: #. FIXME: +#. FIXME: #: stem-engraver.cc:125 lily/stem-engraver.cc:125 #, c-format msgid "Adding note head to incompatible stem (type = %d)" @@ -1626,6 +1642,8 @@ msgstr "" #. more of a programming error. #. Not using ngettext's plural feature here, as this message is #. more of a programming error. +#. Not using ngettext's plural feature here, as this message is +#. more of a programming error. #: tfm-reader.cc:108 lily/tfm-reader.cc:108 #, c-format msgid "TFM header of `%s' has only %u word (s)" @@ -1689,6 +1707,11 @@ msgstr "" #. #. OTOH, Tristan Keuris writes 8/20 in his Intermezzi. #. +#. +#. Todo: should make typecheck? +#. +#. OTOH, Tristan Keuris writes 8/20 in his Intermezzi. +#. #: time-signature-engraver.cc:57 lily/time-signature-engraver.cc:57 #, c-format msgid "Found strange time signature %d/%d." @@ -1710,6 +1733,8 @@ msgstr "" #. (Here really with a warning!) #. If there is no such symbol, we default to the numbered style. #. (Here really with a warning!) +#. If there is no such symbol, we default to the numbered style. +#. (Here really with a warning!) #: time-signature.cc:91 lily/time-signature.cc:91 #, c-format msgid "time signature symbol `%s' not found; reverting to numbered style" diff --git a/scm/titling.scm b/scm/titling.scm index b1cb6aa2ea..4a0eb67834 100644 --- a/scm/titling.scm +++ b/scm/titling.scm @@ -126,7 +126,7 @@ '()) (if (has 'piece) (list - (markup #:fill-line (#:large #:bigger #:caps (get 'piece) ""))) + (markup #:fill-line (#:large #:bigger (get 'piece) ""))) '()))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- 2.39.5