;;;; This file is part of LilyPond, the GNU music typesetter.
;;;;
-;;;; Copyright (C) 2005--2011 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 2005--2012 Jan Nieuwenhuizen <janneke@gnu.org>
;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;; copy of ly:system. ly:* not available via lilypond-ps2png.scm
(define (my-system be-verbose exit-on-error cmd)
(define status 0)
- (if be-verbose
- (begin
- (format (current-error-port) (_ "Invoking `~a'...") cmd)
- (newline (current-error-port))))
+ (ly:debug (_ "Invoking `~a'...\n") cmd)
(set! status (system cmd))
(if (not (= status 0))
(begin
- (format (current-error-port)
- (format #f (_ "~a exited with status: ~S") "GS" status))
+ (ly:error (_ "~a exited with status: ~S") "GS" status)
(if exit-on-error (exit 1))))
status)
(my-system
be-verbose #t
(format #f
- "pngtopnm ~a | pnmscale -reduce ~a 2>/dev/null | pnmtopng -compression 9 2>/dev/null > ~a"
+ "pngtopnm \"~a\" | pnmscale -reduce ~a 2>/dev/null | pnmtopng -compression 9 2>/dev/null > \"~a\""
old factor file))
(delete-file old)))