Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-12-21 07:38:12 +0300
committerChristopher Faylor <me@cgf.cx>2002-12-21 07:38:12 +0300
commitb18962e228dc5a9b4729acd79078fca1389f2ba7 (patch)
treec82f7b51122c3992c5e643cf39e8a6e53bc5715f
parent4753d27c08a083096da1f6ef571e0496621a7b86 (diff)
* fhandler.h (line_edit_status): Reorganize so that tests for error condition
can be < or >. * fhandler_tty.cc (fhandler_pty_master::write): Don't return after sending a signal. * fhandler_termios.cc (fhandler_termios::line_edit): Trivial change to use built-in bool types.
-rw-r--r--winsup/cygwin/ChangeLog10
-rw-r--r--winsup/cygwin/fhandler.h6
-rw-r--r--winsup/cygwin/fhandler_termios.cc4
-rw-r--r--winsup/cygwin/fhandler_tty.cc11
4 files changed, 21 insertions, 10 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 648c038f1..a7d23206c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,13 @@
+2002-12-20 Christopher Faylor <cgf@redhat.com>
+
+ * fhandler.h (line_edit_status): Reorganize so that tests for error
+ condition can be < or >.
+ * fhandler_tty.cc (fhandler_pty_master::write): Don't return after
+ sending a signal.
+
+ * fhandler_termios.cc (fhandler_termios::line_edit): Trivial change to
+ use built-in bool types.
+
2002-12-19 Pierre Humblet <pierre.humblet@ieee.org>
* localtime.cc (tzsetwall): Set lcl_is_set and lcl_TZname
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index bea1bf26c..c38789b97 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -120,11 +120,11 @@ struct iovec;
enum line_edit_status
{
- line_edit_signalled = -1,
line_edit_ok = 0,
line_edit_input_done = 1,
- line_edit_error = 2,
- line_edit_pipe_full = 3
+ line_edit_signalled = 2,
+ line_edit_error = 3,
+ line_edit_pipe_full = 4
};
enum bg_check_types
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index 9cd2561fa..2a14db308 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -192,7 +192,7 @@ fhandler_termios::line_edit (const char *rptr, int nread, int always_accept)
line_edit_status ret = line_edit_ok;
char c;
int input_done = 0;
- bool sawsig = FALSE;
+ bool sawsig = false;
int iscanon = tc->ti.c_lflag & ICANON;
while (nread-- > 0)
@@ -239,7 +239,7 @@ fhandler_termios::line_edit (const char *rptr, int nread, int always_accept)
eat_readahead (-1);
tc->kill_pgrp (sig);
tc->ti.c_lflag &= ~FLUSHO;
- sawsig = 1;
+ sawsig = true;
goto restart_output;
}
not_a_sig:
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 0a5ba76f6..ef15f9f40 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1083,11 +1083,12 @@ fhandler_pty_master::write (const void *ptr, size_t len)
for (i=0; i < (int) len; i++)
{
line_edit_status status = line_edit (p++, 1);
- if (status == line_edit_ok || status == line_edit_input_done)
- continue;
- if (status != line_edit_pipe_full)
- i = -1;
- break;
+ if (status > line_edit_signalled)
+ {
+ if (status != line_edit_pipe_full)
+ i = -1;
+ break;
+ }
}
return i;
}