diff options
| author | Philippe Charnier <charnier@FreeBSD.org> | 1997-08-25 06:44:59 +0000 |
|---|---|---|
| committer | Philippe Charnier <charnier@FreeBSD.org> | 1997-08-25 06:44:59 +0000 |
| commit | 8c85cce77a4d60b5fbd86fde122963e67bbc78fb (patch) | |
| tree | db202c4294313c83e24d25adac21ea368f1ec3ab /usr.bin/wc | |
| parent | 752d887a62a5c2e7cc02e67cae43a77d13ad82f3 (diff) | |
Notes
Diffstat (limited to 'usr.bin/wc')
| -rw-r--r-- | usr.bin/wc/wc.1 | 14 | ||||
| -rw-r--r-- | usr.bin/wc/wc.c | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/usr.bin/wc/wc.1 b/usr.bin/wc/wc.1 index f081b6b97ea6..fec2b5f57629 100644 --- a/usr.bin/wc/wc.1 +++ b/usr.bin/wc/wc.1 @@ -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 diff --git a/usr.bin/wc/wc.c b/usr.bin/wc/wc.c index 1670f1b36499..68ea08c02a2e 100644 --- a/usr.bin/wc/wc.c +++ b/usr.bin/wc/wc.c @@ -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); } |
