(let ((status (apply ly:spawn command)))
(if (> status 0)
(begin
- (ly:message (_ "`~a' failed (~a)") command status)
- (ly:progress "\n")
+ (ly:warning (_ "`~a' failed (~a)\n") command status)
;; hmmm. what's the best failure option?
(throw 'ly-file-failed)))))
"-c.setpdfwrite"
(string-append "-f" name)))))
- (ly:message (_ "Converting to `~a'...") pdf-name)
- (ly:progress "\n")
+ (ly:progress (_ "Converting to `~a'...\n") pdf-name)
(ly:system cmd)))
(define-public (postscript->png resolution paper-width paper-height name)
;; Do not try to guess the name of the png file,
;; GS produces PNG files like BASE-page%d.png.
- (ly:message (_ "Converting to ~a...") "PNG")
+ (ly:progress (_ "Converting to ~a...") "PNG")
(make-ps-images name
#:resolution resolution
#:page-width paper-width
(define (helper pred? arg count)
(if (not (pred? arg))
(begin
- (ly:input-message
+ (ly:input-warning
location
- (format
- #f (_ "wrong type for argument ~a. Expecting ~a, found ~s")
- count (type-name pred?) arg))
+ (_ "wrong type for argument ~a. Expecting ~a, found ~s")
+ count (type-name pred?) arg)
#f)
#t))
;; 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)