;;;; This file is part of LilyPond, the GNU music typesetter.
;;;;
-;;;; Copyright (C) 2005--2009 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 2005--2010 Jan Nieuwenhuizen <janneke@gnu.org>
;;;; Han-Wen Nienhuys <hanwen@xs4all.nl>
;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
;; backend helpers.
(use-modules (scm ps-to-png)
+ (scm paper-system)
(ice-9 optargs))
(define-public (ly:system command . rest)
(if (eq? PLATFORM 'windows)
(begin
(set! cmd (string-regexp-substitute "=" "#" cmd))
- (set! cmd (string-regexp-substitute "-dSAFER " "" cmd))
- (if (access? pdf-name W_OK)
- (delete-file pdf-name))))
+ (set! cmd (string-regexp-substitute "-dSAFER " "" cmd))))
(ly:message (_ "Converting to `~a'...") pdf-name)
(ly:progress "\n")
scope)))
(apply string-append (map output-scope scopes)))
+(define-public (relevant-book-systems book)
+ (let ((systems (ly:paper-book-systems book)))
+ ;; skip booktitles.
+ (if (and (not (ly:get-option 'include-book-title-preview))
+ (pair? systems)
+ (ly:prob-property (car systems) 'is-book-title #f))
+ (cdr systems)
+ systems)))
+
+(define-public (relevant-dump-systems systems)
+ (let ((to-dump-systems '()))
+ (for-each
+ (lambda (sys)
+ (if (or (paper-system-title? sys)
+ (not (pair? to-dump-systems))
+ (paper-system-title? (car to-dump-systems)))
+ (set! to-dump-systems (cons sys to-dump-systems))))
+ systems)
+ to-dump-systems))
+
(define missing-stencil-list '())
(define-public (backend-testing output-module)