X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Flily.scm;h=efa40f338be6236123df3c4c50d881e573af4155;hb=70cc70f3a6183472b93fc4c2b4c60cc0375b6d64;hp=e03eb489a140fc8070c906822572bd67cc3487e7;hpb=827797f2d209e14f09a17017e10ea27d17db4a8e;p=lilypond.git diff --git a/scm/lily.scm b/scm/lily.scm index e03eb489a1..efa40f338b 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -2,7 +2,7 @@ ;;;; ;;;; source file of the GNU LilyPond music typesetter ;;;; -;;;; (c) 1998--2006 Jan Nieuwenhuizen +;;;; (c) 1998--2007 Jan Nieuwenhuizen ;;;; Han-Wen Nienhuys ;; Internationalisation: (_i "to be translated") gets an entry in the @@ -17,8 +17,6 @@ (read-enable 'positions) (debug-enable 'debug) - - (define scheme-options-definitions `( @@ -42,12 +40,15 @@ ensure that all refs to parsed objects are dead. This is an internal option, an (debug-skylines #f "debug skylines") (delete-intermediate-files #f "delete unusable PostScript files") - (dump-profile #f "dump timing information for each file") + (dump-profile #f "dump memory and time information for each file") + (dump-cpu-profile #f "dump timing information (system-dependent)") (dump-signatures #f "dump output signatures of each system. Used for regression testing.") (eps-box-padding #f "Pad EPS bounding box left edge. Guarantee alignment between systems in LaTeX.") (gs-load-fonts #f "load fonts via Ghostscript.") + (gs-load-lily-fonts #f + "load only lilypond fonts via Ghostscript.") (gui #f "running from gui; redirect stderr to log file") (help #f "show this help.") (include-book-title-preview #t "include book-titles in preview images.") @@ -105,6 +106,7 @@ on errors, and print a stack trace.") (use-modules (ice-9 regex) (ice-9 safe) + (ice-9 format) (ice-9 rdelim) (ice-9 optargs) (oop goops) @@ -115,6 +117,15 @@ on errors, and print a stack trace.") (scm memory-trace) (scm coverage) ) +(define-public fancy-format format) +(define-public (ergonomic-simple-format dest . rest) + "Like ice-9 format, but without the memory consumption." + + (if (string? dest) + (apply simple-format (cons #f (cons dest rest))) + (apply simple-format (cons dest rest)))) + +(define format ergonomic-simple-format) ;; my display (define-public (myd k v) (display k) (display ": ") (display v) (display ", ") @@ -147,14 +158,6 @@ on errors, and print a stack trace.") (define-public parser #f) -(define-public (lilypond-version) - (string-join - (map (lambda (x) (if (symbol? x) - (symbol->string x) - (number->string x))) - (ly:version)) - ".")) - ;; TeX C++ code actually hooks into TEX_STRING_HASHLIMIT (define-public TEX_STRING_HASHLIMIT 10000000) @@ -281,6 +284,14 @@ The syntax is the same as `define*-public'." safe-objects)) ,safe-symbol))) +(define-safe-public (lilypond-version) + (string-join + (map (lambda (x) (if (symbol? x) + (symbol->string x) + (number->string x))) + (ly:version)) + ".")) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; init pitch system @@ -405,7 +416,9 @@ The syntax is the same as `define*-public'." (ly:progress "\nWriting timing to ~a..." outname) (format (open-file outname "w") "time: ~a\ncells: ~a\n" - (car diff) + (if (ly:get-option 'dump-cpu-profile) + (car diff) + 0) (cadr diff) )))