Sync usage string according to man page. Silent -Wall.
This commit is contained in:
parent
b4ee63a927
commit
628c52489f
@ -33,7 +33,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)wc.1 8.2 (Berkeley) 4/19/94
|
||||
.\" $Id$
|
||||
.\" $Id: wc.1,v 1.4 1997/02/22 19:57:44 peter Exp $
|
||||
.\"
|
||||
.Dd April 19, 1994
|
||||
.Dt WC 1
|
||||
@ -44,10 +44,10 @@
|
||||
.Sh SYNOPSIS
|
||||
.Nm wc
|
||||
.Op Fl clw
|
||||
.Op Ar file ...
|
||||
.Op Ar
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm wc
|
||||
.Nm
|
||||
utility displays the number of lines, words, and bytes contained in each
|
||||
input
|
||||
.Ar file
|
||||
@ -77,7 +77,7 @@ is written to the standard output.
|
||||
.El
|
||||
.Pp
|
||||
When an option is specified,
|
||||
.Nm wc
|
||||
.Nm
|
||||
only reports the information requested by that option.
|
||||
The default action is equivalent to specifying all of the flags.
|
||||
.Pp
|
||||
@ -85,13 +85,13 @@ If no files are specified, the standard input is used and no
|
||||
file name is displayed.
|
||||
.Pp
|
||||
The
|
||||
.Nm wc
|
||||
.Nm
|
||||
utility exits 0 on success, and >0 if an error occurs.
|
||||
.Sh SEE ALSO
|
||||
.Xr isspace 3
|
||||
.Sh COMPATIBILITY
|
||||
Historically, the
|
||||
.Nm wc
|
||||
.Nm
|
||||
utility was documented to define a word as a ``maximal string of
|
||||
characters delimited by <space>, <tab> or <newline> characters''.
|
||||
The implementation, however, didn't handle non-printing characters
|
||||
@ -105,7 +105,7 @@ function, as required by
|
||||
.St -p1003.2 .
|
||||
.Sh STANDARDS
|
||||
The
|
||||
.Nm wc
|
||||
.Nm
|
||||
function conforms to
|
||||
.St -p1003.2 .
|
||||
.Sh HISTORY
|
||||
|
@ -42,7 +42,7 @@ static const char copyright[] =
|
||||
static const char sccsid[] = "@(#)wc.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
static const char rcsid[] =
|
||||
"$Id: wc.c,v 1.6 1997/02/22 19:57:44 peter Exp $";
|
||||
"$Id: wc.c,v 1.7 1997/03/29 04:33:57 imp Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -153,7 +153,7 @@ cnt(file)
|
||||
* logic.
|
||||
*/
|
||||
if (doline) {
|
||||
while (len = read(fd, buf, MAXBSIZE)) {
|
||||
while ((len = read(fd, buf, MAXBSIZE))) {
|
||||
if (len == -1) {
|
||||
warn("%s: read", file);
|
||||
(void)close(fd);
|
||||
@ -193,7 +193,7 @@ cnt(file)
|
||||
}
|
||||
|
||||
/* Do it the hard way... */
|
||||
word: for (gotsp = 1; len = read(fd, buf, MAXBSIZE);) {
|
||||
word: for (gotsp = 1; (len = read(fd, buf, MAXBSIZE));) {
|
||||
if (len == -1) {
|
||||
warn("%s: read", file);
|
||||
(void)close(fd);
|
||||
@ -236,6 +236,6 @@ word: for (gotsp = 1; len = read(fd, buf, MAXBSIZE);) {
|
||||
void
|
||||
usage()
|
||||
{
|
||||
(void)fprintf(stderr, "usage: wc [-clw] [files]\n");
|
||||
(void)fprintf(stderr, "usage: wc [-clw] [file ...]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user