From: fred Date: Tue, 26 Mar 2002 23:23:26 +0000 (+0000) Subject: lilypond-1.3.63 X-Git-Tag: release/1.5.59~1555 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5fb1b7debab80b458c4ef74a2c794d710899d47e;p=lilypond.git lilypond-1.3.63 --- diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index ba9751c4b5..7c91bbd276 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -29,6 +29,9 @@ A ly_B2A (B b); */ SCM ly_str02scm (char const*c); +SCM ly_deep_copy (SCM); + + SCM ly_symbol2scm (char const *); String ly_scm2string (SCM s); String ly_symbol2string (SCM); diff --git a/lily/include/rest-collision.hh b/lily/include/rest-collision.hh index 550ed5e0f4..10b8ac01c1 100644 --- a/lily/include/rest-collision.hh +++ b/lily/include/rest-collision.hh @@ -20,7 +20,7 @@ public: Rest_collision(SCM); - SCM member_before_line_breaking (); - static SCM before_line_breaking (SCM); + SCM member_after_line_breaking (); + static SCM after_line_breaking (SCM); }; #endif // REST_COLLISION_HH diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index e406055722..f02685cf44 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -404,3 +404,15 @@ init_functions () } ADD_SCM_INIT_FUNC(funcs, init_functions); + +SCM +ly_deep_copy (SCM l) +{ + if (gh_pair_p (l)) + { + return gh_cons (ly_deep_copy (gh_car (l)), ly_deep_copy (gh_cdr (l))); + } + else + return l; +} + diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 172961dacf..302a1a0630 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -208,6 +208,9 @@ Local_key_engraver::acknowledge_element (Score_element_info info) } } +/* + ugh. deep_copy uses lots of space. + */ void Local_key_engraver::do_process_music() { @@ -218,11 +221,11 @@ Local_key_engraver::do_process_music() if (!mp) { if (!to_boolean (get_property ("noResetKey"))) - daddy_trans_l_->set_property ("localKeySignature", sig); + daddy_trans_l_->set_property ("localKeySignature", ly_deep_copy (sig)); } else if (last_keysig_ != sig) { - daddy_trans_l_->set_property ("localKeySignature", sig); + daddy_trans_l_->set_property ("localKeySignature", ly_deep_copy (sig)); } } diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index f7474eccb3..a72e0504e3 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -60,15 +60,16 @@ col2rhythmic_head (Note_column* c) return dynamic_cast (e); } -GLUE_SCORE_ELEMENT(Rest_collision,before_line_breaking); +GLUE_SCORE_ELEMENT(Rest_collision,after_line_breaking); + SCM -Rest_collision::member_before_line_breaking () +Rest_collision::member_after_line_breaking () { Link_array rest_l_arr = Pointer_group_interface__extract_elements (this, (Note_column*) 0, "rests"); Link_array ncol_l_arr = Pointer_group_interface__extract_elements (this, (Note_column*) 0, "notes"); - + /* handle rest-rest and rest-note collisions