From: fred Date: Sun, 24 Mar 2002 19:46:16 +0000 (+0000) Subject: lilypond-0.0.70pre X-Git-Tag: release/1.5.59~4558 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e1fd59f94a2b3e0187b1d3c68efac22039eb60f5;p=lilypond.git lilypond-0.0.70pre --- diff --git a/lily/parser.y b/lily/parser.y index 7ccb227ccf..1beab2956e 100644 --- a/lily/parser.y +++ b/lily/parser.y @@ -1,7 +1,7 @@ %{ // -*-Fundamental-*- #include -#define MUDELA_VERSION "0.0.59" +#define MUDELA_VERSION "0.0.60" #include "script-def.hh" #include "symtable.hh" @@ -405,13 +405,13 @@ paper_body: $$ = THIS->default_paper(); } - | paper_body WIDTH dim { $$->linewidth = $3;} - | paper_body OUTPUT STRING { $$->outfile = *$3; + | paper_body WIDTH dim ';' { $$->linewidth = $3;} + | paper_body OUTPUT STRING ';' { $$->outfile = *$3; delete $3; } | paper_body symtables { $$->set($2); } - | paper_body UNITSPACE dim { $$->whole_width = $3; } - | paper_body GEOMETRIC REAL { $$->geometric_ = $3; } + | paper_body UNITSPACE dim ';' { $$->whole_width = $3; } + | paper_body GEOMETRIC REAL ';' { $$->geometric_ = $3; } | paper_body error { } @@ -429,11 +429,11 @@ midi_block: midi_body: { $$ = new Midi_def; } - | midi_body OUTPUT STRING { + | midi_body OUTPUT STRING ';' { $$->outfile_str_ = *$3; delete $3; } - | midi_body TEMPO notemode_duration ':' int { + | midi_body TEMPO notemode_duration ':' int ';' { $$->set_tempo( $3->length(), $5 ); } | midi_body error { @@ -765,9 +765,9 @@ script_definition: ; script_body: - STRING int int int int { + STRING int int int int int { Script_def *s = new Script_def; - s->set_from_input(*$1,$2, $3,$4,$5); + s->set_from_input(*$1,$2, $3,$4,$5, $6); $$ = s; delete $1; } @@ -785,7 +785,9 @@ script_req: gen_script_def: text_def { $$ = $1; } - | mudela_script + | mudela_script { $$ = $1; + $$-> set_spot( THIS->here_input() ); + } ; text_def: diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 2b40f00e8e..10bbb0b0fa 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -18,17 +18,17 @@ void Text_spanner::set_support(Directional_spanner*d) { - if (support) - remove_dependency(support); + if (support_span_l_) + remove_dependency(support_span_l_); - support =d; + support_span_l_ =d; add_dependency(d); } Text_spanner::Text_spanner() { spec_p_ = 0; - support = 0; + support_span_l_ = 0; } IMPLEMENT_STATIC_NAME(Text_spanner); @@ -43,8 +43,8 @@ Text_spanner::do_print() const void Text_spanner::do_post_processing() { - text_off_ = support->center() + - Offset(0,support->dir_i_ * paper()->internote_f() * 4); // todo + text_off_ = support_span_l_->center() + + Offset(0,support_span_l_->dir_i_ * paper()->internote_f() * 4); // todo } Molecule* @@ -61,8 +61,8 @@ Text_spanner::brew_molecule_p() const void Text_spanner::do_pre_processing() { - right_col_l_ = support->right_col_l_; - left_col_l_ = support->left_col_l_; + right_col_l_ = support_span_l_->right_col_l_; + left_col_l_ = support_span_l_->left_col_l_; assert(left_col_l_ && right_col_l_); } @@ -75,9 +75,8 @@ Text_spanner::height()const void Text_spanner::do_substitute_dependency(Score_elem* o, Score_elem*n) { - Directional_spanner * old = (Directional_spanner*)o->spanner(); - if (support == old) - support = (Directional_spanner*) n->spanner(); + if (support_span_l_ == o) + support_span_l_ = (Directional_spanner*) (n?n->spanner():0); } @@ -85,3 +84,11 @@ Text_spanner::~Text_spanner() { delete spec_p_; } + +Text_spanner::Text_spanner(Text_spanner const&s) + : Spanner( s) +{ + support_span_l_ = s.support_span_l_; + spec_p_ = s.spec_p_? s.spec_p_->clone() : 0; + text_off_ = s.text_off_; +}