]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Fix off-by-one error in constrained-breaking.
[lilypond.git] / scm / lily.scm
index 01533949fd5d6dbc2a1326153b7d77feaed2e2de..98c84fa34dfc05c1553287404724388abc8fdbaf 100644 (file)
@@ -48,6 +48,7 @@ similar to chord syntax")
                           "experimental mechanism for remembering tweaks")
              (point-and-click #t "use point & click")
              (paper-size "a4" "the default paper size")
+             (pixmap-format "png16m" "GS format to use for pixel images")
              (protected-scheme-parsing #t "continue when finding errors in inline
 scheme are caught in the parser. If off, halt 
 on errors, and print a stack trace.")
@@ -106,6 +107,7 @@ on errors, and print a stack trace.")
 
 (if (ly:get-option 'verbose)
     (begin
+      (ly:set-option 'protected-scheme-parsing #f)
       (debug-enable 'debug)
       (debug-enable 'backtrace)
       (read-enable 'positions)))
@@ -139,7 +141,7 @@ on errors, and print a stack trace.")
     (if (ly:get-option 'verbose)
        (ly:progress "[~A" file-name))
     (if (not file-name)
-       (ly:error (_ "Can't find ~A" x)))
+       (ly:error (_ "cannot find: ~A") x))
     (primitive-load file-name)
     (if (ly:get-option 'verbose)
        (ly:progress "]"))))
@@ -252,7 +254,7 @@ The syntax is the same as `define*-public'."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; init pitch system
 
-(ly:set-default-scale (ly:make-scale #(0 2 4 5 7 9 11)))
+(ly:set-default-scale (ly:make-scale #(0 1 2 5/2 7/2 9/2 11/2)))
 
 
 
@@ -347,8 +349,10 @@ The syntax is the same as `define*-public'."
        (,vector? . "vector")))
 
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; debug mem leaks
 
+(define gc-dumping #f)
 (define gc-protect-stat-count 0)
 (define-public (dump-gc-protects)
   (set! gc-protect-stat-count (1+ gc-protect-stat-count))
@@ -363,6 +367,7 @@ The syntax is the same as `define*-public'."
                         ".scm"))
         (outfile    (open-file  out-file-name  "w")))
 
+    (set! gc-dumping #t)
     (display (format "Dumping GC statistics ~a...\n" out-file-name))
     (display
      (map (lambda (y)
@@ -415,11 +420,16 @@ The syntax is the same as `define*-public'."
          (format "~a ~a ~a\n"
                  gc-protect-stat-count
                  sym
-                 (cdr (assoc sym stats)))
+                 (let ((sym-stat (assoc sym stats)))
+                   (if sym-stat 
+                       (cdr sym-stat)
+                       "?")))
          outfile))
        '(protected-objects bytes-malloced cell-heap-size
                           
                           )))
+
+    (set! gc-dumping #f)
     
     ))
 
@@ -529,11 +539,18 @@ The syntax is the same as `define*-public'."
        ))
   
   (let* ((failed '())
+        (first #t)
         (handler (lambda (key failed-file)
                    (set! failed (append (list failed-file) failed)))))
 
     (for-each
      (lambda (x)
+
+       ;; We don't carry info across file boundaries
+       (if first
+          (set! first #f)
+          (gc))
+       
        (lilypond-file handler x)
        (ly:clear-anonymous-modules)
        (if (ly:get-option 'debug-gc)