Obtained from: partly from ancient patches of mine via 1.1.5
Handle MDMBUF a little better. Prepare to handle 4 different kinds of output flow control.
This commit is contained in:
parent
8f5171930e
commit
35b46c174c
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty.c 8.8 (Berkeley) 1/21/94
|
||||
* $Id: tty.c,v 1.63 1995/07/31 21:01:23 bde Exp $
|
||||
* $Id: tty.c,v 1.64 1995/07/31 21:43:37 bde Exp $
|
||||
*/
|
||||
|
||||
/*-
|
||||
@ -1297,11 +1297,15 @@ ttymodem(tp, flag)
|
||||
if (ISSET(tp->t_state, TS_CARR_ON) && ISSET(tp->t_cflag, MDMBUF)) {
|
||||
/*
|
||||
* MDMBUF: do flow control according to carrier flag
|
||||
* XXX TS_CAR_OFLOW doesn't do anything yet. TS_TTSTOP
|
||||
* works if IXON and IXANY are clear.
|
||||
*/
|
||||
if (flag) {
|
||||
CLR(tp->t_state, TS_CAR_OFLOW);
|
||||
CLR(tp->t_state, TS_TTSTOP);
|
||||
ttstart(tp);
|
||||
} else if (!ISSET(tp->t_state, TS_TTSTOP)) {
|
||||
} else if (!ISSET(tp->t_state, TS_CAR_OFLOW)) {
|
||||
SET(tp->t_state, TS_CAR_OFLOW);
|
||||
SET(tp->t_state, TS_TTSTOP);
|
||||
#ifdef sun4c /* XXX */
|
||||
(*tp->t_stop)(tp, 0);
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty.h 8.6 (Berkeley) 1/21/94
|
||||
* $Id: tty.h,v 1.28 1995/07/31 19:17:19 bde Exp $
|
||||
* $Id: tty.h,v 1.29 1995/07/31 21:02:00 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_TTY_H_
|
||||
@ -159,6 +159,13 @@ struct tty {
|
||||
#define TS_SO_OCOMPLETE 0x080000 /* Wake up when output completes. */
|
||||
#define TS_ZOMBIE 0x100000 /* Connection lost. */
|
||||
|
||||
/* Hardware flow-control-invoked bits. */
|
||||
#define TS_CAR_OFLOW 0x200000 /* For MDMBUF (XXX handle in driver). */
|
||||
#ifdef notyet
|
||||
#define TS_CTS_OFLOW 0x400000 /* For CCTS_OFLOW. */
|
||||
#define TS_DSR_OFLOW 0x800000 /* For CDSR_OFLOW. */
|
||||
#endif
|
||||
|
||||
/* Character type information. */
|
||||
#define ORDINARY 0
|
||||
#define CONTROL 1
|
||||
|
Loading…
Reference in New Issue
Block a user