X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fprogram-option-scheme.cc;h=820faf5bfea907bc0f2870001261a036ad12b79e;hb=f166a6e3a57e6cff6dbaf97b2c47edc114c8ec2f;hp=2d65001a1452b8667b2c405fd3715aa8b5eff828;hpb=c618987255838a2af9813a69eb1f4f20a8df6315;p=lilypond.git diff --git a/lily/program-option-scheme.cc b/lily/program-option-scheme.cc index 2d65001a14..820faf5bfe 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 @@ -187,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; }