bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Patch for quote-quad and aplwrap


From: Juergen Sauermann
Subject: Re: [Bug-apl] Patch for quote-quad and aplwrap
Date: Tue, 26 Aug 2014 16:54:50 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0

Hi David,

thanks, included in SVN 449.

If the point is to get rid of the duplicated prompt on cerr and cout then
it might be simpler to disable CIN echo (eg. start apl with --noCIN) instead
of matching cout with cerr.

/// Jürgen


On 08/24/2014 09:12 PM, David B. Lamkins wrote:
Thanks for the pointer to CinOut::overflow(). That's the part I was
missing.

The attached patch ensures that no_readline() changes pad characters to
spaces before pushing the prompt onto stdin. I've also reverted your
patch to CInOut::overflow().

Here's the explanation:

aplwrap watches both stout and stderr. When there's a prompted
quote-quad input, aplwrap sees the printed prompt. It also sees -- on
stderr -- the prompt as pushed back onto stdin. Because these two
prompts print on different streams, aplwrap is able to match them and
suppress printing of the stderr version of the prompt.

With CInOut::overflow() echoing stdin to stdout (as it does in SVN 447),
aplwrap sees a doubled prompt on stdout, leaving no way for aplwrap to
infer the presence of a prompt and suppress the doubled output. That's
why I reverted CInOut::overflow() to echo to stderr.

The second part of the patch ensures that pad characters in the
quote-quad prompt aren't pushed onto stdin. With this patch, the stdout
and stderr representations of the prompt are identical.



reply via email to

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