diff options
author | Christopher Faylor <me@cgf.cx> | 2012-11-08 21:27:00 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-11-08 21:27:00 +0400 |
commit | aaa812cbd0479190158b2f6bb6dff1fd8e0cc5d9 (patch) | |
tree | 9f3e32f762695de42b664b381fae6f2f1761e75f /winsup/cygwin/fhandler_termios.cc | |
parent | 61746d6ae850aa6a89b0c0b00c609011c6d0ade9 (diff) |
* fhandler_termios.cc (fhandler_termios::line_edit): Don't do special character
handling when stopped by CTRL-S.
* fhandler_tty.cc (bytes_available): Add arguments to debug_only_printf call.
* sigproc.cc (proc_subproc): Simplify some if logic.
Diffstat (limited to 'winsup/cygwin/fhandler_termios.cc')
-rw-r--r-- | winsup/cygwin/fhandler_termios.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 956786fae..611677868 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -239,26 +239,6 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti) paranoid_printf ("char %0c", c); - /* Check for special chars */ - - if (c == '\r') - { - if (ti.c_iflag & IGNCR) - continue; - if (ti.c_iflag & ICRNL) - { - c = '\n'; - set_input_done (iscanon); - } - } - else if (c == '\n') - { - if (ti.c_iflag & INLCR) - c = '\r'; - else - set_input_done (iscanon); - } - if (ti.c_iflag & ISTRIP) c &= 0x7f; if (ti.c_lflag & ISIG) @@ -298,11 +278,31 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti) else if ((ti.c_iflag & IXANY) && tc ()->output_stopped) goto restart_output; } + /* Check for special chars */ + + if (c == '\r') + { + if (ti.c_iflag & IGNCR) + continue; + if (ti.c_iflag & ICRNL) + { + c = '\n'; + set_input_done (iscanon); + } + } + else if (c == '\n') + { + if (ti.c_iflag & INLCR) + c = '\r'; + else + set_input_done (iscanon); + } if (iscanon && ti.c_lflag & IEXTEN && CCEQ (ti.c_cc[VDISCARD], c)) { ti.c_lflag ^= FLUSHO; continue; } + if (!iscanon) /* nothing */; else if (CCEQ (ti.c_cc[VERASE], c)) |