bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] stdin still echoed to stdout even with --noCIN


From: Peter Teeson
Subject: Re: [Bug-apl] stdin still echoed to stdout even with --noCIN
Date: Fri, 23 May 2014 13:33:09 -0400

Hi Jürgen:
Thanks for your suggestion but 
CinOut::overflow(int c)
{
   Q(uprefs.echo_current_file());

    

   if (!uprefs.echo_current_file())   return 0;

CInOut::overflow(int c) is never called. Please see my next post.

Peter

On 2014-05-23, at 8:43 AM, Juergen Sauermann <address@hidden> wrote:
Hi Peter,

the decision if a cin character, say c, should be echoed or not is made
in CinOut::overflow(int c) by asking uprefs.echo_current_file().
Note that uprefs.echo_current_file() not only depends on the command
line option --noCIN but also on its position in relation to -f (if used) etc. and
that it may return different values for different input files.

You can use Q(uprefs.echo_current_file()) at the beginning of
CinOut::overflow(int c) (creating a lot of debug output).

If the input is echoed even though it shouldn't then there are two possible culprits:

1. uprefs.echo_current_file() returns true, or
2. ECHO bit in then c_lflag of the terminal attributes is set (check with stty -a)

The color of the echoed input might give you a hint: if the color changes before the
echoed input changed then we have 1, if not then we have 2,

/// Jürgen


reply via email to

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