* fhandler_termios.cc (fhandler_termios::line_edit): Call accept_input() in

character processing loop.  Set return value independently of input_done.
This commit is contained in:
Christopher Faylor 2002-12-14 19:40:41 +00:00
parent 373c3857c2
commit bd2001aec0
2 changed files with 16 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2002-12-14 Steve Osborn <bub@io.com>
* fhandler_termios.cc (fhandler_termios::line_edit): Call
accept_input() in character processing loop. Set return value
independently of input_done.
2002-12-14 Christopher Faylor <cgf@redhat.com> 2002-12-14 Christopher Faylor <cgf@redhat.com>
* fhandler.cc (fhandler_base::read): Signal event, if necessary, and * fhandler.cc (fhandler_base::read): Signal event, if necessary, and

View File

@ -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)) else if (CCEQ (tc->ti.c_cc[VEOF], c))
{ {
termios_printf ("EOF"); termios_printf ("EOF");
input_done = 1; (void) accept_input();
ret = line_edit_input_done;
continue; continue;
} }
else if (CCEQ (tc->ti.c_cc[VEOL], c) || 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); c = cyg_tolower (c);
put_readahead (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) if (tc->ti.c_lflag & ECHO)
doecho (&c, 1); doecho (&c, 1);
} }
if (!iscanon || always_accept) if ((!iscanon || always_accept) && ralen > 0)
set_input_done (ralen > 0); ret = line_edit_input_done;
if (sawsig) if (sawsig)
ret = line_edit_signalled; ret = line_edit_signalled;
else if (input_done)
{
ret = line_edit_input_done;
(void) accept_input ();
}
return ret; return ret;
} }