]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge ssh+git://hanwen@repo.or.cz/srv/git/lilypond into master-hanwen
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 11 Nov 2006 12:47:03 +0000 (13:47 +0100)
committerHan-Wen Nienhuys <lilydev@haring.localdomain>
Sat, 11 Nov 2006 12:47:03 +0000 (13:47 +0100)
.gitignore
GNUmakefile.in
scm/framework-eps.scm
scm/framework-ps.scm
scm/lily-library.scm

index c50567def176ac2621cdf51de8129c004677d877..71835fac083b5cdcdd2c61d57a1a39df71cd77cb 100644 (file)
@@ -14,7 +14,7 @@ configure
 TAGS
 tags
 .gdbinit
-?.ly
+?.*
 *.midi
 \#*
 lily-[0-9][0-9][0-9]*
@@ -31,3 +31,4 @@ gcstat*.scm
 *-systems.texi
 *-systems.tex
 *-midi.ly
+a.out
index aa4adcb0b92e8f9f89bd9d633a44a875a1255345..17182a879348816aee09b49577ec56022646dfe0 100644 (file)
@@ -32,7 +32,7 @@ INSTALLATION_FILES=$(config_make) VERSION
 STEPMAKE_TEMPLATES=toplevel po install
 include $(depth)/make/stepmake.make
 
-local-dist: dist-toplevel-txt-files make-dist-version
+local-dist: dist-toplevel-txt-files 
 
 default: $(outdir)/VERSION
 
index ad5125d3dd549258a74abcc1df0b0af199ffd871..6bbb81b5153f5b546b2337393c123df521644936 100644 (file)
@@ -44,7 +44,6 @@ stencil, so LaTeX includegraphics doesn't fuck up the alignment."
          ))
        stencils))
 
-  
 (define (dump-stencils-as-EPSes stencils book basename)
   (define do-pdf (member  "pdf" (ly:output-formats)))
   (define paper (ly:paper-book-paper book))
@@ -52,7 +51,20 @@ stencil, so LaTeX includegraphics doesn't fuck up the alignment."
     (let* ((dump-me (stack-stencils Y DOWN 2.0 stencils)))
       (dump-stencil-as-EPS paper dump-me basename #t)))
 
-  (define (dump-stencils-as-separate-EPS stencils count )
+  (define (dump-counted-stencil stencil-count-pair)
+    "Return EPS filename" 
+    (let*
+       ((stencil (car stencil-count-pair))
+        (number (cdr stencil-count-pair))
+        (name (format "~a-~a" basename number)))
+
+      (dump-stencil-as-EPS
+       paper stencil name
+       (ly:get-option 'include-eps-fonts))
+
+      (string-append name ".eps")))
+  
+  (define (dump-stencils-as-separate-EPS stencils count)
     (if (pair? stencils)
        (let* ((line (car stencils))
               (rest (cdr stencils))
@@ -60,26 +72,33 @@ stencil, so LaTeX includegraphics doesn't fuck up the alignment."
               )
 
          (dump-stencil-as-EPS
-          paper line system-base-name
-          (ly:get-option 'include-eps-fonts))
+          paper line system-base-name)
 
          (if do-pdf
              (postscript->pdf  0 0  (string-append system-base-name ".eps")))
          (dump-stencils-as-separate-EPS rest (1+ count)))))
 
-
   ;; main body 
   (let* ((tex-system-name (format "~a-systems.tex" basename))
         (texi-system-name (format "~a-systems.texi" basename))
         (tex-system-port (open-output-file tex-system-name))
-        (texi-system-port (open-output-file texi-system-name)))
+        (texi-system-port (open-output-file texi-system-name))
+        (widened-stencils (widen-left-stencil-edges stencils))
+        (counted-systems  (count-list widened-stencils))
+        (eps-files (map dump-counted-stencil  counted-systems))
+        )
     
     (ly:message (_ "Writing ~a...") tex-system-name)
     (ly:message (_ "Writing ~a...") texi-system-name)
 
-    (set! stencils (widen-left-stencil-edges stencils))
-    
-    (dump-stencils-as-separate-EPS stencils 1)
+    (if do-pdf
+
+       ;; par-for-each: a bit faster ...  
+       (for-each
+        (lambda (y)
+          (postscript->pdf 0 0 y))
+        eps-files))
+
     (for-each (lambda (c)
                (if (< 0 c)
                    (display (format "\\ifx\\betweenLilyPondSystem \\undefined
index f06424d72ca3cb844198947baa762732008891ad..e17c3d478024cd75757ed71867e14d42bbdbe888 100644 (file)
                         (ly:output-formats))))
 
 (define-public (dump-stencil-as-EPS paper dump-me filename
-                                   load-fonts
-                                   )
+                                   load-fonts)
+  
   (let*
       ((xext (ly:stencil-extent dump-me X))
        (yext (ly:stencil-extent dump-me Y))
                     "ps"))
 
         (port (ly:outputter-port outputter))
-
-        
         (rounded-bbox (to-bp-box bbox))
         (port (ly:outputter-port outputter))
         (header (eps-header paper rounded-bbox load-fonts)))
index 7bdf96d05d542a73b97e5a2a9d5f5b1d45e83c87..6e30cf6ae541780e331d2e5602c1d01379665dbe 100644 (file)
@@ -231,6 +231,16 @@ found."
 ;; list
 
 
+(define-public (count-list lst)
+  "Given lst (E1 E2 .. ) return ((E1 . 1) (E2 . 2) ... )  "
+  (define (helper l acc count)
+    (if (pair? l)
+       (helper (cdr l) (cons (cons (car l) count) acc) (1+ count))
+       acc))
+
+
+  (reverse (helper lst '() 1)))
+  
 (define-public (list-join lst intermediate)
   "put INTERMEDIATE  between all elts of LST."