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 (define (ly-eval x) (eval2 x #f))
64 (define (write-me n x)
76 (define (filter-list pred? list)
77 "return that part of LIST for which PRED is true."
79 (let* ((rest (filter-list pred? (cdr list))))
80 (if (pred? (car list))
81 (cons (car list) rest)
84 (define (filter-out-list pred? list)
85 "return that part of LIST for which PRED is true."
87 (let* ((rest (filter-list pred? (cdr list))))
88 (if (not (pred? (car list)))
89 (cons (car list) rest)
92 (define (uniqued-alist alist acc)
94 (if (assoc (caar alist) acc)
95 (uniqued-alist (cdr alist) acc)
96 (uniqued-alist (cdr alist) (cons (car alist) acc)))))
98 (define (uniq-list list)
100 (if (null? (cdr list))
102 (if (equal? (car list) (cadr list))
103 (uniq-list (cdr list))
104 (cons (car list) (uniq-list (cdr list)))))))
106 (define (alist<? x y)
107 (string<? (symbol->string (car x))
108 (symbol->string (car y))))
111 (map (lambda (x) (eval-string (ly-gulp-file x)))
121 (map (lambda (x) (eval-string (ly-gulp-file x)))
123 "grob-property-description.scm"
124 "translator-property-description.scm"
125 "interface-description.scm"
130 "music-functions.scm"
131 "music-property-description.scm"
133 "generic-property.scm"
134 "basic-properties.scm"
136 "grob-description.scm"