From 49dd6fc61e991a533ae3f1167d48bb07b3391311 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 5 Dec 2002 16:24:52 +0000 Subject: * 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. --- winsup/cygwin/fhandler_console.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/fhandler_console.cc') diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 70e719915..a7b13c6b9 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -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 -- cgit v1.2.3