X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-breaking.cc;h=fb476848983f6a6ff0ce60ea10c014fd9e294fa0;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=b23cd4637b04684c3b591762df9368593aeeccf8;hpb=e0af94bb8939bc6f4998db6294010baa77139092;p=lilypond.git diff --git a/lily/page-breaking.cc b/lily/page-breaking.cc index b23cd4637b..fb47684898 100644 --- a/lily/page-breaking.cc +++ b/lily/page-breaking.cc @@ -554,7 +554,7 @@ Page_breaking::draw_page (SCM systems, SCM configuration, int page_num, bool las for (SCM s = systems; scm_is_pair (s); s = scm_cdr (s)) { SCM paper_system = scm_car (s); - if (Grob *g = Grob::unsmob (scm_car (s))) + if (Grob *g = unsmob (scm_car (s))) { System *sys = dynamic_cast (g); paper_system = sys->get_paper_system (); @@ -567,11 +567,11 @@ Page_breaking::draw_page (SCM systems, SCM configuration, int page_num, bool las // Create the page and draw it. SCM page = make_page (page_num, last); - Prob *p = Prob::unsmob (page); + Prob *p = unsmob (page); p->set_property ("lines", paper_systems); p->set_property ("configuration", configuration); - Stencil *foot_p = Stencil::unsmob (p->get_property ("foot-stencil")); + Stencil *foot_p = unsmob (p->get_property ("foot-stencil")); Stencil foot = foot_p ? *foot_p : Stencil (); SCM footnotes = Page_layout_problem::get_footnotes_from_lines (systems); @@ -651,19 +651,19 @@ Page_breaking::make_pages (vector lines_per_page, SCM systems) SCM lines = scm_caar (s); SCM config = scm_cdar (s); - bool bookpart_last_page = (s == systems_configs_fncounts); + bool bookpart_last_page = scm_is_eq (s, systems_configs_fncounts); SCM page = draw_page (lines, config, page_num, bookpart_last_page); /* collect labels */ SCM page_num_scm = scm_from_int (page_num); for (SCM l = lines; scm_is_pair (l); l = scm_cdr (l)) { SCM labels = SCM_EOL; - if (Grob *line = Grob::unsmob (scm_car (l))) + if (Grob *line = unsmob (scm_car (l))) { System *system = dynamic_cast (line); labels = system->get_property ("labels"); } - else if (Prob *prob = Prob::unsmob (scm_car (l))) + else if (Prob *prob = unsmob (scm_car (l))) labels = prob->get_property ("labels"); for (SCM lbls = labels; scm_is_pair (lbls); lbls = scm_cdr (lbls)) @@ -689,13 +689,13 @@ Page_breaking::create_system_list () SCM specs = book_->get_system_specs (); for (SCM s = specs; scm_is_pair (s); s = scm_cdr (s)) { - if (Paper_score *ps = dynamic_cast (Music_output::unsmob (scm_car (s)))) + if (Paper_score *ps = unsmob (scm_car (s))) { system_specs_.push_back (System_spec (ps)); } else { - Prob *pb = Prob::unsmob (scm_car (s)); + Prob *pb = unsmob (scm_car (s)); assert (pb); pb->protect (); @@ -760,7 +760,7 @@ Page_breaking::find_chunks_and_breaks (Break_predicate is_break, Prob_break_pred bool last = (j == cols.size () - 1); bool break_point = is_break && is_break (cols[j]); - bool chunk_end = cols[j]->get_property ("page-break-permission") == force_sym; + bool chunk_end = scm_is_eq (cols[j]->get_property ("page-break-permission"), force_sym); Break_position cur_pos = Break_position (i, line_breaker_columns.size (), cols[j], @@ -1133,7 +1133,7 @@ Page_breaking::min_page_count (vsize configuration, vsize first_page_num) if ((!too_few_lines (line_count) && (next_height > cur_page_height && cur_rod_height > 0)) || too_many_lines (next_line_count) - || prev && scm_is_eq (prev->page_permission_, ly_symbol2scm ("force"))) + || (prev && scm_is_eq (prev->page_permission_, ly_symbol2scm ("force")))) { line_count = cur.compressed_nontitle_lines_count_; cur_rod_height = cur.full_height ();