summaryrefslogtreecommitdiff
path: root/term/ptyio.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-12-05 01:43:08 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-12-05 01:43:08 +0000
commit5eea169b57f6a2f65170c70647917ad196ff2a28 (patch)
treed4475880f881d2b7a62f065e69a20d36e8626a08 /term/ptyio.c
parentf590b3b072ae7c0a98daf2489c4a1332c34ff5cf (diff)
(ptyio_set_bits): If the stop char state has changed, dinkle the stop
bits in the control_byte accordingly.
Diffstat (limited to 'term/ptyio.c')
-rw-r--r--term/ptyio.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/term/ptyio.c b/term/ptyio.c
index 4fb4e39e..494f99e2 100644
--- a/term/ptyio.c
+++ b/term/ptyio.c
@@ -45,6 +45,8 @@ static int user_ioctl_mode = 0;
static char control_byte = 0;
static int output_stopped;
+
+static int pktnostop;
static void
@@ -136,9 +138,28 @@ ptyio_desert_dtr ()
static void
ptyio_set_bits ()
{
+ int stop;
+
if (packet_mode && external_processing)
{
control_byte |= TIOCPKT_IOCTL;
+
+ 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;
+ }
+ else if (!pktnostop && !stop)
+ {
+ pktnostop = 1;
+ control_byte |= TIOCPKT_NOSTOP;
+ control_byte &= ~TIOCPKT_DOSTOP;
+ }
+
wake_reader ();
}
}