- (c) 2001--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "program-option.hh"
-
-#include <cstdio>
-#include <string.h>
-
-#include "string-convert.hh"
-#include "protected-scm.hh"
-#include "parse-scm.hh"
-#include "warn.hh"
-#include "main.hh"
-
-/* Write midi as formatted ascii stream? */
-bool do_midi_debugging_global;
-bool use_object_keys;
-
-/*
- Backwards compatibility.
-*/
-bool lily_1_8_relative = false;
-bool lily_1_8_compatibility_used = false;
-bool profile_property_accesses = false;
-/*
- crash if internally the wrong type is used for a grob property.
-*/
-bool do_internal_type_checking_global;
-
-Protected_scm option_hash_;
-
-void internal_set_option (SCM var, SCM val)
-{
- scm_hashq_set_x (option_hash_, var, val);
-
- if (0)
- ;
- else if (var == ly_symbol2scm ("profile-property-accesses"))
- {
- profile_property_accesses = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("midi-debug"))
- {
- do_midi_debugging_global = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("point-and-click"))
- {
- point_and_click_global = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("parse-protect"))
- {
- parse_protect_global = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("internal-type-checking"))
- {
- do_internal_type_checking_global = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("old-relative"))
- {
- lily_1_8_relative = to_boolean (val);
- /* Needs to be reset for each file that uses this option. */
- lily_1_8_compatibility_used = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
- else if (var == ly_symbol2scm ("object-keys"))
- {
- use_object_keys = to_boolean (val);
- val = scm_from_bool (to_boolean (val));
- }
-}