Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-12-14 22:40:41 +0300
committerChristopher Faylor <me@cgf.cx>2002-12-14 22:40:41 +0300
commitbd2001aec07451e28c3ea5370af7b3caa867461a (patch)
tree13c6de8ddf5a524c5e98908987ee336071c8bc66 /winsup/cygwin/fhandler_termios.cc
parent373c3857c2e62f045fe70eee97fd9035b03cabd7 (diff)
* fhandler_termios.cc (fhandler_termios::line_edit): Call accept_input() in
character processing loop. Set return value independently of input_done.
Diffstat (limited to 'winsup/cygwin/fhandler_termios.cc')
-rw-r--r--winsup/cygwin/fhandler_termios.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index 6fa5cf984..16a826bd9 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -308,7 +308,8 @@ fhandler_termios::line_edit (const char *rptr, int nread, int always_accept)
else if (CCEQ (tc->ti.c_cc[VEOF], c))
{
termios_printf ("EOF");
- input_done = 1;
+ (void) accept_input();
+ ret = line_edit_input_done;
continue;
}
else if (CCEQ (tc->ti.c_cc[VEOL], c) ||
@@ -323,20 +324,21 @@ fhandler_termios::line_edit (const char *rptr, int nread, int always_accept)
c = cyg_tolower (c);
put_readahead (c);
+ if (!iscanon || always_accept || input_done)
+ {
+ (void) accept_input();
+ ret = line_edit_input_done;
+ input_done = 0;
+ }
if (tc->ti.c_lflag & ECHO)
doecho (&c, 1);
}
- if (!iscanon || always_accept)
- set_input_done (ralen > 0);
+ if ((!iscanon || always_accept) && ralen > 0)
+ ret = line_edit_input_done;
if (sawsig)
ret = line_edit_signalled;
- else if (input_done)
- {
- ret = line_edit_input_done;
- (void) accept_input ();
- }
return ret;
}