]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/program-option.cc
bump version
[lilypond.git] / lily / program-option.cc
index 279cb376863840674ba5061d30d501b0cea56e17..02213e4c71a68d1cfdddc2276e7e1b35580f36bd 100644 (file)
@@ -21,6 +21,7 @@ using namespace std;
 /* Write midi as formatted ascii stream? */
 bool do_midi_debugging_global;
 bool use_object_keys;
+bool debug_skylines;
 
 /*
   Backwards compatibility.
@@ -34,7 +35,6 @@ bool profile_property_accesses = false;
 bool do_internal_type_checking_global;
 bool strict_infinity_checking = false; 
 
-
 static SCM option_hash;
 
 void internal_set_option (SCM var, SCM val)
@@ -68,6 +68,11 @@ void internal_set_option (SCM var, SCM val)
       do_internal_type_checking_global = to_boolean (val);
       val = scm_from_bool (to_boolean (val));
     }
+  else if (var == ly_symbol2scm ("debug-gc-assert-parsed-dead"))
+    {
+      parsed_objects_should_be_dead = to_boolean (val);
+      val = scm_from_bool (parsed_objects_should_be_dead);
+    }
   else if (var == ly_symbol2scm ("old-relative"))
     {
       lily_1_8_relative = to_boolean (val);
@@ -85,6 +90,11 @@ void internal_set_option (SCM var, SCM val)
       strict_infinity_checking = to_boolean (val);
       val = scm_from_bool (to_boolean (val));
     }
+  else if (var == ly_symbol2scm ("debug-skylines"))
+    {
+      debug_skylines = to_boolean (val);
+      val = scm_from_bool (to_boolean (val));
+    }
 }
 
 ssize const HELP_INDENT = 30;
@@ -133,7 +143,7 @@ get_help_string ()
     }
 
   string help ("Options supported by ly:set-option\n\n");
-  vector_sort (opts, string_compare);
+  vector_sort (opts, less<string> ());
   for (vsize i = 0; i < opts.size (); i++)
     help += opts[i];
 
@@ -204,6 +214,9 @@ LY_DEFINE (ly_command_line_verbose_p, "ly:command-line-verbose?", 0, 0, 0, (),
   return scm_from_bool (be_verbose_global);
 }
 
+
+
+
 LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
           "Get a global option setting.")
 {
@@ -211,3 +224,12 @@ LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
                   SCM_ARG1, __FUNCTION__, "symbol");
   return scm_hashq_ref (option_hash, var, SCM_BOOL_F);
 }
+
+
+bool
+get_program_option (const char *s)
+{
+  SCM sym = ly_symbol2scm (s);
+
+  return to_boolean (ly_get_option (sym));
+}