Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/tip PR/47877: Michael van Elst: Disable and enable s...
details: https://anonhg.NetBSD.org/src/rev/956649d85e85
branches: trunk
changeset: 787106:956649d85e85
user: christos <christos%NetBSD.org@localhost>
date: Sun Jun 02 13:18:12 2013 +0000
description:
PR/47877: Michael van Elst: Disable and enable software flow control properly
diffstat:
usr.bin/tip/cmds.c | 12 ++++++------
usr.bin/tip/tip.c | 8 +++++---
2 files changed, 11 insertions(+), 9 deletions(-)
diffs (63 lines):
diff -r e0db38274b00 -r 956649d85e85 usr.bin/tip/cmds.c
--- a/usr.bin/tip/cmds.c Sun Jun 02 12:45:00 2013 +0000
+++ b/usr.bin/tip/cmds.c Sun Jun 02 13:18:12 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cmds.c,v 1.35 2012/02/24 16:03:39 joerg Exp $ */
+/* $NetBSD: cmds.c,v 1.36 2013/06/02 13:18:12 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: cmds.c,v 1.35 2012/02/24 16:03:39 joerg Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.36 2013/06/02 13:18:12 christos Exp $");
#endif /* not lint */
#include "tip.h"
@@ -792,11 +792,11 @@
(void)tcgetattr(FD, &rmtty);
if (strcmp(option, "on") == 0) {
- rmtty.c_iflag |= IXOFF;
- term.c_iflag |= IXOFF;
+ rmtty.c_iflag |= IXON|IXOFF|IXANY;
+ term.c_iflag |= IXON|IXOFF|IXANY;
} else {
- rmtty.c_iflag &= ~IXOFF;
- term.c_iflag &= ~IXOFF;
+ rmtty.c_iflag &= ~(IXON|IXOFF|IXANY);
+ term.c_iflag &= ~(IXON|IXOFF|IXANY);
}
(void)tcsetattr(FD, TCSADRAIN, &rmtty);
(void)tcsetattr(0, TCSADRAIN, &term);
diff -r e0db38274b00 -r 956649d85e85 usr.bin/tip/tip.c
--- a/usr.bin/tip/tip.c Sun Jun 02 12:45:00 2013 +0000
+++ b/usr.bin/tip/tip.c Sun Jun 02 13:18:12 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tip.c,v 1.51 2011/09/06 18:33:01 joerg Exp $ */
+/* $NetBSD: tip.c,v 1.52 2013/06/02 13:18:12 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: tip.c,v 1.51 2011/09/06 18:33:01 joerg Exp $");
+__RCSID("$NetBSD: tip.c,v 1.52 2013/06/02 13:18:12 christos Exp $");
#endif /* not lint */
/*
@@ -496,7 +496,9 @@
cntrl.c_cc[VMIN] = 1;
cntrl.c_cc[VTIME] = 0;
if (boolean(value(TAND)))
- cntrl.c_iflag |= IXOFF;
+ cntrl.c_iflag |= IXOFF|IXON|IXANY;
+ else
+ cntrl.c_iflag &= ~(IXOFF|IXON|IXANY);
return tcsetattr(FD, TCSAFLUSH, &cntrl);
}
Home |
Main Index |
Thread Index |
Old Index