]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Flush all ports after each file, flush stdout after displaying all options
[lilypond.git] / scm / lily.scm
index 55d989e2d2ba7d8260f90955bbf86d0cc720a9c6..bbea5afab996462f9eedb9a6ee3613f65581ce5a 100644 (file)
@@ -642,7 +642,7 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
                        ".scm"))
         (outfile (open-file out-file-name "w")))
     (set! gc-dumping #t)
-    (format #t "Dumping GC statistics ~a...\n" out-file-name)
+    (ly:progress "Dumping GC statistics ~a...\n" out-file-name)
     (for-each (lambda (y)
                 (let ((x (car y))
                       (c (cdr y)))
@@ -662,16 +662,16 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
     (newline outfile)
     (if (defined? 'gc-live-object-stats)
         (let* ((stats #f))
-          (display "Live object statistics: GC'ing\n")
+          (ly:progress "Live object statistics: GC'ing\n")
           (ly:reset-all-fonts)
           (gc)
           (gc)
-          (display "Asserting dead objects\n")
+          (ly:progress "Asserting dead objects\n")
           (ly:set-option 'debug-gc-assert-parsed-dead #t)
           (gc)
           (ly:set-option 'debug-gc-assert-parsed-dead #f)
           (set! stats (gc-live-object-stats))
-          (display "Dumping live object statistics.\n")
+          (ly:progress "Dumping live object statistics.\n")
           (dump-live-object-stats outfile)))
     (newline outfile)
     (let* ((stats (gc-stats)))
@@ -702,7 +702,8 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
          (mem (string->number (match:substring (car interesting) 1))))
     (format #t "VMDATA: ~a\n" mem)
     (display (gc-stats))
-    (if (> mem 100000)
+    (newline)
+    (if (> mem 500000)
         (begin (dump-gc-protects)
                (raise 1)))))
 
@@ -727,7 +728,7 @@ PIDs or the number of the process."
   "Exit function for lilypond"
   (if (not silently)
       (case status
-        ((0) (ly:success (_ "Compilation successfully completed")))
+        ((0) (ly:basic-progress (_ "Success: compilation successfully completed")))
         ((1) (ly:warning (_ "Compilation completed with warnings or errors")))
         (else (ly:message ""))))
   (exit status))
@@ -860,7 +861,8 @@ PIDs or the number of the process."
          (ly:set-option 'debug-gc-assert-parsed-dead #f)
          (if (ly:get-option 'debug-gc)
              (dump-gc-protects)
-             (ly:reset-all-fonts))))
+             (ly:reset-all-fonts))
+         (flush-all-ports)))
      files)
 
     ;; Ensure a notice re failed files is written to aggregate logfile.