From 6e200203e9d8067e9211dd93b7e4a47099aae949 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 2 Mar 2006 00:39:54 +0000 Subject: [PATCH] * stepmake/aclocal.m4 (depth): fix bashism. * lily/lyric-combine-music-iterator.cc: move from new-lyric-combine-iterator.cc (process): add pending_grace_lyric_ member to delay lyrics on grace notes. --- ChangeLog | 7 +++++++ THANKS | 1 + ...ator.cc => lyric-combine-music-iterator.cc} | 18 +++++++++++++++--- stepmake/aclocal.m4 | 8 ++++---- 4 files changed, 27 insertions(+), 7 deletions(-) rename lily/{new-lyric-combine-music-iterator.cc => lyric-combine-music-iterator.cc} (92%) diff --git a/ChangeLog b/ChangeLog index cf93e670e6..2219c732ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2006-03-02 Han-Wen Nienhuys + * stepmake/aclocal.m4 (depth): fix bashism. + + * lily/lyric-combine-music-iterator.cc: move from + new-lyric-combine-iterator.cc + (process): add pending_grace_lyric_ member to delay lyrics on + grace notes. + * lily/system-start-text.cc (print): suicide if we don't have any elements. Fixes hara kiri'd instrument names. diff --git a/THANKS b/THANKS index a9cf2ca49d..21078903a6 100644 --- a/THANKS +++ b/THANKS @@ -88,6 +88,7 @@ Paul Scott Ralph Little Richard Schoeller Robert Vlatasy +Roman Kurakin Scott Russell Sean Reed Seng Liang diff --git a/lily/new-lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc similarity index 92% rename from lily/new-lyric-combine-music-iterator.cc rename to lily/lyric-combine-music-iterator.cc index 6e75f43d51..f812d1c952 100644 --- a/lily/new-lyric-combine-music-iterator.cc +++ b/lily/lyric-combine-music-iterator.cc @@ -33,6 +33,7 @@ private: bool start_new_syllable (); void find_voice (); + bool pending_grace_lyric_; bool music_found_; bool made_association_; Context *lyrics_context_; @@ -43,7 +44,7 @@ private: }; /* - Ugh, why static? + Ugh; this is a hack, let's not export this hack, so static. */ static Music *busy_ev; static Music *start_ev; @@ -53,6 +54,7 @@ Lyric_combine_music_iterator::Lyric_combine_music_iterator () { music_found_ = false; made_association_ = false; + pending_grace_lyric_ = false; lyric_iter_ = 0; music_context_ = 0; lyrics_context_ = 0; @@ -202,8 +204,9 @@ Lyric_combine_music_iterator::find_voice () } void -Lyric_combine_music_iterator::process (Moment) +Lyric_combine_music_iterator::process (Moment mom) { + (void) mom; find_voice (); if (!music_context_) return; @@ -221,8 +224,17 @@ Lyric_combine_music_iterator::process (Moment) } if (music_context_ - && start_new_syllable () && lyric_iter_->ok ()) + && (start_new_syllable () || pending_grace_lyric_) + && lyric_iter_->ok ()) { + if (music_context_->now_mom ().grace_part_) + { + pending_grace_lyric_ = true; + return; + } + else + pending_grace_lyric_ = false; + Moment m = lyric_iter_->pending_moment (); lyric_iter_->process (m); diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index b51d087712..3718904ceb 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -450,7 +450,7 @@ using namespace std; EOF FLEXLEXER_FILE=`$CXX -E conftest.cc | \ sed 's!# 1 "\(.*FlexLexer.h\)"!@FLEXLEXER@\1@@!g' | grep '@@' | \ - sed 's!.*@FLEXLEXER@\(.*\)@@.*$!\1!g' ` >& /dev/null + sed 's!.*@FLEXLEXER@\(.*\)@@.*$!\1!g' ` 1> /dev/null 2> /dev/null rm conftest.cc AC_SUBST(FLEXLEXER_FILE) AC_MSG_RESULT($FLEXLEXER_FILE) @@ -1256,11 +1256,11 @@ AC_DEFUN(STEPMAKE_WINDOWS, [ AC_CYGWIN AC_MINGW32 - if test "$CYGWIN" == "yes"; then + if test "$CYGWIN" = "yes"; then LN_S='cp -r' # Cygwin symbolic links do not work for native apps. program_suffix=.exe INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c" - elif test "$MINGW32" == "yes"; then + elif test "$MINGW32" = "yes"; then LN='cp -r' LN_S='cp -r' program_suffix=.exe @@ -1277,7 +1277,7 @@ AC_DEFUN(STEPMAKE_WINDOWS, [ AC_SUBST(program_suffix) AC_MSG_CHECKING([for some flavor of Windows]) - if test "$CYGWIN$MINGW32" == "nono"; then + if test "$CYGWIN$MINGW32" = "nono"; then PLATFORM_WINDOWS=no else PLATFORM_WINDOWS=yes -- 2.39.5