diff options
author | Miles Bader <miles@gnu.org> | 1996-10-02 20:42:03 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-10-02 20:42:03 +0000 |
commit | 52d828656201aa956d9df4d12099fee64721fe59 (patch) | |
tree | 06e9e536a4ccbc31ccf9d7ccc4264b52cc2b4715 /term/ptyio.c | |
parent | f74408da4b18f697fbc788d247e4e2365dae061e (diff) |
(ptyio_set_bits):
We need only be in packet mode to send TIOCPKT_NOSTOP & TIOCPKT_DOSTOP,
regardless of the value of EXTERNAL_PROCESSING.
Diffstat (limited to 'term/ptyio.c')
-rw-r--r-- | term/ptyio.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/term/ptyio.c b/term/ptyio.c index 16f5d08b..e8952859 100644 --- a/term/ptyio.c +++ b/term/ptyio.c @@ -197,29 +197,36 @@ ptyio_desert_dtr () static void ptyio_set_bits () { - int stop; - - if (packet_mode && external_processing) + if (packet_mode) { - control_byte |= TIOCPKT_IOCTL; + int wakeup = 0; + int stop = ((termstate.c_iflag & IXON) + && CCEQ (termstate.c_cc[VSTOP], CHAR_DC3) + && CCEQ (termstate.c_cc[VSTART], CHAR_DC1)); + + if (external_processing) + { + control_byte |= TIOCPKT_IOCTL; + wakeup = 1; + } - stop = ((termstate.c_iflag & IXON) - && CCEQ (termstate.c_cc[VSTOP], CHAR_DC3) - && CCEQ (termstate.c_cc[VSTART], CHAR_DC1)); if (pktnostop && stop) { pktnostop = 0; control_byte |= TIOCPKT_DOSTOP; control_byte &= ~TIOCPKT_NOSTOP; + wakeup = 1; } else if (!pktnostop && !stop) { pktnostop = 1; control_byte |= TIOCPKT_NOSTOP; control_byte &= ~TIOCPKT_DOSTOP; + wakeup = 1; } - wake_reader (); + if (wakeup) + wake_reader (); } } |