1 ;;;; lily.scm -- implement Scheme output routines for TeX and PostScript
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2001 Jan Nieuwenhuizen <janneke@gnu.org>
6 ;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 (use-modules (ice-9 regex))
12 ;;(write standalone (current-error-port))
16 (debug-enable 'backtrace)
19 (define point-and-click #f)
20 (define security-paranoia #f)
21 (define midi-debug #f)
23 (define (line-column-location line col file)
24 "Print an input location, including column number ."
25 (string-append (number->string line) ":"
26 (number->string col) " " file)
29 (define (line-location line col file)
30 "Print an input location, without column number ."
31 (string-append (number->string line) " " file)
34 ;; cpp hack to get useful error message
35 (define ifdef "First run this through cpp.")
36 (define ifndef "First run this through cpp.")
38 (define default-script-alist '())
39 (define font-name-alist '())
41 (if (not (defined? 'standalone))
42 (define standalone (not (defined? 'ly-gulp-file))))
44 ;; The regex module may not be available, or may be broken.
46 (let ((os (string-downcase (vector-ref (uname) 0))))
47 (not (equal? "cygwin" (substring os 0 (min 6 (string-length os)))))))
49 ;; If you have trouble with regex, define #f
51 ;;(define use-regex #f)
56 ;; URG guile-1.4/1.4.x compatibility
57 (if (not (defined? 'primitive-eval))
58 (define (primitive-eval form)
66 (define (write-me n x)
78 (define (filter-list pred? list)
79 "return that part of LIST for which PRED is true."
81 (let* ((rest (filter-list pred? (cdr list))))
82 (if (pred? (car list))
83 (cons (car list) rest)
86 (define (filter-out-list pred? list)
87 "return that part of LIST for which PRED is true."
89 (let* ((rest (filter-list pred? (cdr list))))
90 (if (not (pred? (car list)))
91 (cons (car list) rest)
94 (define (uniqued-alist alist acc)
96 (if (assoc (caar alist) acc)
97 (uniqued-alist (cdr alist) acc)
98 (uniqued-alist (cdr alist) (cons (car alist) acc)))))
100 (define (uniq-list list)
102 (if (null? (cdr list))
104 (if (equal? (car list) (cadr list))
105 (uniq-list (cdr list))
106 (cons (car list) (uniq-list (cdr list)))))))
108 (define (alist<? x y)
109 (string<? (symbol->string (car x))
110 (symbol->string (car y))))
113 (map (lambda (x) (eval-string (ly-gulp-file x)))
126 (define (ly-load x) (eval-string (ly-gulp-file x)))
132 "grob-property-description.scm"
133 "translator-property-description.scm"
134 "context-description.scm"
135 "interface-description.scm"
140 "music-functions.scm"
141 "music-property-description.scm"
143 "generic-property.scm"
144 "basic-properties.scm"
146 "grob-description.scm"