]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Amend 16e626a85244: Forgot to change the function documentation string
[lilypond.git] / scm / lily.scm
index 55d989e2d2ba7d8260f90955bbf86d0cc720a9c6..b82cd08aa2a2630077c06e38950eab438df7aa50 100644 (file)
@@ -120,6 +120,10 @@ jobs.")
     (log-file #f
 "If string FOO is given as argument, redirect
 output to log file `FOO.log'.")
+    (max-markup-depth 1024
+"Maximum depth for the markup tree. If a markup has more levels,
+assume it will not terminate on its own, print a warning and return a
+null markup instead.")
     (midi-extension ,(if (eq? PLATFORM 'windows)
                          "mid"
                          "midi")
@@ -348,11 +352,10 @@ Print a message at LOCATION if any predicate failed."
     (define (helper pred? arg count)
       (if (not (pred? arg))
           (begin
-            (ly:input-message
+            (ly:input-warning
              location
-             (format
-              #f (_ "wrong type for argument ~a.  Expecting ~a, found ~s")
-              count (type-name pred?) arg))
+             (_ "wrong type for argument ~a.  Expecting ~a, found ~s")
+              count (type-name pred?) arg)
             #f)
           #t))
 
@@ -642,7 +645,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 +665,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 +705,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 +731,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 +864,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.