From bf511cd4ebb131465aa7d43e64b10f3900f8231e Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:23:25 +0000 Subject: [PATCH] lilypond-1.3.62 --- CHANGES | 14 ++++++++++-- lily/includable-lexer.cc | 12 +++++++--- lily/lily-guile.cc | 48 +++++++++++++++++----------------------- lily/line-of-score.cc | 23 +++++++++++++------ lily/paper-score.cc | 4 +++- lily/performance.cc | 6 +++-- lily/score.cc | 3 ++- 7 files changed, 66 insertions(+), 44 deletions(-) diff --git a/CHANGES b/CHANGES index 652041d578..9d3aa6b170 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,15 @@ -1.3.60.jcn1 -=========== +1.3.62 +====== + +* Made callbacks from Score_element::before_line_breaking() and +Score_element::after_line_breaking() + +* Fixed website; backlinks should work again. + +* Removed --ignore-version option. Added --verbose option. + +1.3.61 +====== * Webpage hacking diff --git a/lily/includable-lexer.cc b/lily/includable-lexer.cc index a73b2266b1..b4ee0f2821 100644 --- a/lily/includable-lexer.cc +++ b/lily/includable-lexer.cc @@ -14,6 +14,7 @@ #include "source-file.hh" #include "source.hh" #include "debug.hh" +#include "main.hh" #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 @@ -57,7 +58,9 @@ Includable_lexer::new_input (String s, Sources * global_sources) char_count_stack_.push (0); if (yy_current_buffer) state_stack_.push (yy_current_buffer); - progress_indication (String ("[") + s); + + if (verbose_global_b) + progress_indication (String ("[") + s); include_stack_.push (sl); @@ -81,7 +84,9 @@ Includable_lexer::new_input (String name, String data, Sources* sources) char_count_stack_.push (0); if (yy_current_buffer) state_stack_.push (yy_current_buffer); - progress_indication (String ("[") + name); + + if (verbose_global_b) + progress_indication (String ("[") + name); include_stack_.push (file); yy_switch_to_buffer (yy_create_buffer (file->istream_l (), YY_BUF_SIZE)); @@ -94,7 +99,8 @@ Includable_lexer::close_input () { include_stack_.pop (); char_count_stack_.pop (); - progress_indication ("]"); + if (verbose_global_b) + progress_indication ("]"); yy_delete_buffer (yy_current_buffer); yy_current_buffer = 0; if (state_stack_.empty ()) diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 5c9c793c9e..e406055722 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -108,12 +108,8 @@ ly_symbol2string (SCM s) } -/** - Read a file, and shove it down GUILE. GUILE also has file read - functions, but you can't fiddle with the path of those. - */ -void -read_lily_scm_file (String fn) +String +gulp_file_to_string (String fn) { String s = global_path.find (fn); if (s == "") @@ -123,39 +119,35 @@ read_lily_scm_file (String fn) e += _f ("(load path: `%s')", global_path.str ()); error (e); } - else - progress_indication ("[" + s); + else if (verbose_global_b) + progress_indication ("[" + s ); Simple_file_storage f(s); - - gh_eval_str ((char *) f.ch_C()); - progress_indication ("]"); + String result (f.ch_C()); + if (verbose_global_b) + progress_indication ("]"); + return result; } - SCM -ly_gulp_file (SCM name) +ly_gulp_file (SCM fn) { - String fn (ly_scm2string (name)); - String s = global_path.find (fn); - if (s == "") - { - String e = _f ("can't find file: `%s'", fn); - e += " "; - e += _f ("(load path: `%s')", global_path.str ()); - error (e); - } - else - progress_indication ("[" + s ); + return ly_str02scm (gulp_file_to_string (ly_scm2string (fn)).ch_C()); +} - Simple_file_storage f(s); - SCM result = ly_str02scm (f.ch_C()); - progress_indication ("]"); - return result; +/** + Read a file, and shove it down GUILE. GUILE also has file read + functions, but you can't fiddle with the path of those. + */ +void +read_lily_scm_file (String fn) +{ + gh_eval_str ((char *) gulp_file_to_string (fn).ch_C()); } + void ly_display_scm (SCM s) { diff --git a/lily/line-of-score.cc b/lily/line-of-score.cc index 110aea1c93..62bd6a153d 100644 --- a/lily/line-of-score.cc +++ b/lily/line-of-score.cc @@ -83,17 +83,24 @@ Line_of_score::output_lines () unsmob_element (gh_car (s))->handle_broken_dependencies (); } handle_broken_dependencies (); - progress_indication ( _f("Element count %d.", count + element_count())); + + if (verbose_global_b) + progress_indication ( _f("Element count %d.", count + element_count())); for (int i=0; i < broken_into_l_arr_.size (); i++) { Line_of_score *line_l = dynamic_cast (broken_into_l_arr_[i]); - progress_indication ("["); + if (verbose_global_b) + progress_indication ("["); line_l->post_processing (); - progress_indication (to_str (i)); - progress_indication ("]"); + + if (verbose_global_b) + { + progress_indication (to_str (i)); + progress_indication ("]"); + } } } @@ -200,7 +207,8 @@ Line_of_score::pre_processing () for (SCM s = get_elt_pointer ("all-elements"); gh_pair_p (s); s = gh_cdr (s)) unsmob_element (gh_car (s))->discretionary_processing (); - progress_indication ( _f("Element count %d ", element_count ())); + if(verbose_global_b) + progress_indication ( _f("Element count %d ", element_count ())); for (SCM s = get_elt_pointer ("all-elements"); gh_pair_p (s); s = gh_cdr (s)) @@ -211,7 +219,7 @@ Line_of_score::pre_processing () for (SCM s = get_elt_pointer ("all-elements"); gh_pair_p (s); s = gh_cdr (s)) { Score_element* sc = unsmob_element (gh_car (s)); - sc->calculate_dependencies (PRECALCED, PRECALCING, &Score_element::before_line_breaking); + sc->calculate_dependencies (PRECALCED, PRECALCING, ly_symbol2scm ("before-line-breaking-callback")); } progress_indication ("\n" + _ ("Calculating column positions...") + " " ); @@ -226,7 +234,8 @@ Line_of_score::post_processing () gh_pair_p (s); s = gh_cdr (s)) { Score_element* sc = unsmob_element (gh_car (s)); - sc->calculate_dependencies (POSTCALCED, POSTCALCING, &Score_element::after_line_breaking); + sc->calculate_dependencies (POSTCALCED, POSTCALCING, + ly_symbol2scm ("after-line-breaking-callback")); } Interval i(extent(Y_AXIS)); diff --git a/lily/paper-score.cc b/lily/paper-score.cc index 7e3388fedf..c90f8ca0ff 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -67,7 +67,9 @@ Paper_score::calc_breaking () void Paper_score::process () { - progress_indication ( _f("Element count %d ", line_l_->element_count ())); + if (verbose_global_b) + progress_indication ( _f("Element count %d ", line_l_->element_count ())); + progress_indication (_ ("Preprocessing elements...") + " "); diff --git a/lily/performance.cc b/lily/performance.cc index 84a8e64b4c..f6ff1cb5c7 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -52,7 +52,8 @@ Performance::output (Midi_stream& midi_stream) for (int i =0; i < audio_staff_l_arr_.size (); i++) { Audio_staff *s = audio_staff_l_arr_[i]; - progress_indication ("[" + to_str (i)) ; + if(verbose_global_b) + progress_indication ("[" + to_str (i)) ; /* Aargh, let's hear it for the MIDI standard. @@ -62,7 +63,8 @@ Performance::output (Midi_stream& midi_stream) if (channel == 9) channel++; s->output (midi_stream, channel++); - progress_indication ("]"); + if(verbose_global_b) + progress_indication ("]"); } } diff --git a/lily/score.cc b/lily/score.cc index e8fd342f35..b9027e9288 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -94,7 +94,8 @@ Score::run_translator (Music_output_def *odef_l) Music_output * output = trans_p->get_output_p(); delete trans_p; - progress_indication (_f ("elapsed time: %.2f seconds", timer.read ())); + if(verbose_global_b) + progress_indication (_f ("elapsed time: %.2f seconds", timer.read ())); output->header_l_ = header_p_; output->origin_str_ = location_str(); -- 2.39.5