Module Name:    src
Committed By:   riz
Date:           Thu Jun 28 16:12:07 UTC 2012

Modified Files:
        src/bin/stty [netbsd-6]: stty.1 stty.c

Log Message:
Pull up following revision(s) (requested by wiz in ticket #364):
        bin/stty/stty.1: revision 1.40
        bin/stty/stty.1: revision 1.41
        bin/stty/stty.c: revision 1.22
- 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.
- remove trailing white space;
- sync `usage' with man page.
>From patch by Bug Hunting.
Remove another Pf. From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.8.1 src/bin/stty/stty.1
cvs rdiff -u -r1.21 -r1.21.20.1 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.1
diff -u src/bin/stty/stty.1:1.39 src/bin/stty/stty.1:1.39.8.1
--- src/bin/stty/stty.1:1.39	Mon Apr  5 16:19:54 2010
+++ src/bin/stty/stty.1	Thu Jun 28 16:12:07 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: stty.1,v 1.39 2010/04/05 16:19:54 joerg Exp $
+.\"	$NetBSD: stty.1,v 1.39.8.1 2012/06/28 16:12:07 riz 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 the one preceding character could have been
 erased with simply an
 .Dv ERASE
-character.)
+character).
 .It Cm mdmbuf Pq Fl mdmbuf
 If set, flow control output based on condition of Carrier Detect.
 Otherwise writes return an error if Carrier Detect is low (and Carrier
 is not being ignored with the
 .Dv CLOCAL
-flag.)
+flag).
 .It Cm flusho Pq Fl flusho
 Indicates output is (is not) being discarded.
 .It Cm pendin Pq Fl pendin
@@ -364,18 +388,18 @@ or more input arrives.
 .It Ar control-character Ar string
 Set
 .Ar control-character
-to
+to string
 .Ar string .
-If string is a single character,
-the control character is set to
+If the string is a single character,
+then the control character is set to
 that character.
-If string is the
+If the string is the
 two character sequence "^-" or the
-string "undef" the control character
-is disabled (i.e. set to
-.Bro Dv _POSIX_VDISABLE Brc . )
+string "undef", then the control character
+is disabled (i.e., set to
+.Bro Dv _POSIX_VDISABLE Brc ) .
 .Pp
-Recognized control-characters:
+Recognized control characters:
 .Bd -ragged -offset indent
 .Bl -column character Subscript Description
 .It control- Ta "" Ta ""
@@ -402,7 +426,7 @@ Recognized control-characters:
 .It Cm min Ar number
 .It Cm time Ar number
 Set the value of min or time to
-number.
+.Ar number .
 .Dv MIN
 and
 .Dv TIME
@@ -458,15 +482,15 @@ The terminal size is recorded as having
 .Ar number
 columns.
 .It Cm cols Ar number
-is an alias for
+An alias for
 .Cm columns .
 .It Cm rows Ar number
 The terminal size is recorded as having
 .Ar number
 rows.
 .It Cm dec
-Set modes suitable for users of Digital Equipment Corporation systems (
-.Dv ERASE ,
+Set modes suitable for users of Digital Equipment Corporation systems
+.Dv ( ERASE ,
 .Dv KILL ,
 and
 .Dv INTR
@@ -474,7 +498,7 @@ characters are set to ^?, ^U, and ^C;
 .Dv ixany
 is disabled, and
 .Dv crt
-is enabled.)
+is enabled).
 .It Cm extproc Pq Fl extproc
 If set, this flag indicates that some amount of terminal processing is being
 performed by either the terminal hardware or by the remote side connected
@@ -505,7 +529,9 @@ first rows, then columns.
 .El
 .Ss Compatibility Modes
 These modes remain for compatibility with the previous version of
-the stty command.
+the
+.Nm
+utility.
 .Bl -tag -width Fl
 .It Cm all
 Reports all the terminal modes as with
@@ -590,9 +616,7 @@ incoming STOP character when
 is set.
 .El
 .Sh EXIT STATUS
-The
-.Nm
-utility exits with a value of 0 if successful, and \*[Gt]0 if an error occurs.
+.Ex -std
 .Sh SEE ALSO
 .Xr termios 4 ,
 .Xr tty 4
@@ -602,10 +626,10 @@ The
 utility is expected to be
 .St -p1003.2
 compatible.
-The flags
+The
 .Fl e
 and
 .Fl f
-are
+flags are
 extensions to the standard, as are the operands mentioned in the control
 operations section.

Index: src/bin/stty/stty.c
diff -u src/bin/stty/stty.c:1.21 src/bin/stty/stty.c:1.21.20.1
--- src/bin/stty/stty.c:1.21	Sun Jul 20 00:52:40 2008
+++ src/bin/stty/stty.c	Thu Jun 28 16:12:07 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: stty.c,v 1.21 2008/07/20 00:52:40 lukem Exp $ */
+/* $NetBSD: stty.c,v 1.21.20.1 2012/06/28 16:12:07 riz 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.21.20.1 2012/06/28 16:12:07 riz 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 */
 }

Reply via email to