Subject: bin/1892: support ostart/ostop in stty
To: None <gnats-bugs@gnats.netbsd.org>
From: None <niklas@appli.se>
List: netbsd-bugs
Date: 01/05/1996 14:39:51
>Number:         1892
>Category:       bin
>Synopsis:       It would be nice to have stty support starting/stopping output
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jan  5 14:05:01 1996
>Last-Modified:
>Originator:     Niklas Hallqvist
>Organization:
	Applitron Datasystem AB
>Release:        960102
>Environment:
System: NetBSD filippa.appli.se 1.1_ALPHA NetBSD 1.1_ALPHA (FILIPPA) #562: Mon Dec 11 19:15:43 MET 1995 root@filippa.appli.se:/u3/newex/sys/arch/amiga/compile/FILIPPA amiga


>Description:
	It is nice to be able to start/stop output on ttys from a userlevel
	program, for example when modem-nice gets a XOFF char get into a port
	and no way to get a XON there without rewiring..
>How-To-Repeat:
	Irrelevant
>Fix:
cvs server: Diffing .
Index: key.c
===================================================================
RCS file: /cvs/src/bin/stty/key.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -r1.1.1.1 -r1.2
*** key.c	1995/10/18 08:37:26	1.1.1.1
--- key.c	1996/01/05 18:02:24	1.2
***************
*** 67,72 ****
--- 67,74 ----
  void	f_sane __P((struct info *));
  void	f_size __P((struct info *));
  void	f_speed __P((struct info *));
+ void	f_ostart __P((struct info *));
+ void	f_ostop __P((struct info *));
  void	f_tty __P((struct info *));
  __END_DECLS
  
***************
*** 90,95 ****
--- 92,99 ----
  	{ "nl",		f_nl,		F_OFFOK },
  	{ "old",	f_tty,		0 },
  	{ "ospeed",	f_ospeed,	F_NEEDARG },
+ 	{ "ostart",	f_ostart,	0 },
+ 	{ "ostop",	f_ostop,	0 },
  	{ "raw",	f_raw,		F_OFFOK },
  	{ "rows",	f_rows,		F_NEEDARG },
  	{ "sane",	f_sane,		0 },
***************
*** 303,306 ****
--- 307,326 ----
  	tmp = TTYDISC;
  	if (ioctl(0, TIOCSETD, &tmp) < 0)
  		err(1, "TIOCSETD");
+ }
+ 
+ void
+ f_ostart(ip)
+ 	struct info *ip;
+ {
+ 	if (ioctl (0, TIOCSTART) < 0)
+ 		err(1, "TIOCSTART");
+ }
+ 
+ void
+ f_ostop(ip)
+ 	struct info *ip;
+ {
+ 	if (ioctl (0, TIOCSTOP) < 0)
+ 		err(1, "TIOCSTOP");
  }
Index: stty.1
===================================================================
RCS file: /cvs/src/bin/stty/stty.1,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -r1.1.1.1 -r1.2
*** stty.1	1995/10/18 08:37:26	1.1.1.1
--- stty.1	1996/01/05 18:02:26	1.2
***************
*** 568,573 ****
--- 568,589 ----
  Same as the control character
  .Cm reprint .
  .El
+ .Ss Control operations:
+ .Pp
+ These operations are not modes, but rather commands to be performed by
+ the tty layer.
+ .Bl -tag -width Fl
+ .It Cm ostart
+ Performs a "start output" operation, as normally done by an
+ incoming START character when
+ .Cm ixon
+ is set.
+ .It Cm ostop
+ Performs a "stop output" operation, as normally done by an
+ incoming STOP character when
+ .Cm ixon
+ is set.
+ .El
  .Pp
  The
  .Nm stty
***************
*** 584,587 ****
  and
  .Fl f
  are
! extensions to the standard.
--- 600,604 ----
  and
  .Fl f
  are
! extensions to the standard, as are the operands mentioned in the control
! operations section.

>Audit-Trail:
>Unformatted: