]> git.donarmstrong.com Git - lilypond.git/commitdiff
Scheme coverage fixes.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 23 Jan 2007 14:59:23 +0000 (15:59 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 23 Jan 2007 14:59:23 +0000 (15:59 +0100)
scm/framework-ps.scm
scm/lily.scm
scm/markup.scm
scm/music-functions.scm
scm/output-ps.scm
scm/output-tex.scm
scm/ps-to-png.scm
scm/to-xml.scm

index 670e28e538d35cb053aee265af64a41c8124ce41..213d995c2c463a3eb7dd3897190ba192643693ca 100644 (file)
     (string-append
       "/" command " { /" fontname " " (ly:number->string scaling) " output-scale div selectfont } bind def\n"))
 
-  (define (standard-tex-font? x)
-    (or (equal? (substring x 0 2) "ms")
-       (equal? (substring x 0 2) "cm")))
-
   (define (font-load-command font)
     (let* ((specced-font-name (ly:font-name font))
           (fontname (if specced-font-name
           (ops (ly:output-def-lookup paper 'output-scale))
           (scaling (* ops magnification designsize)))
 
-      ;; Bluesky pfbs have UPCASE names (sigh.)
-      ;; FIXME - don't support Bluesky?
-      (if (standard-tex-font? fontname)
-         (set! fontname (string-upcase fontname)))
       (if (equal? fontname "unknown")
          (display (list font fontname)))
       (define-font plain fontname scaling)))
index 183b71e4902b1f46d9ec2ddd68a81fc2e2343f20..a5aee5458b4107b4ed902a8679e2ded9b0255aea 100644 (file)
@@ -628,7 +628,6 @@ The syntax is the same as `define*-public'."
   (let ((failed (lilypond-all files)))
     (if (ly:get-option 'trace-scheme-coverage)
        (begin
-         (coverage:disable)
          (coverage:show-all (lambda (f) (string-contains f "lilypond"))
                             )))
          
index c786c16890f1b64bbf7c80d3d9d7a131165a31b5..5efe02732a9b6a7fa59aece302cc7e41c7cdbf55 100644 (file)
@@ -350,9 +350,14 @@ eg: ((italic) (raise 4) (bold)), maps the commands on each markup argument, eg:
                                   (cdr arg)))))
 
 ;; 
-;; typecheck, and throw an error when something amiss.
+;; 
+;;
 ;; 
 (define (markup-thrower-typecheck arg)
+  "typecheck, and throw an error when something amiss.
+
+Uncovered - cheap-markup? is used."
+
   (cond ((string? arg) #t)
         ((not (pair? arg))
          (throw 'markup-format "Not a pair" arg))
index 234faf41b5c40ac3237133971a76d855fe3542a4..049f27ea3ae63cf69e77267c9c4227a9a7b8652f 100644 (file)
@@ -628,11 +628,6 @@ SkipEvent. Useful for extracting parts from crowded scores"
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; warn for bare chords at start.
 
-(define (has-request-chord elts)
-  (reduce (lambda (x y) (or x y)) #f
-         (map (lambda (x)
-                (equal? (ly:music-property x 'name) 'RequestChord))
-              elts)))
 
 (define-public (ly:music-message music msg)
   (let ((ip (ly:music-property music 'origin)))
@@ -640,25 +635,6 @@ SkipEvent. Useful for extracting parts from crowded scores"
        (ly:input-message ip msg)
        (ly:warning msg))))
 
-(define (check-start-chords music)
-  "Check music expression for a Simultaneous_music containing notes\n(ie. Request_chords),
-without context specification. Called  from parser."
-  (let ((es (ly:music-property music 'elements))
-       (e (ly:music-property music 'element))
-       (name (ly:music-property music 'name)))
-    (cond ((equal? name "Context_specced_music") #t)
-         ((equal? name "Simultaneous_music")
-          (if (has-request-chord es)
-              (ly:music-message music "Starting score with a chord.\nInsert an explicit \\context before chord")
-              (map check-start-chords es)))
-         ((equal? name "SequentialMusic")
-          (if (pair? es)
-              (check-start-chords (car es))))
-         (else (if (ly:music? e) (check-start-chords e)))))
-  music)
-
-
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; setting stuff for grace context.
index 594acedea78f8f4c04fe997cfdde5ee75e20c940..b82c185e02caa7638dc0acd9a6628e4dc179cd65 100644 (file)
@@ -38,7 +38,7 @@
            setcolor
            setrotation
            text
-           zigzag-line))
+           ))
 
 
 (use-modules (guile)
 (define (numbers->string4 numlist)
   (string-join (map str4 numlist) " "))
 
-;; FIXME: lily-def
-(define-public (ps-string-def prefix key val)
-  (ly:format "/ ~a~a (~a) def\n"
-         prefix
-         (symbol->string key)
-         (escape-parentheses val)))
-
-(define (ps-number-def prefix key val)
-  (let ((s (if (integer? val)
-              (ly:number->string val)
-              (ly:number->string (exact->inexact val)))))
-    (ly:format "/~a~a ~a def\n"
-              prefix
-              (symbol->string key) s)))
-
-
 ;;;
 ;;; Lily output interface, PostScript implementation --- cleanup and docme
 ;;;
                         (cadddr location))
              "")))))
 
-(define (lily-def key val)
-  (let ((prefix "lilypondlayout"))
-    (if (string=?
-         (substring key 0 (min (string-length prefix) (string-length key)))
-         prefix)
-      (format "/~a { ~a } bind def\n" key val)
-      (format "/~a (~a) def\n" key val))))
 
 (define (named-glyph font glyph)
   (ly:format "~a /~a glyphshow " ;;Why is there a space at the end?
 (define (utf-8-string pango-font-description string)
   (ly:warning (_ "utf-8-string encountered in PS backend")))
 
-
-(define (zigzag-line is-center zzw zzh thick dx dy)
-  (ly:format "~a ~4f ~4f ~4f 0 0 ~4f ~4f draw_zigzag_line"
-   (if is-center "true" "false")
-   zzw
-   zzh
-   thick
-   dx
-   dy))
-
-
 (define (path thickness exps)
   (define (convert-path-exps exps)
     (if (pair? exps)
index d9a97b90934139f5316153473e957dcdc799923d..4be327839707c5e8a68ecd6f58d2f62433988ce6 100644 (file)
@@ -27,7 +27,6 @@
            dashed-slur
            named-glyph
            dashed-line
-           zigzag-line
            comment
            repeat-slash
            placebox
 (define (dashed-line thick on off dx dy phase)
   (embedded-ps (list 'dashed-line  thick on off dx dy phase)))
 
-(define (zigzag-line centre? zzw zzh thick dx dy)
-  (embedded-ps (list 'zigzag-line centre? zzw zzh thick dx dy)))
-
 (define (embedded-ps expr)
   (let ((ps-string
         (with-output-to-string
            (string-append "\\special{src:"
                           (line-column-location location) "}")
            ""))
-      ""))
\ No newline at end of file
+      ""))
index 9959afdbfe6f48b24da675dfbdc713c7dc61f23a..fe17642c43d99f732641a28da1bbd137412ab759 100644 (file)
 (define-public (gulp-file file-name . max-size)
   (ly:gulp-file file-name (if (pair? max-size) (car max-size))))
 
-(define BOUNDING-BOX-RE
-  "^%%BoundingBox: (-?[0-9]+) (-?[0-9]+) (-?[0-9]+) (-?[0-9]+)")
-
-(define (unused-found-broken-get-bbox file-name)
-  (let* ((bbox (string-append file-name ".bbox"))
-        ;; -sOutputFile does not work with bbox?
-        (cmd (format #t "gs\
- -sDEVICE=bbox\
- -q\
- -dNOPAUSE\
- ~S\
- -c showpage\
- -c quit 2>~S"
-                     file-name bbox))
-        (status (system cmd))
-        (s (gulp-file bbox 10240))
-        (m (string-match BOUNDING_BOX_RE s)))
-
-    (if m
-       (list->vector
-        (map (lambda (x) (string->number (car x))) (vector->list m)))
-       #f)))
-
-
 ;; copy of ly:system. ly:* not available via lilypond-ps2png.scm
 (define (my-system be-verbose exit-on-error cmd)
   (define status 0)
index 409247d0a554963bb2c52cdd379a22bd12739f43..437cc03b4af6becca1f2574b31430d67f0a99c7f 100644 (file)
@@ -89,19 +89,6 @@ is then separated.
                   (numer . ,(car (ly:duration-factor d)))
                   (denom . ,(cdr (ly:duration-factor d))))))
 
-(define (musicxml-pitch->xml-node p)
-  (make <xml-node>
-    #:name 'pitch
-    #:children
-    (list
-     (make <xml-node>
-       #:name 'step
-       #:value (list-ref  '("C" "D" "E" "F" "G" "A" "B")
-                         (ly:pitch-notename p)))
-     (make <xml-node>
-       #:name 'octave
-       #:value (number->string (ly:pitch-octave p))))))
-
 (define (pitch->xml-node p)
   (make <xml-node>
     #:name 'pitch
@@ -250,7 +237,6 @@ is then separated.
   ;;
   ;;  (display (dtd-header) port)
 
-  (define pitch->xml-node musicxml-pitch->xml-node)
   (define duration->xml-node musicxml-duration->xml-node)
   
   (display (open-tag 'music '((type . score)) '()) port)