From cd3c5c74144d131e3592d15cfd92453c0293ae6b Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Fri, 24 Jul 2009 13:08:44 -0700 Subject: [PATCH] Move page-breaking-wrapper into C++. This is in preparation for deleting layout-page-layout.scm. --- lily/paper-book.cc | 7 +++++-- ly/paper-defaults-init.ly | 1 - scm/layout-page-layout.scm | 9 --------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/lily/paper-book.cc b/lily/paper-book.cc index fd519d5d75..3db1321f5e 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -601,8 +601,11 @@ Paper_book::pages () } else if (scm_is_pair (scores_)) { - SCM proc = paper_->c_variable ("page-breaking-wrapper"); - pages_ = scm_apply_0 (proc, scm_list_1 (self_scm ())); + SCM page_breaking = paper_->c_variable ("page-breaking"); + pages_ = scm_apply_0 (page_breaking, scm_list_1 (self_scm ())); + SCM post_process = paper_->c_variable ("page-post-process"); + if (ly_is_procedure (post_process)) + scm_apply_2 (post_process, paper_->self_scm (), pages_, SCM_EOL); /* set systems_ from the pages */ if (systems_ == SCM_BOOL_F) diff --git a/ly/paper-defaults-init.ly b/ly/paper-defaults-init.ly index 9d2725ede0..4bd187cbbe 100644 --- a/ly/paper-defaults-init.ly +++ b/ly/paper-defaults-init.ly @@ -97,7 +97,6 @@ (word-space . 0.6))) #(define page-breaking ly:optimal-breaking) - #(define page-breaking-wrapper page-breaking-wrapper) #(define page-post-process post-process-pages) #(define write-page-layout (ly:get-option 'dump-tweaks)) diff --git a/scm/layout-page-layout.scm b/scm/layout-page-layout.scm index ffd6d632c4..d1c18ab573 100644 --- a/scm/layout-page-layout.scm +++ b/scm/layout-page-layout.scm @@ -128,15 +128,6 @@ (cdr spacing))))) page))) -(define (page-breaking-wrapper paper-book) - "Compute line and page breaks by calling the page-breaking paper variable, - then performs the post process function using the page-post-process paper - variable. Finally, return the pages." - (let* ((paper (ly:paper-book-paper paper-book)) - (pages ((ly:output-def-lookup paper 'page-breaking) paper-book))) - ((ly:output-def-lookup paper 'page-post-process) paper pages) - pages)) - (define (post-process-pages layout pages) "If the write-page-layout paper variable is true, dumps page breaks and tweaks." -- 2.39.2