]> git.donarmstrong.com Git - lilypond.git/blob - scm/lily.scm
a84fbdf0410cc4a9865a0fa7b343462dce031e54
[lilypond.git] / scm / lily.scm
1 ;;;; lily.scm -- implement Scheme output routines for TeX and PostScript
2 ;;;;
3 ;;;;  source file of the GNU LilyPond music typesetter
4 ;;;; 
5 ;;;; (c) 1998--2001 Jan Nieuwenhuizen <janneke@gnu.org>
6 ;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
7
8 ;;; Library funtions
9
10 (use-modules (ice-9 regex))
11
12 ;;(write standalone (current-error-port))
13
14 ;;; General settings
15
16 (debug-enable 'backtrace)
17
18
19 (define point-and-click #f)
20 (define security-paranoia #f)
21 (define midi-debug #f)
22
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)
27   )
28
29 (define (line-location line col file)
30   "Print an input location, without column number ."
31   (string-append (number->string line) " " file)
32   )
33
34 ;; cpp hack to get useful error message
35 (define ifdef "First run this through cpp.")
36 (define ifndef "First run this through cpp.")
37   
38 (define default-script-alist '())
39 (define font-name-alist  '())
40
41 (if (not (defined? 'standalone))
42     (define standalone (not (defined? 'ly-gulp-file))))
43
44 ;; The regex module may not be available, or may be broken.
45 (define use-regex
46   (let ((os (string-downcase (vector-ref (uname) 0))))
47     (not (equal? "cygwin" (substring os 0 (min 6 (string-length os)))))))
48
49 ;; If you have trouble with regex, define #f
50 (define use-regex #t)
51 ;;(define use-regex #f)
52
53
54 ;;; Un-assorted stuff
55
56 ;; URG guile-1.4/1.4.x compatibility
57 (define (ly-eval x) (eval2 x #f))
58
59 (define (sign x)
60   (if (= x 0)
61       1
62       (if (< x 0) -1 1)))
63
64
65 (map (lambda (x) (eval-string (ly-gulp-file x)))
66      '("output-lib.scm"
67        "tex.scm"
68        "ps.scm"
69        "ascii-script.scm"
70        ))
71
72 (if (not standalone)
73     (map (lambda (x) (eval-string (ly-gulp-file x)))
74          '("c++.scm"
75            "grob-property-description.scm"
76            "translator-property-description.scm"
77            "interface-description.scm"
78            "beam.scm"
79            "clef.scm"
80            "slur.scm"
81            "font.scm"
82            "music-functions.scm"
83            "auto-beam.scm"
84            "generic-property.scm"
85            "basic-properties.scm"
86            "chord-name.scm"
87            "grob-description.scm"
88            "script.scm"
89            "drums.scm"
90            "midi.scm"
91            )))
92
93