diff options
author | tjr <tjr@FreeBSD.org> | 2002-04-18 03:33:51 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-04-18 03:33:51 +0000 |
commit | b7829d60fef4ef94c68a4c95c5e46126cf910197 (patch) | |
tree | 7f6edeec0b2cf0aa105b07956f4009fa50afeefd /usr.bin/fold/fold.1 | |
parent | 50de41829507706df2569f9a0e93027eeae643ba (diff) | |
download | FreeBSD-src-b7829d60fef4ef94c68a4c95c5e46126cf910197.zip FreeBSD-src-b7829d60fef4ef94c68a4c95c5e46126cf910197.tar.gz |
Add the -b option (break at byte position, not column number) and the -s
option (try to break at word bounaries) for SUSv3 conformance.
Partially based on the NetBSD version, with the following changes:
- style(9)
- break on <blank>s, not spaces, per POSIX (and GNU)
- when looking for last space on line, search backwards instead of
forwards; less comparisons needed this way.
- use LINE_MAX macro instead of a magic number and a comment saying it is
LINE_MAX.
PR: 36245
Reviewed by: mike
Obtained from: NetBSD (partially)
Diffstat (limited to 'usr.bin/fold/fold.1')
-rw-r--r-- | usr.bin/fold/fold.1 | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.bin/fold/fold.1 b/usr.bin/fold/fold.1 index 63a52f2..071f39a 100644 --- a/usr.bin/fold/fold.1 +++ b/usr.bin/fold/fold.1 @@ -32,7 +32,7 @@ .\" @(#)fold.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd April 17, 2002 .Dt FOLD 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Nd "fold long lines for finite width output device" .Sh SYNOPSIS .Nm +.Op Fl bs .Op Fl w Ar width .Op Ar .Sh DESCRIPTION @@ -50,6 +51,14 @@ breaking the lines to have a maximum of 80 characters. .Pp The following option is available: .Bl -tag -width indent +.It Fl b +Count +.Ar width +in bytes rather than column positions. +.It Fl s +Fold line after the last blank character within the first +.Ar width +column positions (or bytes). .It Fl w Ar width Specify a line width to use instead of the default 80 characters. .Ar Width @@ -61,5 +70,10 @@ before using .El .Sh SEE ALSO .Xr expand 1 +.Sh STANDARDS +The +.Nm +utility conforms to +.St -p1003.1-2001 . .Sh BUGS If underlining is present it may be messed up by folding. |