2 scm-option.cc -- implement option setting from Scheme
4 source file of the GNU LilyPond music typesetter
6 (c) 2001--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
12 #include "lily-guile.hh"
13 #include "scm-option.hh"
17 This interface to option setting is meant for setting options are
18 useful to a limited audience. The reason for this interface is that
19 making command line options clutters up the command-line option name
23 preferably, also dont use TESTING_LEVEL_GLOBAL, since it defeats
24 another purpose of this very versatile interface, which is to
25 support multiple debug/testing options concurrently.
30 /* Write midi as formatted ascii stream? */
31 bool midi_debug_global_b;
33 /* General purpose testing flag */
34 int testing_level_global;
40 TODO: verzin iets tegen optie code bloot
43 other interesting stuff to add:
45 @item -T,--no-timestamps
46 don't timestamp the output
49 Switch on any experimental features. Not for general public use.
54 set_lily_option (SCM var, SCM val)
58 lilypond -e "(set-lily-option 'help 0)"
60 if (var == ly_symbol2scm ("help"))
63 cout << _ ("Scheme options:");
65 cout << " help (any-symbol)";
67 cout << " midi-debug (boolean)";
69 cout << " testing-level (int)";
73 else if (var == ly_symbol2scm ("midi-debug"))
75 midi_debug_global_b = to_boolean (val);
77 else if (var == ly_symbol2scm ("testing-level"))
79 testing_level_global = gh_scm2int (val);
81 else if (var == ly_symbol2scm ("find-old-relative"))
84 Seems to have been broken for some time!
86 @item -Q,--find-old-relative
87 show all changes needed to convert a file to relative octave syntax.
97 return SCM_UNSPECIFIED;
104 scm_c_define_gsubr ("set-lily-option", 2, 0, 0, (Scheme_function_unknown)set_lily_option);
108 ADD_SCM_INIT_FUNC (init_functions_sopt, init_functions);