]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-svg.scm
Fix uninitialized variables when Source_file::get_counts returns early due to !contai...
[lilypond.git] / scm / output-svg.scm
index 9b1b250f77857a631b525bd90fa282b796b6e178..d993c356358c94fa21fe70f57c09e28cce49687b 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2002--2010 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 2002--2011 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;;                Patrick McCarty <pnorcks@gmail.com>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
                      (value (cdr x)))
                  (if (number? value)
                      (set! value (ly:format "~4f" value)))
-                 (format " ~s=\"~a\"" attr value)))
+                 (format #f " ~s=\"~a\"" attr value)))
              attributes-alist)))
 
 (define-public (eo entity . attributes-alist)
   "o = open"
-  (format "<~S~a>\n" entity (attributes attributes-alist)))
+  (format #f "<~S~a>\n" entity (attributes attributes-alist)))
 
 (define-public (eoc entity . attributes-alist)
-  " oc = open/close"
-  (format "<~S~a/>\n" entity (attributes attributes-alist)))
+  "oc = open/close"
+  (format #f "<~S~a/>\n" entity (attributes attributes-alist)))
 
 (define-public (ec entity)
   "c = close"
-  (format "</~S>\n" entity))
+  (format #f "</~S>\n" entity))
 
 (define-public (comment s)
   (string-append "<!-- " s " -->\n"))
@@ -86,7 +86,7 @@
   (define (helper lst)
     (if (null? lst)
        '()
-       (cons (format "~S ~S" (car lst) (- (cadr lst)))
+       (cons (format #f "~S ~S" (car lst) (- (cadr lst)))
              (helper (cddr lst)))))
 
   (string-join (helper lst) " "))
 
 (define (dashed-line thick on off dx dy phase)
   (draw-line thick 0 0 dx dy
-            `(stroke-dasharray . ,(format "~a,~a" on off))))
+            `(stroke-dasharray . ,(format #f "~a,~a" on off))))
 
 (define (draw-line thick x1 y1 x2 y2 . alist)
   (apply entity 'line ""
                                  (closepath . z))
                                "")))
 
-         (cons (format "~a~a" svg-head (number-list->point args))
+         (cons (format #f "~a~a" svg-head (number-list->point args))
                (convert-path-exps (drop rest arity))))
        '()))
 
     '(fill . "currentColor")))
 
 (define (setcolor r g b)
-  (format "<g color=\"rgb(~a%, ~a%, ~a%)\">\n"
+  (format #f "<g color=\"rgb(~a%, ~a%, ~a%)\">\n"
          (* 100 r) (* 100 g) (* 100 b)))
 
 ;; rotate around given point