X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fprogram-option-scheme.cc;h=616e99397a4d2c8c70b7cd5235bf08a9350fcf35;hb=ce75448434cbce3925cd93bc203d129962517037;hp=2c3d60dc8792ebf0f34d9ca01a55f0c7b17e0c82;hpb=07e5858c31fb485fefecfd5c369be59af0e9f02f;p=lilypond.git diff --git a/lily/program-option-scheme.cc b/lily/program-option-scheme.cc index 2c3d60dc87..616e99397a 100644 --- a/lily/program-option-scheme.cc +++ b/lily/program-option-scheme.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2001--2011 Han-Wen Nienhuys + Copyright (C) 2001--2012 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -123,7 +123,11 @@ internal_set_option (SCM var, val = val_scm_bool; } else if (varstr == "warning-as-error") - val = val_scm_bool; + { + /* warning_as_error is defined in flower/warn.cc */ + warning_as_error = valbool; + val = val_scm_bool; + } else if (varstr == "music-strings-to-paths") { music_strings_to_paths = valbool; @@ -183,12 +187,12 @@ get_help_string () return help; } -LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (), - "Print @code{ly:set-option} usage.") +LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 1, 0, (SCM port), + "Print @code{ly:set-option} usage. Optional @var{port} argument" + "for the destination defaults to current output port.") { - string help = get_help_string (); - puts (help.c_str ()); - fflush (stdout); + SCM str = scm_from_locale_string (get_help_string ().c_str ()); + scm_write_line (str, port); return SCM_UNSPECIFIED; }