]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/scm-option.cc
patch::: 1.5.4.jcn4
[lilypond.git] / lily / scm-option.cc
index 666f08c5759e6af61129b7aa9ff65fd2c1d27ed1..525c2e54f3212b376497c4b9bbeb0b9950ad838b 100644 (file)
 #include "lily-guile.hh"
 #include "scm-option.hh"
 
-/*
-  TODO: mooie onschuldige test, en koel om allerleide dingen te kunnen zetten,
-  maar is dit nou wel handig voor gebruikert?
-
-  -X, of -fps is hendiger dan
 
-          -e "(set-lily-option 'midi-debug #t)'
+/*
+  This interface to option setting is meant for setting options are
+  useful to a limited audience. The reason for this interface is that
+  making command line options clutters up the command-line option name
+  space.
 
-  [niet voor niets tiepo in 139 announs..]
 
-*/
+  preferably, also dont use TESTING_LEVEL_GLOBAL, since it defeats
+  another purpose of this very versatile interface, which is to
+  support multiple debug/testing options concurrently.
+  
+ */
 
 
 /* Write midi as formatted ascii stream? */
 bool midi_debug_global_b;
+
 /* General purpose testing flag */
 int testing_level_global;
 
 
+
 /*
 
   TODO: verzin iets tegen optie code bloot
@@ -49,13 +53,20 @@ Switch on any experimental features.  Not for general public use.
 SCM
 set_lily_option (SCM var, SCM val)
 {
+  /*
+    Scheme option usage:
+    lilypond -e "(set-lily-option 'help 0)"
+   */
   if (var == ly_symbol2scm ("help"))
     {
       cout << '\n';
       cout << _ ("Scheme options:");
-      cout << "help"; 
-      cout << "midi-debug (boolean)"; 
-      cout << "testing-level (int)"; 
+      cout << '\n';
+      cout << "  help (any-symbol)"; 
+      cout << '\n';
+      cout << "  midi-debug (boolean)"; 
+      cout << '\n';
+      cout << "  testing-level (int)"; 
       cout << '\n';
       exit (0);
     }
@@ -90,7 +101,7 @@ set_lily_option (SCM var, SCM val)
 static void
 init_functions ()
 {
-  scm_make_gsubr ("set-lily-option", 2, 0, 0, (Scheme_function_unknown)set_lily_option);
+  scm_c_define_gsubr ("set-lily-option", 2, 0, 0, (Scheme_function_unknown)set_lily_option);
 }