]> git.donarmstrong.com Git - lilypond.git/blob - lily/scheme-option.cc
patch::: 1.3.139.jcn1
[lilypond.git] / lily / scheme-option.cc
1 /*   
2   scheme-option.cc --  implement option setting from Scheme
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "lily-guile.hh"
11
12 /*
13   TODO: mooie onschuldige test, en koel om allerleide dingen te kunnen zetten,
14   maar is dit nou wel handig voor gebruikert?
15
16   -X, of -fps is hendiger dan
17
18           -e "(set-lily-option 'midi-debug #t)'
19
20   [niet voor niets tiepo in 139 announs..]
21
22 */
23 /* Write midi as formatted ascii stream? */
24 bool midi_debug_global_b;
25
26
27 /*
28
29   Todo: print help text.
30
31
32   other interesting stuff to add:
33
34 @item -T,--no-timestamps
35 don't timestamp the output
36
37 @item -t,--test
38 Switch on any experimental features.  Not for general public use.
39
40  */
41
42 SCM
43 set_lily_option (SCM var, SCM val)
44 {
45   if (var == ly_symbol2scm ("midi-debug"))
46     {
47       midi_debug_global_b = to_boolean (val);
48     }
49   else if (var == ly_symbol2scm ("find-old-relative"))
50     {
51       /*
52         Seems to have been broken for some time!
53         
54         @item  -Q,--find-old-relative
55         show all changes needed to convert a file to  relative octave syntax.
56
57
58         
59       */
60
61       ;
62       
63     }
64
65   return SCM_UNSPECIFIED;
66 }
67
68
69 static void
70 init_functions ()
71 {
72   scm_make_gsubr ("set-lily-option", 2, 0, 0, (Scheme_function_unknown)set_lily_option);
73 }
74
75
76 ADD_SCM_INIT_FUNC (init_functions_sopt, init_functions);
77
78