]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Introduce a maximum depth for markup evaluation
[lilypond.git] / scm / lily.scm
index f7e53cb1793838947ea2072f9b8ae75c9dc5ffce..f3ce9c33c0cb10215eafe252637df72ff719f566 100644 (file)
@@ -120,6 +120,9 @@ 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 that
+it will not terminate at all and print out a warning, but continue processing.")
     (midi-extension ,(if (eq? PLATFORM 'windows)
                          "mid"
                          "midi")
@@ -348,11 +351,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))
 
@@ -861,7 +863,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.