From b519f86c12add6466a2a77b79f552abc92a8fd31 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 3 Feb 2007 18:54:31 +0100 Subject: [PATCH] backend is now a symbol. --- lily/paper-outputter-scheme.cc | 5 ++--- scm/framework-ps.scm | 4 ++-- scm/framework-socket.scm | 2 +- scm/framework-svg.scm | 5 ++++- scm/framework-tex.scm | 6 +++--- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lily/paper-outputter-scheme.cc b/lily/paper-outputter-scheme.cc index 672eab7ce7..2149f0ec2c 100644 --- a/lily/paper-outputter-scheme.cc +++ b/lily/paper-outputter-scheme.cc @@ -18,10 +18,9 @@ LY_DEFINE (ly_make_paper_outputter, "ly:make-paper-outputter", "@code{output-}@var{format}, writing to @var{port}.") { LY_ASSERT_TYPE (ly_is_port, port, 1); - LY_ASSERT_TYPE (scm_is_string, format, 2); - - string f = ly_scm2string (format); + LY_ASSERT_TYPE (ly_is_symbol, format, 2); + string f = ly_symbol2string (format); string output_name = ""; SCM port_name = scm_port_filename (port); diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index 28579ebc96..f2eb8fa113 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -447,7 +447,7 @@ ;; content-mangling is always bad. ;; MINGW hack: need to have "b"inary for embedding CFFs (open-file filename "wb") - "ps")) + 'ps)) (paper (ly:paper-book-paper book)) (systems (ly:paper-book-systems book)) (page-stencils (map page-stencil (ly:paper-book-pages book))) @@ -539,7 +539,7 @@ ;; content-mangling is always bad. ;; MINGW hack: need to have "b"inary for embedding CFFs (open-file (format "~a.eps" filename) "wb") - "ps")) + 'ps)) (port (ly:outputter-port outputter)) (rounded-bbox (to-bp-box bbox)) diff --git a/scm/framework-socket.scm b/scm/framework-socket.scm index 8068e34cce..45cbfb9639 100644 --- a/scm/framework-socket.scm +++ b/scm/framework-socket.scm @@ -19,7 +19,7 @@ channel)) (outputter (ly:make-paper-outputter ctor-arg - "socket")) + 'socket)) (systems (ly:paper-book-systems book))) (if (pair? systems) diff --git a/scm/framework-svg.scm b/scm/framework-svg.scm index 6abb3438b8..8f5f34d7c0 100644 --- a/scm/framework-svg.scm +++ b/scm/framework-svg.scm @@ -67,7 +67,10 @@ (string-append (ec 'g) (if page-set? (ec 'pageSet) "") - (ec 'svg))))) + (ec 'svg))) + + (ly:outputter-close outputter) + )) (define (dump-page outputter page page-number page-count landscape? page-set?) (define (dump str) (display str (ly:outputter-port outputter))) diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm index 83c64820e5..a60f9877b1 100644 --- a/scm/framework-tex.scm +++ b/scm/framework-tex.scm @@ -190,7 +190,7 @@ (define-public (output-framework basename book scopes fields) (let* ((filename (format "~a.tex" basename)) - (outputter (ly:make-paper-outputter (open-file filename "wb") "tex")) + (outputter (ly:make-paper-outputter (open-file filename "wb") 'tex)) (paper (ly:paper-book-paper book)) (page-stencils (map page-stencil (ly:paper-book-pages book))) (last-page (car (last-pair pages))) @@ -233,7 +233,7 @@ basename book scopes fields) (let* ((filename (format "~a.tex" basename)) (outputter (ly:make-paper-outputter - (open-file filename "w") "tex")) + (open-file filename "w") 'tex)) (paper (ly:paper-book-paper book)) (lines (ly:paper-book-systems book)) (last-line (car (last-pair lines)))) @@ -260,7 +260,7 @@ basename book scopes fields) (let* ((filename (format "~a.tex" basename)) (outputter (ly:make-paper-outputter (open-file filename "wb") - "tex")) + 'tex)) (paper (ly:paper-book-paper book)) (lines (ly:paper-book-systems book)) (first-notes-index (list-index -- 2.39.5