fold: Fix usage and manpage for -width

This commit is contained in:
sin 2015-03-05 08:15:23 +00:00
parent eca23e5308
commit cb04864692
2 changed files with 7 additions and 10 deletions

15
fold.1
View File

@ -1,4 +1,4 @@
.Dd January 25, 2015 .Dd March 5, 2015
.Dt FOLD 1 .Dt FOLD 1
.Os sbase .Os sbase
.Sh NAME .Sh NAME
@ -7,8 +7,7 @@
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl bs .Op Fl bs
.Op Fl w Ar width .Op Fl w Ar width | Fl Ns Ar width
.Op Fl N
.Op Ar file ... .Op Ar file ...
.Sh DESCRIPTION .Sh DESCRIPTION
.Nm .Nm
@ -27,11 +26,9 @@ Count bytes rather than characters.
If a line contains spaces, break If a line contains spaces, break
at the last space within at the last space within
.Ar width . .Ar width .
.It Fl w Ar width | Fl N .It Fl w Ar width | Fl Ns Ar width
Break at Break at
.Ar width .Ar width
|
.Sy N
characters. Default is 80. characters. Default is 80.
.El .El
.Sh STANDARDS .Sh STANDARDS
@ -41,6 +38,6 @@ utility is compliant with the
.St -p1003.1-2008 .St -p1003.1-2008
specification. specification.
.Pp .Pp
The The obsolete
.Op Fl N .Op Fl Ns Ar width
flag is an extension to that specification. syntax is an extension to that specification.

2
fold.c
View File

@ -65,7 +65,7 @@ fold(FILE *fp, size_t width)
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [-bs] [-w width] [-N] [FILE...]\n", argv0); eprintf("usage: %s [-bs] [-w width | -width] [FILE...]\n", argv0);
} }
int int