1 ;;;; standalone.scm -- implement Scheme stuff for use without LilyPond
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2007 Jan Nieuwenhuizen <janneke@gnu.org>
6 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl>
9 (use-modules (ice-9 rdelim))
11 (define standalone (not (defined? 'ly:gulp-file)))
12 ;;(write standalone (current-error-port))
14 (define (gulp-file name)
15 (let* ((file (open-input-file name))
16 (text (read-delimited "" file)))
20 (define (scm-gulp-file name)
22 (cons (string-append (getenv "LILYPOND_DATADIR") "/ly")
23 (cons (string-append (getenv "LILYPOND_DATADIR") "/ps")
25 (let ((path (%search-load-path name)))
30 (define (scm-number->string x)
31 (let ((e (inexact->exact x)))
32 (string-append (if (= e x)
37 (define ly:gulp-file scm-gulp-file)
38 (define ly:number->string scm-number->string)
40 (eval-string (ly:gulp-file "lily.scm"))