CVS commit: src/bin/stty

2017-10-30 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 30 15:38:52 UTC 2017

Modified Files:
src/bin/stty: stty.1

Log Message:
Remove Tn.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/bin/stty/stty.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/stty.1
diff -u src/bin/stty/stty.1:1.44 src/bin/stty/stty.1:1.45
--- src/bin/stty/stty.1:1.44	Wed Oct 25 06:32:59 2017
+++ src/bin/stty/stty.1	Mon Oct 30 15:38:52 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: stty.1,v 1.44 2017/10/25 06:32:59 kre Exp $
+.\"	$NetBSD: stty.1,v 1.45 2017/10/30 15:38:52 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -273,15 +273,10 @@ On the terminal NL performs (does not pe
 Local mode flags (lflags) affect various and sundry characteristics of terminal
 processing.
 Historically the term "local" pertained to new job control features
-implemented by Jim Kulp on a
-.Tn PDP Ns -11/70
-at
-.Tn IIASA .
-Later the driver ran on the first
-.Tn VAX
-at Evans Hall, UC Berkeley, where the job control details
-were greatly modified but the structure definitions and names
-remained essentially unchanged.
+implemented by Jim Kulp on a PDP-11/70 at IIASA.
+Later the driver ran on the first VAX at Evans Hall, UC Berkeley,
+where the job control details were greatly modified but the structure
+definitions and names remained essentially unchanged.
 The second interpretation of the
 .Sq l
 in lflag
@@ -405,22 +400,22 @@ Recognized control characters:
 .It control- Ta "" Ta ""
 .It character	Subscript	Description
 .It _	_	___
-.It eof Ta Tn VEOF Ta EOF No character
-.It eol Ta Tn VEOL Ta EOL No character
-.It eol2 Ta Tn VEOL2 Ta EOL2 No character
-.It erase Ta Tn VERASE Ta ERASE No character
-.It werase Ta Tn VWERASE Ta WERASE No character
-.It kill Ta Tn VKILL Ta KILL No character
-.It reprint Ta Tn VREPRINT Ta REPRINT No character
-.It intr Ta Tn VINTR Ta INTR No character
-.It quit Ta Tn VQUIT Ta QUIT No character
-.It susp Ta Tn VSUSP Ta SUSP No character
-.It dsusp Ta Tn VDSUSP Ta DSUSP No character
-.It start Ta Tn VSTART Ta START No character
-.It stop Ta Tn VSTOP Ta STOP No character
-.It lnext Ta Tn VLNEXT Ta LNEXT No character
-.It status Ta Tn VSTATUS Ta STATUS No character
-.It discard Ta Tn VDISCARD Ta DISCARD No character
+.It eof Ta VEOF Ta EOF No character
+.It eol Ta VEOL Ta EOL No character
+.It eol2 Ta VEOL2 Ta EOL2 No character
+.It erase Ta VERASE Ta ERASE No character
+.It werase Ta VWERASE Ta WERASE No character
+.It kill Ta VKILL Ta KILL No character
+.It reprint Ta VREPRINT Ta REPRINT No character
+.It intr Ta VINTR Ta INTR No character
+.It quit Ta VQUIT Ta QUIT No character
+.It susp Ta VSUSP Ta SUSP No character
+.It dsusp Ta VDSUSP Ta DSUSP No character
+.It start Ta VSTART Ta START No character
+.It stop Ta VSTOP Ta STOP No character
+.It lnext Ta VLNEXT Ta LNEXT No character
+.It status Ta VSTATUS Ta STATUS No character
+.It discard Ta VDISCARD Ta DISCARD No character
 .El
 .Ed
 .It Cm min Ar number



CVS commit: src/bin/stty

2017-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 10 20:44:05 UTC 2017

Modified Files:
src/bin/stty: key.c

Log Message:
need  for time(3)


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/bin/stty/key.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/key.c
diff -u src/bin/stty/key.c:1.21 src/bin/stty/key.c:1.22
--- src/bin/stty/key.c:1.21	Thu Sep 12 15:47:23 2013
+++ src/bin/stty/key.c	Tue Jan 10 15:44:05 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.21 2013/09/12 19:47:23 christos Exp $ */
+/* $NetBSD: key.c,v 1.22 2017/01/10 20:44:05 christos Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)key.c	8.4 (Berkeley) 2/20/95";
 #else
-__RCSID("$NetBSD: key.c,v 1.21 2013/09/12 19:47:23 christos Exp $");
+__RCSID("$NetBSD: key.c,v 1.22 2017/01/10 20:44:05 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -43,6 +43,7 @@ __RCSID("$NetBSD: key.c,v 1.21 2013/09/1
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/bin/stty

2016-08-14 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Sun Aug 14 23:29:43 UTC 2016

Modified Files:
src/bin/stty: stty.1

Log Message:
While the v2 source and man pages are incomplete, TUHS has a scanned copy of the
printed version of the 2nd edition manual. stty is featured in this copy, in the
table of contents listed as meaning "set typewriter modes" and on the actual 
manual page
headed correctly as "set teletype options"
http://www.tuhs.org/Archive/PDP-11/Distributions/research/1972_stuff/unix_2nd_edition_manual.pdf
Ammend HISTORY and bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/bin/stty/stty.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/stty.1
diff -u src/bin/stty/stty.1:1.42 src/bin/stty/stty.1:1.43
--- src/bin/stty/stty.1:1.42	Fri Aug 12 02:49:18 2016
+++ src/bin/stty/stty.1	Sun Aug 14 23:29:43 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: stty.1,v 1.42 2016/08/12 02:49:18 sevan Exp $
+.\"	$NetBSD: stty.1,v 1.43 2016/08/14 23:29:43 sevan Exp $
 .\"
 .\" Copyright (c) 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" @(#)stty.1	8.5 (Berkeley) 6/1/94
 .\"
-.Dd August 12, 2016
+.Dd August 15, 2016
 .Dt STTY 1
 .Os
 .Sh NAME
@@ -637,4 +637,4 @@ operations section.
 An
 .Nm
 utility appeared in
-.At v3 .
+.At v2 .



CVS commit: src/bin/stty

2016-08-11 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Fri Aug 12 02:49:18 UTC 2016

Modified Files:
src/bin/stty: stty.1

Log Message:
Document the version stty first appeared.
Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/bin/stty/stty.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/stty.1
diff -u src/bin/stty/stty.1:1.41 src/bin/stty/stty.1:1.42
--- src/bin/stty/stty.1:1.41	Wed Jun 20 14:19:39 2012
+++ src/bin/stty/stty.1	Fri Aug 12 02:49:18 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: stty.1,v 1.41 2012/06/20 14:19:39 wiz Exp $
+.\"	$NetBSD: stty.1,v 1.42 2016/08/12 02:49:18 sevan Exp $
 .\"
 .\" Copyright (c) 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" @(#)stty.1	8.5 (Berkeley) 6/1/94
 .\"
-.Dd June 16, 2012
+.Dd August 12, 2016
 .Dt STTY 1
 .Os
 .Sh NAME
@@ -633,3 +633,8 @@ and
 flags are
 extensions to the standard, as are the operands mentioned in the control
 operations section.
+.Sh HISTORY
+An
+.Nm
+utility appeared in
+.At v3 .



CVS commit: src/bin/stty

2015-05-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May  1 17:01:08 UTC 2015

Modified Files:
src/bin/stty: modes.c

Log Message:
Simplify by splitting the simple mode setting and the special ones.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/bin/stty/modes.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/modes.c
diff -u src/bin/stty/modes.c:1.17 src/bin/stty/modes.c:1.18
--- src/bin/stty/modes.c:1.17	Sun Oct 15 20:37:55 2006
+++ src/bin/stty/modes.c	Fri May  1 13:01:08 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: modes.c,v 1.17 2006/10/16 00:37:55 christos Exp $ */
+/* $NetBSD: modes.c,v 1.18 2015/05/01 17:01:08 christos Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)modes.c	8.3 (Berkeley) 4/2/94;
 #else
-__RCSID($NetBSD: modes.c,v 1.17 2006/10/16 00:37:55 christos Exp $);
+__RCSID($NetBSD: modes.c,v 1.18 2015/05/01 17:01:08 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -42,12 +42,18 @@ __RCSID($NetBSD: modes.c,v 1.17 2006/10
 
 #include stddef.h
 #include string.h
+#include stdbool.h
 
 #include stty.h
 #include extern.h
 
 struct modes {
 	const char *name;
+	tcflag_t flag;
+};
+
+struct specialmodes {
+	const char *name;
 	tcflag_t set;
 	tcflag_t unset;
 };
@@ -57,18 +63,24 @@ struct modes {
  * options, i.e. foo must immediately precede -foo.
  */
 const struct modes cmodes[] = {
+	{ cstopb,	CSTOPB },
+	{ cread,	CREAD },
+	{ parenb,	PARENB },
+	{ parodd,	PARODD },
+	{ hupcl,	HUPCL },
+	{ hup,	HUPCL },
+	{ clocal,	CLOCAL },
+	{ crtscts,	CRTSCTS },
+	{ mdmbuf,	MDMBUF },
+	{ cdtrcts,	CDTRCTS },
+	{ .name = NULL },
+};
+
+const struct specialmodes cspecialmodes[] = {
 	{ cs5,	CS5, CSIZE },
 	{ cs6,	CS6, CSIZE },
 	{ cs7,	CS7, CSIZE },
 	{ cs8,	CS8, CSIZE },
-	{ cstopb,	CSTOPB, 0 },
-	{ -cstopb,	0, CSTOPB },
-	{ cread,	CREAD, 0 },
-	{ -cread,	0, CREAD },
-	{ parenb,	PARENB, 0 },
-	{ -parenb,	0, PARENB },
-	{ parodd,	PARODD, 0 },
-	{ -parodd,	0, PARODD },
 	{ parity,	PARENB | CS7, PARODD | CSIZE },
 	{ -parity,	CS8, PARODD | PARENB | CSIZE },
 	{ evenp,	PARENB | CS7, PARODD | CSIZE },
@@ -77,166 +89,136 @@ const struct modes cmodes[] = {
 	{ -oddp,	CS8, PARODD | PARENB | CSIZE },
 	{ pass8,	CS8, PARODD | PARENB | CSIZE },
 	{ -pass8,	PARENB | CS7, PARODD | CSIZE },
-	{ hupcl,	HUPCL, 0 },
-	{ -hupcl,	0, HUPCL },
-	{ hup,	HUPCL, 0 },
-	{ -hup,	0, HUPCL },
-	{ clocal,	CLOCAL, 0 },
-	{ -clocal,	0, CLOCAL },
-	{ crtscts,	CRTSCTS, 0 },
-	{ -crtscts,	0, CRTSCTS },
-	{ mdmbuf,	MDMBUF, 0 },
-	{ -mdmbuf,	0, MDMBUF },
-	{ cdtrcts,	CDTRCTS, 0 },
-	{ -cdtrcts,	0, CDTRCTS },
 	{ .name = NULL },
 };
 
 const struct modes imodes[] = {
-	{ ignbrk,	IGNBRK, 0 },
-	{ -ignbrk,	0, IGNBRK },
-	{ brkint,	BRKINT, 0 },
-	{ -brkint,	0, BRKINT },
-	{ ignpar,	IGNPAR, 0 },
-	{ -ignpar,	0, IGNPAR },
-	{ parmrk,	PARMRK, 0 },
-	{ -parmrk,	0, PARMRK },
-	{ inpck,	INPCK, 0 },
-	{ -inpck,	0, INPCK },
-	{ istrip,	ISTRIP, 0 },
-	{ -istrip,	0, ISTRIP },
-	{ inlcr,	INLCR, 0 },
-	{ -inlcr,	0, INLCR },
-	{ igncr,	IGNCR, 0 },
-	{ -igncr,	0, IGNCR },
-	{ icrnl,	ICRNL, 0 },
-	{ -icrnl,	0, ICRNL },
-	{ ixon,	IXON, 0 },
-	{ -ixon,	0, IXON },
-	{ flow,	IXON, 0 },
-	{ -flow,	0, IXON },
-	{ ixoff,	IXOFF, 0 },
-	{ -ixoff,	0, IXOFF },
-	{ tandem,	IXOFF, 0 },
-	{ -tandem,	0, IXOFF },
-	{ ixany,	IXANY, 0 },
-	{ -ixany,	0, IXANY },
+	{ ignbrk,	IGNBRK },
+	{ brkint,	BRKINT },
+	{ ignpar,	IGNPAR },
+	{ parmrk,	PARMRK },
+	{ inpck,	INPCK },
+	{ istrip,	ISTRIP },
+	{ inlcr,	INLCR },
+	{ igncr,	IGNCR },
+	{ icrnl,	ICRNL },
+	{ ixon,	IXON },
+	{ flow,	IXON },
+	{ ixoff,	IXOFF },
+	{ tandem,	IXOFF },
+	{ ixany,	IXANY },
+	{ imaxbel,	IMAXBEL },
+	{ .name = NULL },
+};
+
+const struct specialmodes ispecialmodes[] = {
 	{ decctlq,	0, IXANY },
 	{ -decctlq,	IXANY, 0 },
-	{ imaxbel,	IMAXBEL, 0 },
-	{ -imaxbel,	0, IMAXBEL },
 	{ .name = NULL },
 };
 
 const struct modes lmodes[] = {
-	{ echo,	ECHO, 0 },
-	{ -echo,	0, ECHO },
-	{ echoe,	ECHOE, 0 },
-	{ -echoe,	0, ECHOE },
-	{ crterase,	ECHOE, 0 },
-	{ -crterase,	0, ECHOE },
-	{ crtbs,	ECHOE, 0 },	/* crtbs not supported, close enough */
-	{ -crtbs,	0, ECHOE },
-	{ echok,	ECHOK, 0 },
-	{ -echok,	0, ECHOK },
-	{ echoke,	ECHOKE, 0 },
-	{ -echoke,	0, ECHOKE },
-	{ crtkill,	ECHOKE, 0 },
-	{ -crtkill,	0, ECHOKE },
-	{ altwerase,	ALTWERASE, 0 },
-	{ -altwerase,	0, ALTWERASE },
-	{ iexten,	IEXTEN, 0 },
-	{ -iexten,	0, IEXTEN },
-	{ echonl,	ECHONL, 0 },
-	{ -echonl,	0, ECHONL },
-	{ echoctl,	ECHOCTL, 0 },
-	{ -echoctl,	0, ECHOCTL },
-	{ ctlecho,	ECHOCTL, 0 },
-	{ -ctlecho,	0, ECHOCTL },
-	{ echoprt,	ECHOPRT, 0 },
-	{ -echoprt,	0, ECHOPRT },
-	{ prterase,	ECHOPRT, 0 },
-	{ -prterase,	0, ECHOPRT },
-	{ isig,	ISIG, 0 },
-	{ -isig,	0, ISIG },
-	{ icanon,	ICANON, 0 },
-	{ -icanon,	0, ICANON },
-	{ noflsh,	NOFLSH, 0 },
-	{ -noflsh,	0, NOFLSH },
-	{ tostop,	TOSTOP, 0 },
-	{ -tostop,	0, TOSTOP },
-	{ flusho,	FLUSHO, 0 },
-	{ -flusho,	0, FLUSHO 

CVS commit: src/bin/stty

2013-09-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 12 19:47:23 UTC 2013

Modified Files:
src/bin/stty: extern.h key.c print.c stty.c stty.h

Log Message:
- print the line discipline using the new ioctl
- print the queue size


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/bin/stty/extern.h
cvs rdiff -u -r1.20 -r1.21 src/bin/stty/key.c
cvs rdiff -u -r1.22 -r1.23 src/bin/stty/print.c src/bin/stty/stty.c
cvs rdiff -u -r1.10 -r1.11 src/bin/stty/stty.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/extern.h
diff -u src/bin/stty/extern.h:1.12 src/bin/stty/extern.h:1.13
--- src/bin/stty/extern.h:1.12	Mon Aug 29 10:51:19 2011
+++ src/bin/stty/extern.h	Thu Sep 12 15:47:23 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.12 2011/08/29 14:51:19 joerg Exp $ */
+/* $NetBSD: extern.h,v 1.13 2013/09/12 19:47:23 christos Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -43,7 +43,7 @@ void	gread(struct termios *, char *);
 int	ksearch(char ***, struct info *);
 int	msearch(char ***, struct info *);
 void	optlist(void);
-void	print(struct termios *, struct winsize *, int, enum FMT);
+void	print(struct termios *, struct winsize *, int, const char *, enum FMT);
 __dead void	usage(void);
 
 extern const struct cchar cchars1[], cchars2[];

Index: src/bin/stty/key.c
diff -u src/bin/stty/key.c:1.20 src/bin/stty/key.c:1.21
--- src/bin/stty/key.c:1.20	Thu Apr  1 11:10:03 2004
+++ src/bin/stty/key.c	Thu Sep 12 15:47:23 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.20 2004/04/01 16:10:03 tsarna Exp $ */
+/* $NetBSD: key.c,v 1.21 2013/09/12 19:47:23 christos Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)key.c	8.4 (Berkeley) 2/20/95;
 #else
-__RCSID($NetBSD: key.c,v 1.20 2004/04/01 16:10:03 tsarna Exp $);
+__RCSID($NetBSD: key.c,v 1.21 2013/09/12 19:47:23 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -146,7 +146,7 @@ ksearch(char ***argvp, struct info *ip)
 void
 f_all(struct info *ip)
 {
-	print(ip-t, ip-win, ip-ldisc, STTY_BSD);
+	print(ip-t, ip-win, ip-queue, ip-ldisc, STTY_BSD);
 }
 
 void
@@ -185,7 +185,7 @@ f_dec(struct info *ip)
 void
 f_everything(struct info *ip)
 {
-	print(ip-t, ip-win, ip-ldisc, STTY_BSD);
+	print(ip-t, ip-win, ip-queue, ip-ldisc, STTY_BSD);
 }
 
 void

Index: src/bin/stty/print.c
diff -u src/bin/stty/print.c:1.22 src/bin/stty/print.c:1.23
--- src/bin/stty/print.c:1.22	Sun Jun 26 15:10:49 2005
+++ src/bin/stty/print.c	Thu Sep 12 15:47:23 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.22 2005/06/26 19:10:49 christos Exp $ */
+/* $NetBSD: print.c,v 1.23 2013/09/12 19:47:23 christos Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)print.c	8.6 (Berkeley) 4/16/94;
 #else
-__RCSID($NetBSD: print.c,v 1.22 2005/06/26 19:10:49 christos Exp $);
+__RCSID($NetBSD: print.c,v 1.23 2013/09/12 19:47:23 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -52,7 +52,8 @@ static void bput(const char *);
 static const char *ccval(const struct cchar *, int);
 
 void
-print(struct termios *tp, struct winsize *wp, int ldisc, enum FMT fmt)
+print(struct termios *tp, struct winsize *wp, int queue, const char *ldisc,
+enum FMT fmt)
 {
 	const struct cchar *p;
 	long tmp;
@@ -62,29 +63,6 @@ print(struct termios *tp, struct winsize
 
 	cnt = 0;
 
-	/* Line discipline. */
-#ifdef TTYDISC
-	if (ldisc != TTYDISC) {
-		switch(ldisc) {
-		case TABLDISC:	
-			cnt += printf(tablet disc; );
-			break;
-		case SLIPDISC:	
-			cnt += printf(slip disc; );
-			break;
-		case PPPDISC:	
-			cnt += printf(ppp disc; );
-			break;
-		case STRIPDISC:	
-			cnt += printf(strip disc; );
-			break;
-		default:	
-			cnt += printf(#%d disc; , ldisc);
-			break;
-		}
-	}
-#endif
-
 	/* Line speed. */
 	ispeed = cfgetispeed(tp);
 	ospeed = cfgetospeed(tp);
@@ -93,8 +71,14 @@ print(struct termios *tp, struct winsize
 		printf(ispeed %d baud; ospeed %d baud;, ispeed, ospeed);
 	else
 		cnt += printf(speed %d baud;, ispeed);
-	if (fmt = STTY_BSD)
+	if (fmt = STTY_BSD) {
 		cnt += printf( %d rows; %d columns;, wp-ws_row, wp-ws_col);
+		if (queue)
+			cnt += printf( queue = %d;, queue);
+		if (ldisc)
+			cnt += printf( line = %s;, ldisc);
+	}
+
 	if (cnt)
 		(void)printf(\n);
 
Index: src/bin/stty/stty.c
diff -u src/bin/stty/stty.c:1.22 src/bin/stty/stty.c:1.23
--- src/bin/stty/stty.c:1.22	Wed Jun 20 06:09:43 2012
+++ src/bin/stty/stty.c	Thu Sep 12 15:47:23 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: stty.c,v 1.22 2012/06/20 10:09:43 wiz Exp $ */
+/* $NetBSD: stty.c,v 1.23 2013/09/12 19:47:23 christos Exp $ */
 
 /*-
  * Copyright (c) 1989, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = @(#)stty.c	8.3 (Berkeley) 4/2/94;
 #else
-__RCSID($NetBSD: stty.c,v 1.22 2012/06/20 10:09:43 wiz Exp $);
+__RCSID($NetBSD: stty.c,v 1.23 2013/09/12 19:47:23 christos 

CVS commit: src/bin/stty

2012-06-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jun 20 10:09:21 UTC 2012

Modified Files:
src/bin/stty: stty.1

Log Message:
- improve wording, and create more consistency within the text;
- correct `SYNOPSIS';
- improve macro usage;
- mention argument name for `-f' (and change list width for it);
- correct misplacement of periods (`.') and a parenthese (`(');
- fix typo;
- bump date.

From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/bin/stty/stty.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/stty.1
diff -u src/bin/stty/stty.1:1.39 src/bin/stty/stty.1:1.40
--- src/bin/stty/stty.1:1.39	Mon Apr  5 16:19:54 2010
+++ src/bin/stty/stty.1	Wed Jun 20 10:09:21 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: stty.1,v 1.39 2010/04/05 16:19:54 joerg Exp $
+.\	$NetBSD: stty.1,v 1.40 2012/06/20 10:09:21 wiz Exp $
 .\
 .\ Copyright (c) 1990, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -32,17 +32,17 @@
 .\
 .\ @(#)stty.1	8.5 (Berkeley) 6/1/94
 .\
-.Dd December 14, 2009
+.Dd June 16, 2012
 .Dt STTY 1
 .Os
 .Sh NAME
 .Nm stty
-.Nd set the options for a terminal device interface
+.Nd set options for a terminal device interface
 .Sh SYNOPSIS
 .Nm
 .Op Fl a | Fl e | Fl g
 .Op Fl f Ar file
-.Op operands
+.Op operand ...
 .Sh DESCRIPTION
 The
 .Nm
@@ -57,7 +57,7 @@ Some combinations of arguments are mutua
 exclusive on some terminal types.
 .Pp
 The following options are available:
-.Bl -tag -width Ds
+.Bl -tag -width XfXfileXX
 .It Fl a
 Display all the current settings for the terminal to standard output
 as per
@@ -66,8 +66,11 @@ as per
 Display all the current settings for the terminal to standard output
 in the traditional
 .Bx
-``all'' and ``everything'' formats.
-.It Fl f
+.Dq all
+and
+.Dq everything
+formats.
+.It Fl f Ar file
 Open and use the terminal named by
 .Ar file
 rather than using standard input.
@@ -91,7 +94,11 @@ characteristics:
 .Ss Control Modes
 Control mode flags affect hardware characteristics associated with the
 terminal.
-This corresponds to the c_cflag in the termios structure.
+This corresponds to the
+.Fa c_cflag
+of the
+.Xr termios 4
+structure.
 .Bl -tag -width Fl
 .It Cm parenb Pq Fl parenb
 Enable (disable) parity generation
@@ -101,15 +108,17 @@ Select odd (even) parity.
 .It Cm cs5 cs6 cs7 cs8
 Select character size, if possible.
 .It Ar number
-Set terminal baud rate to the
-number given, if possible.
+Set terminal baud rate to
+.Ar number ,
+if possible.
 If the
 baud rate is set to zero, modem
 control is no longer
 asserted.
 .It Cm ispeed Ar number
-Set terminal input baud rate to the
-number given, if possible.
+Set terminal input baud rate to
+.Ar number ,
+if possible.
 If the
 input baud rate is set to zero, the
 input baud rate is set to the
@@ -117,7 +126,8 @@ value of the output baud
 rate.
 .It Cm ospeed Ar number
 Set terminal output baud rate to
-the number given, if possible.
+.Ar number ,
+if possible.
 If
 the output baud rate is set to
 zero, modem control is
@@ -148,7 +158,11 @@ Enable RTS/CTS flow control.
 Enable DTR/CTS flow control (if supported).
 .El
 .Ss Input Modes
-This corresponds to the c_iflag in the termios structure.
+This corresponds to the
+.Fa c_iflag
+of the
+.Xr termios 4
+structure.
 .Bl -tag -width Fl
 .It Cm ignbrk Pq Fl ignbrk
 Ignore (do not ignore) break on
@@ -226,7 +240,11 @@ is unset and the input queue is full, th
 the entire input and output queues to be discarded.
 .El
 .Ss Output Modes
-This corresponds to the c_oflag of the termios structure.
+This corresponds to the
+.Fa c_oflag
+of the
+.Xr termios 4
+structure.
 .Bl -tag -width Fl
 .It Cm opost Pq Fl opost
 Post-process output (do not
@@ -264,11 +282,15 @@ Later the driver ran on the first
 at Evans Hall, UC Berkeley, where the job control details
 were greatly modified but the structure definitions and names
 remained essentially unchanged.
-The second interpretation of the 'l' in lflag
-is ``line discipline flag'' which corresponds to the
-.Ar c_lflag
+The second interpretation of the
+.Sq l
+in lflag
+is
+.Dq line discipline flag ,
+which corresponds to the
+.Fa c_lflag
 of the
-.Ar termios
+.Xr termios 4
 structure.
 .Bl -tag -width Fl
 .It Cm isig Pq Fl isig
@@ -280,7 +302,7 @@ and
 .Dv SUSP .
 .It Cm icanon Pq Fl icanon
 Enable (disable) canonical input
-.Pf ( Dv ERASE
+.Dv ( ERASE
 and
 .Dv KILL
 processing).
@@ -324,8 +346,10 @@ is set, echo control characters as ^X.
 Otherwise control characters echo as themselves.
 .It Cm echoprt Pq Fl echoprt
 For printing terminals.
-If set, echo erased characters backwards within ``\e''
-and ``/''.
+If set, echo erased characters backwards within
+.Dq \e
+and
+.Dq / .
 Otherwise, disable this feature.
 .It Cm noflsh Pq Fl noflsh
 Disable (enable) flush after
@@ -345,13 +369,13 @@ It also skips the first preceding charac
 (as a convenience since 

CVS commit: src/bin/stty

2012-06-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jun 20 10:09:43 UTC 2012

Modified Files:
src/bin/stty: stty.c

Log Message:
- remove trailing white space;
- sync `usage' with man page.

From patch by Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/bin/stty/stty.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/stty.c
diff -u src/bin/stty/stty.c:1.21 src/bin/stty/stty.c:1.22
--- src/bin/stty/stty.c:1.21	Sun Jul 20 00:52:40 2008
+++ src/bin/stty/stty.c	Wed Jun 20 10:09:43 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: stty.c,v 1.21 2008/07/20 00:52:40 lukem Exp $ */
+/* $NetBSD: stty.c,v 1.22 2012/06/20 10:09:43 wiz Exp $ */
 
 /*-
  * Copyright (c) 1989, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = @(#)stty.c	8.3 (Berkeley) 4/2/94;
 #else
-__RCSID($NetBSD: stty.c,v 1.21 2008/07/20 00:52:40 lukem Exp $);
+__RCSID($NetBSD: stty.c,v 1.22 2012/06/20 10:09:43 wiz Exp $);
 #endif
 #endif /* not lint */
 
@@ -61,7 +61,7 @@ __RCSID($NetBSD: stty.c,v 1.21 2008/07/
 int main(int, char *[]);
 
 int
-main(int argc, char *argv[]) 
+main(int argc, char *argv[])
 {
 	struct info i;
 	enum FMT fmt;
@@ -119,7 +119,7 @@ args:	argc -= optind;
 		gprint(i.t);
 		break;
 	}
-	
+
 	for (i.set = i.wset = 0; *argv; ++argv) {
 		if (ksearch(argv, i))
 			continue;
@@ -162,7 +162,7 @@ void
 usage(void)
 {
 
-	(void)fprintf(stderr, usage: %s [-a|-e|-g] [-f file] [options]\n, getprogname());
+	(void)fprintf(stderr, usage: %s [-a|-e|-g] [-f file] [operand ...]\n, getprogname());
 	exit(1);
 	/* NOTREACHED */
 }



CVS commit: src/bin/stty

2012-06-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jun 20 14:19:40 UTC 2012

Modified Files:
src/bin/stty: stty.1

Log Message:
Remove another Pf. From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/bin/stty/stty.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/stty.1
diff -u src/bin/stty/stty.1:1.40 src/bin/stty/stty.1:1.41
--- src/bin/stty/stty.1:1.40	Wed Jun 20 10:09:21 2012
+++ src/bin/stty/stty.1	Wed Jun 20 14:19:39 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: stty.1,v 1.40 2012/06/20 10:09:21 wiz Exp $
+.\	$NetBSD: stty.1,v 1.41 2012/06/20 14:19:39 wiz Exp $
 .\
 .\ Copyright (c) 1990, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -490,7 +490,7 @@ The terminal size is recorded as having
 rows.
 .It Cm dec
 Set modes suitable for users of Digital Equipment Corporation systems
-.Pf ( Dv ERASE ,
+.Dv ( ERASE ,
 .Dv KILL ,
 and
 .Dv INTR



CVS commit: src/bin/stty

2010-04-05 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Apr  5 16:19:54 UTC 2010

Modified Files:
src/bin/stty: stty.1

Log Message:
\\ - \e


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/bin/stty/stty.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/stty.1
diff -u src/bin/stty/stty.1:1.38 src/bin/stty/stty.1:1.39
--- src/bin/stty/stty.1:1.38	Mon Dec 14 07:35:44 2009
+++ src/bin/stty/stty.1	Mon Apr  5 16:19:54 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: stty.1,v 1.38 2009/12/14 07:35:44 wiz Exp $
+.\	$NetBSD: stty.1,v 1.39 2010/04/05 16:19:54 joerg Exp $
 .\
 .\ Copyright (c) 1990, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -324,7 +324,7 @@
 Otherwise control characters echo as themselves.
 .It Cm echoprt Pq Fl echoprt
 For printing terminals.
-If set, echo erased characters backwards within ``\\''
+If set, echo erased characters backwards within ``\e''
 and ``/''.
 Otherwise, disable this feature.
 .It Cm noflsh Pq Fl noflsh



CVS commit: src/bin/stty

2009-12-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Dec 14 02:34:52 UTC 2009

Modified Files:
src/bin/stty: stty.1

Log Message:
Document stty insane properly. Closes PR bin/25024.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/bin/stty/stty.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/stty.1
diff -u src/bin/stty/stty.1:1.36 src/bin/stty/stty.1:1.37
--- src/bin/stty/stty.1:1.36	Wed May 13 22:41:43 2009
+++ src/bin/stty/stty.1	Mon Dec 14 02:34:52 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: stty.1,v 1.36 2009/05/13 22:41:43 wiz Exp $
+.\	$NetBSD: stty.1,v 1.37 2009/12/14 02:34:52 dholland Exp $
 .\
 .\ Copyright (c) 1990, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -436,7 +436,9 @@
 .It Cm sane
 Resets all modes to reasonable values for interactive terminal use.
 .It Cm insane
-Resets all modes to unreasonable values for interactive terminal use.
+Sets all modes to random values, which are very likely
+.Pq but not guaranteed
+to be unreasonable for interactive terminal use.
 .It Cm tty
 Set the line discipline to the standard terminal line discipline
 .Dv TTYDISC .



CVS commit: src/bin/stty

2009-12-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Dec 14 07:35:44 UTC 2009

Modified Files:
src/bin/stty: stty.1

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/bin/stty/stty.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/stty/stty.1
diff -u src/bin/stty/stty.1:1.37 src/bin/stty/stty.1:1.38
--- src/bin/stty/stty.1:1.37	Mon Dec 14 02:34:52 2009
+++ src/bin/stty/stty.1	Mon Dec 14 07:35:44 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: stty.1,v 1.37 2009/12/14 02:34:52 dholland Exp $
+.\	$NetBSD: stty.1,v 1.38 2009/12/14 07:35:44 wiz Exp $
 .\
 .\ Copyright (c) 1990, 1993, 1994
 .\	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\
 .\ @(#)stty.1	8.5 (Berkeley) 6/1/94
 .\
-.Dd June 24, 2007
+.Dd December 14, 2009
 .Dt STTY 1
 .Os
 .Sh NAME