diff options
author | Christopher Faylor <me@cgf.cx> | 2002-12-05 16:24:52 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-12-05 16:24:52 +0000 |
commit | 49dd6fc61e991a533ae3f1167d48bb07b3391311 (patch) | |
tree | add58e9624eafa48ed31834cdfade456a4e0550f /winsup/cygwin/fhandler.h | |
parent | 94d815b251f6e5743f629aea73406fd9937feca3 (diff) | |
download | cygnal-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.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 0e4267013..3dcc8b64d 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -118,6 +118,14 @@ typedef struct __DIR DIR; struct dirent; struct iovec; +enum line_edit_status +{ + line_edit_signalled = -1, + line_edit_ok = 0, + line_edit_input_done = 1, + line_edit_error = 2 +}; + enum bg_check_types { bg_error = -1, @@ -693,7 +701,7 @@ class fhandler_termios: public fhandler_base set_need_fork_fixup (); } HANDLE& get_output_handle () { return output_handle; } - int line_edit (const char *rptr, int nread, int always_accept = 0); + line_edit_status line_edit (const char *rptr, int nread, int always_accept = 0); void set_output_handle (HANDLE h) { output_handle = h; } void tcinit (tty_min *this_tc, int force = FALSE); virtual int is_tty () { return 1; } |