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
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
|