diff options
author | 2006-11-29 20:09:27 +0000 | |
---|---|---|
committer | 2006-11-29 20:09:27 +0000 | |
commit | ea05059924e513ef3238601a602906bcfc9687fc (patch) | |
tree | 72250d64a92c0b8d87d304acdb51eb44fb4af60e | |
parent | Remove all the extern cpu_{id,model,whatever} declarations from most (diff) | |
download | wireguard-openbsd-ea05059924e513ef3238601a602906bcfc9687fc.tar.xz wireguard-openbsd-ea05059924e513ef3238601a602906bcfc9687fc.zip |
- sync synopsis and usage()
- sort options
- avoid line split
-rw-r--r-- | usr.bin/fmt/fmt.1 | 50 | ||||
-rw-r--r-- | usr.bin/fmt/fmt.c | 8 |
2 files changed, 29 insertions, 29 deletions
diff --git a/usr.bin/fmt/fmt.1 b/usr.bin/fmt/fmt.1 index a3e3566cf2a..e754d7b6483 100644 --- a/usr.bin/fmt/fmt.1 +++ b/usr.bin/fmt/fmt.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fmt.1,v 1.17 2003/06/10 09:12:10 jmc Exp $ +.\" $OpenBSD: fmt.1,v 1.18 2006/11/29 20:09:27 jmc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -39,16 +39,16 @@ .Nm fmt .Op Fl cmnps .Op Fl d Ar chars -.Op Fl l Ar num -.Op Fl t Ar num +.Op Fl l Ar number +.Op Fl t Ar number +.br .Oo .Ar goal -.Op Ar maximum -| -.Fl Ns Ar width | +.Oo Ar maximum Oc \*(Ba +.Fl Ns Ar width \*(Ba .Fl w Ar width .Oc -.Op Ar file ... +.Op Ar .Sh DESCRIPTION .Nm is a simple text formatter which reads the concatenation of input @@ -87,6 +87,24 @@ The options are as follows: Center the text, line by line. In this case, most of the other options are ignored; no splitting or joining of lines is done. +.It Fl d Ar chars +Treat the +.Ar chars +(and no others) as sentence-ending characters. +By default the +sentence-ending characters are full stop +.Pq Ql \&. , +question mark +.Pq Ql \&? +and exclamation mark +.Pq Ql \&! . +Remember that some characters may need to be +escaped to protect them from your shell. +.It Fl l Ar number +Replace multiple spaces with tabs at the start of each output +line, if possible. +.Ar number +spaces will be replaced with one tab. .It Fl m Try to format mail header lines contained in the input sensibly. .It Fl n @@ -110,24 +128,6 @@ Collapse whitespace inside lines, so that multiple whitespace characters are turned into a single space. (Or, at the end of a sentence, a double space.) -.It Fl d Ar chars -Treat the -.Ar chars -(and no others) as sentence-ending characters. -By default the -sentence-ending characters are full stop -.Pq Ql \&. , -question mark -.Pq Ql \&? -and exclamation mark -.Pq Ql \&! . -Remember that some characters may need to be -escaped to protect them from your shell. -.It Fl l Ar number -Replace multiple spaces with tabs at the start of each output -line, if possible. -.Ar number -spaces will be replaced with one tab. .It Fl t Ar number Assume that the input files' tabs assume .Ar number diff --git a/usr.bin/fmt/fmt.c b/usr.bin/fmt/fmt.c index dd6a674ea6e..96995dc8a73 100644 --- a/usr.bin/fmt/fmt.c +++ b/usr.bin/fmt/fmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fmt.c,v 1.23 2005/03/08 23:34:43 cloder Exp $ */ +/* $OpenBSD: fmt.c,v 1.24 2006/11/29 20:09:27 jmc Exp $ */ /* Sensible version of fmt * @@ -170,7 +170,7 @@ #ifndef lint static const char rcsid[] = - "$OpenBSD: fmt.c,v 1.23 2005/03/08 23:34:43 cloder Exp $"; + "$OpenBSD: fmt.c,v 1.24 2006/11/29 20:09:27 jmc Exp $"; static const char copyright[] = "Copyright (c) 1997 Gareth McCaughan. All rights reserved.\n"; #endif /* not lint */ @@ -711,8 +711,8 @@ usage(void) extern char *__progname; fprintf(stderr, - "Usage: %s [-cmps] [-d chars] [-l num] [-t num]\n" - " [-w width | -width | goal [maximum]] [file ...]\n" + "Usage: %s [-cmnps] [-d chars] [-l number] [-t number]\n" + " [goal [maximum] | -width | -w width] [file ...]\n" "Options: -c center each line instead of formatting\n" " -d <chars> double-space after <chars> at line end\n" " -l <n> turn each <n> spaces at start of line into a tab\n" |