]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
*** empty log message ***
[lilypond.git] / scm / lily.scm
index abf238871a2a395a8ec4b6e0debdd92af66614dc..d73b883b515ce795d105364447f513409666000b 100644 (file)
@@ -6,6 +6,33 @@
 ;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 
+(for-each (lambda (x)
+           (ly:add-option (car x) (cadr x) (caddr x)))
+         
+         '((point-and-click #t "use point & click")
+           (midi-debug #f "generate human readable MIDI")
+           (internal-type-checking #f "check every property assignment for types")
+           (parse-protect #t    "continue when finding errors in inline
+scheme are caught in the parser. If off, halt 
+on errors, and print a stack trace.")
+           (old-relative #f
+                         "relative for simultaneous music works
+similar to chord syntax")
+
+           (resolution 101 "resolution for generating bitmaps")
+           (anti-alias-factor 1 "render at higher resolution and scale down result\nto prevent jaggies in PNG")
+           (preview-include-book-title #t "include book-titles in preview images.")
+           (gs-font-load #f
+                         "load fonts via Ghostscript.")
+           (delete-intermediate-files #f
+                                      "delete unusable PostScript files")
+           (verbose #f "value for the --verbose flag")
+           (ttf-verbosity 0
+                          "how much verbosity for TTF font embedding?")
+           (debug-gc #f
+                     "dump GC protection info")))
+
+
 (if (defined? 'set-debug-cell-accesses!)
     (set-debug-cell-accesses! #f))
 
@@ -268,6 +295,7 @@ The syntax is the same as `define*-public'."
                    (lambda (a b)
                      (< (object-address (car a))
                         (object-address (car b))))))
+
         (out-file-name (string-append
                         "gcstat-" (number->string gc-protect-stat-count)
                         ".scm"))
@@ -287,7 +315,24 @@ The syntax is the same as `define*-public'."
                 " ")
                "\n")))
           protects))
-     outfile)))
+     outfile)
+
+    (if (defined? 'gc-live-object-stats)
+       (let*
+           ((dummy (gc))
+            (dummy2 (gc))
+            (stats (gc-live-object-stats))
+            )
+
+         (for-each
+          (lambda (x)
+            (format outfile "~a: ~a\n" (car x) (cdr x)))
+          (sort (gc-live-object-stats)
+                (lambda (x y)
+                  (string<? (car x) (car y)))))
+          ))
+
+    ))
 
 (define-public (tweak-grob-property grob sym val)
   (set! (ly:grob-property grob sym) val))
@@ -326,7 +371,7 @@ The syntax is the same as `define*-public'."
         (lambda () (ly:parse-file file-name))
         (lambda (x . args) (handler x file-name)))
 
-  (if #t
+  (if (ly:get-option 'debug-gc)
       (dump-gc-protects)))
 
 (use-modules (scm editor))