]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/program-option-scheme.cc
Imported Upstream version 2.14.2
[lilypond.git] / lily / program-option-scheme.cc
index 1e03c5f951bae8e38a4d8d257205d206f60068e4..63266566aca22d3ab9a0a221bcdba4e9405ff579 100644 (file)
@@ -1,9 +1,20 @@
 /*
-  program-option-scheme.cc -- implement option setting from Scheme
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the GNU LilyPond music typesetter
+  Copyright (C) 2001--2011  Han-Wen Nienhuys <hanwen@xs4all.nl>
 
-  (c) 2001--2009  Han-Wen Nienhuys <hanwen@xs4all.nl>
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "program-option.hh"
@@ -23,6 +34,7 @@ bool debug_skylines;
 bool debug_property_callbacks;
 bool debug_page_breaking_scoring;
 
+bool music_strings_to_paths;
 bool relative_includes;
 
 /*
@@ -113,6 +125,13 @@ internal_set_option (SCM var,
       relative_includes = to_boolean (val);
       val = scm_from_bool (to_boolean (val));
     }
+  else if (var == ly_symbol2scm ("warning-as-error"))
+    val = scm_from_bool (to_boolean (val));
+  else if (var == ly_symbol2scm ("music-strings-to-paths"))
+    {
+      music_strings_to_paths = to_boolean (val);
+      val = scm_from_bool (to_boolean (val));
+    }
 
   scm_hashq_set_x (option_hash, var, val);
 }
@@ -181,7 +200,8 @@ LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (),
 
 LY_DEFINE (ly_add_option, "ly:add-option", 3, 0, 0,
           (SCM sym, SCM val, SCM description),
-          "Add a program option @var{sym} with default @var{val}.")
+          "Add a program option @var{sym}.  @var{val} is the default"
+          " value and @var{description} is a string description.")
 {
   if (!option_hash)
     option_hash = scm_permanent_object (scm_c_make_hash_table (11));