summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_console.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-12-05 16:24:52 +0000
committerChristopher Faylor <me@cgf.cx>2002-12-05 16:24:52 +0000
commit49dd6fc61e991a533ae3f1167d48bb07b3391311 (patch)
treeadd58e9624eafa48ed31834cdfade456a4e0550f /winsup/cygwin/fhandler_console.cc
parent94d815b251f6e5743f629aea73406fd9937feca3 (diff)
downloadcygnal-49dd6fc61e991a533ae3f1167d48bb07b3391311.tar.gz
cygnal-49dd6fc61e991a533ae3f1167d48bb07b3391311.tar.bz2
cygnal-49dd6fc61e991a533ae3f1167d48bb07b3391311.zip
* 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.
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r--winsup/cygwin/fhandler_console.cc6
1 files changed, 3 insertions, 3 deletions
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