]> git.donarmstrong.com Git - lilypond.git/blob - scm/lily.scm
patch::: 1.3.139.jcn2
[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   
35 (define default-script-alist '())
36 (define font-name-alist  '())
37
38 (if (not (defined? 'standalone))
39     (define standalone (not (defined? 'ly-gulp-file))))
40
41 ;; The regex module may not be available, or may be broken.
42 (define use-regex
43   (let ((os (string-downcase (vector-ref (uname) 0))))
44     (not (equal? "cygwin" (substring os 0 (min 6 (string-length os)))))))
45
46 ;; If you have trouble with regex, define #f
47 (define use-regex #t)
48 ;;(define use-regex #f)
49
50
51 ;;; Un-assorted stuff
52
53 ;; URG guile-1.3/1.4 compatibility
54 (define (ly-eval x) (eval2 x #f))
55
56 (define (sign x)
57   (if (= x 0)
58       1
59       (if (< x 0) -1 1)))
60
61
62 ;;(define major-scale
63 ;;  '(
64 ;;    (0 . 0)
65 ;;    (1 . 0)
66 ;;    (2 . 0)
67 ;;    (3 . 0)
68 ;;    (4 . 0)
69 ;;    (5 . 0)
70 ;;    (6 . 0)
71 ;;   ))
72
73
74 (map (lambda (x) (eval-string (ly-gulp-file x)))
75      '("output-lib.scm"
76        "tex.scm"
77        "ps.scm"
78        "ascii-script.scm"
79        ))
80
81 (if (not standalone)
82     (map (lambda (x) (eval-string (ly-gulp-file x)))
83          '("c++.scm"
84            "grob-property-description.scm"
85            "translator-property-description.scm"
86            "interface-description.scm"
87            "beam.scm"
88            "clef.scm"
89            "slur.scm"
90            "font.scm"
91            "music-functions.scm"
92            "auto-beam.scm"
93            "generic-property.scm"
94            "basic-properties.scm"
95            "chord-name.scm"
96            "grob-description.scm"
97            "script.scm"
98            "midi.scm"
99            )))
100
101