From: Masamichi Hosoda Date: Mon, 1 Jun 2015 13:05:47 +0000 (+0900) Subject: Issue 4431 / 1: Delete duplicate and unused procedures in ps-to-png.scm X-Git-Tag: release/2.19.22-1~48 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0091371dea0a375b41fcd6916085aa8ad102c759;p=lilypond.git Issue 4431 / 1: Delete duplicate and unused procedures in ps-to-png.scm backend-library.scm: sanitize-command-option: unused ps-to-png.scm: _: lily.scm my-system: unused --- diff --git a/scm/backend-library.scm b/scm/backend-library.scm index b1cc5f5c4b..2d03394134 100644 --- a/scm/backend-library.scm +++ b/scm/backend-library.scm @@ -32,14 +32,6 @@ ;; hmmm. what's the best failure option? (throw 'ly-file-failed))))) -(define-public (sanitize-command-option str) - "Kill dubious shell quoting." - - (string-append - "\"" - (regexp-substitute/global #f "[^-_ 0-9,.a-zA-Z'\"\\]" str 'pre 'post) - "\"")) - (define-public (search-executable names) (define (helper path lst) (if (null? (cdr lst)) diff --git a/scm/ps-to-png.scm b/scm/ps-to-png.scm index 93bce270ed..20569ca358 100644 --- a/scm/ps-to-png.scm +++ b/scm/ps-to-png.scm @@ -27,27 +27,12 @@ (lily) ) -;; FIXME: use backend-library for duplicates and stubs; lilypond-ps2png.scm is no more - -(define-public _ gettext) - (define (re-sub re sub string) (regexp-substitute/global #f re string 'pre sub 'post)) (define-public (gulp-file file-name . max-size) (ly:gulp-file file-name (if (pair? max-size) (car max-size)))) -;; copy of ly:system. ly:* not available via lilypond-ps2png.scm -(define (my-system be-verbose exit-on-error cmd) - (define status 0) - (ly:debug (_ "Invoking `~a'...\n") cmd) - (set! status (system cmd)) - (if (not (= status 0)) - (begin - (ly:error (_ "~a exited with status: ~S") "GS" status) - (if exit-on-error (exit 1)))) - status) - (define (scale-down-image factor file) (let* ((old (string-append file ".old")) ;; Netpbm commands (pngtopnm, pnmscale, pnmtopng)