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-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
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
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)
eat_readahead (-1);
tc->kill_pgrp (sig);
tc->ti.c_lflag &= ~FLUSHO;
- sawsig = 1;
+ sawsig = true;
goto restart_output;
}
not_a_sig:
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;
}