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: Juergen Sauermann
Subject: Re: [Bug-apl] stdin still echoed to stdout even with --noCIN
Date: Fri, 23 May 2014 14:43:37 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

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


On 05/22/2014 09:35 PM, Peter Teeson wrote:
In Xcode I pass TERM=xterm-256color as an env var. This is the value Terminal uses.
Also --noCIN as an option at launch time to turn off echoing stdin.

Set breakpoint here in UserPreferences.cc:
         else if (!strcmp(opt, "--noCIN"))
            {
              do_not_echo = true;
            }
and we did break and it got set.
(lldb) po do_not_echo
true

But APL is still echoing stdin as well as stdout to the Xcode console pane.
How best to track this down in Input/Output?

respect….

Peter





reply via email to

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