lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another stderr/stdout question


From: Phil Holmes
Subject: Re: Another stderr/stdout question
Date: Fri, 3 Feb 2012 18:02:07 -0000

----- Original Message ----- From: "David Kastrup" <address@hidden>
To: <address@hidden>
Sent: Friday, February 03, 2012 5:20 PM
Subject: Re: Another stderr/stdout question


"Phil Holmes" <address@hidden> writes:

The regtest option-help.ly emits the help text for ly:set-option.  The
idea is that the logfiles will thus be compared in the regtest
checking.  Only problem is that the list seems to go to stdout and the
logfiles are produced from stderr, so no checking actually occurs,
AFAICS.  This has the side effect (which is how I spotted it) of
sending the help text to the terminal screen rather than to logfiles,
when make doc is run.

What do we think: is it going to the wrong place, or should we do
something else with the regtest and make doc?

It is going to the wrong place.  At the very least, it should go to
current-output-port (as a function called from Scheme), but it bypasses
everything and goes straight to stdout.

The normal thing for it would be to get an optional port argument
defaulting to current-output-port.  Whether or not it does the
interpretation #f -> returned string, #t -> current-output-port that
format does is not all that important.  That would be nice but optional.

But stdout is not the right place to use for a Scheme function.

--
David Kastrup

Think program-option-scheme.cc is the guilty party:

LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (),
          "Print @code{ly:set-option} usage.")
{
 string help = get_help_string ();
 puts (help.c_str ());
 fflush (stdout);

 return SCM_UNSPECIFIED;
}



--
Phil Holmes





reply via email to

[Prev in Thread] Current Thread [Next in Thread]