* fhandler.h (fhandler_termios::line_edit): Change return from an int to an

enum to allow the function to return an error.
* fhandler_console.cc (fhandler_console::read): Update the line_edit call to
use the new enum.
* fhandler_termios.cc (fhandler_termios::line_edit): Change return from an int
to an enum to allow the function to return an error.  Put put_readahead call
before doecho for future patch.
* fhandler_tty.cc (fhandler_pty_master::write): Change to call line_edit one
character at a time, and stop if an error occurs.
This commit is contained in:
Christopher Faylor
2002-12-05 16:24:52 +00:00
parent 94d815b251
commit 49dd6fc61e
5 changed files with 40 additions and 12 deletions

View File

@@ -457,10 +457,10 @@ fhandler_console::read (void *pv, size_t buflen)
if (toadd)
{
int res = line_edit (toadd, nread);
if (res < 0)
line_edit_status res = line_edit (toadd, nread);
if (res == line_edit_signalled)
goto sig_exit;
else if (res)
else if (res == line_edit_input_done)
break;
}
#undef ich