diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2012-01-15 11:43:46 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2012-01-15 11:43:46 +0000 |
commit | a8dacf6f0c85b10ae9582a003ed02b9b02bbc3cb (patch) | |
tree | e37b59af56468fad93810565393b003c170ab430 /usr.bin/fmt | |
parent | 8d797000595b2261ba19b46f3d940b0cae9dac4c (diff) |
Document the EXIT STATUS and remove an outdated related comment.
While here,
* as usual, the "first appeared" clause requires fixing, and
* mention the date of the original implementation,
using information from the CSRG archive CD 1.
Triggered by a question asked by lum@, feedback and ok jmc@.
Diffstat (limited to 'usr.bin/fmt')
-rw-r--r-- | usr.bin/fmt/fmt.1 | 13 | ||||
-rw-r--r-- | usr.bin/fmt/fmt.c | 4 |
2 files changed, 11 insertions, 6 deletions
diff --git a/usr.bin/fmt/fmt.1 b/usr.bin/fmt/fmt.1 index 068e9e4a53a..c4a83454dff 100644 --- a/usr.bin/fmt/fmt.1 +++ b/usr.bin/fmt/fmt.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fmt.1,v 1.22 2010/10/28 21:32:54 jmc Exp $ +.\" $OpenBSD: fmt.1,v 1.23 2012/01/15 11:43:45 schwarze Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)fmt.1 8.1 (Berkeley) 6/6/93 .\" -.Dd $Mdocdate: October 28 2010 $ +.Dd $Mdocdate: January 15 2012 $ .Dt FMT 1 .Os .Sh NAME @@ -145,6 +145,10 @@ will reformat a paragraph, evening the lines: .Pp .Dl !}fmt +.Sh EXIT STATUS +.Ex -std +The latter happens with invalid options, insufficient memory, +or when an input file is not found or not readable. .Sh SEE ALSO .Xr indent 1 , .Xr mail 1 , @@ -152,13 +156,14 @@ evening the lines: .Sh HISTORY The .Nm -command appeared in -.Bx 3 . +command first appeared in +.Bx 2 . .Pp The version described herein is a complete rewrite and appeared in .Ox 2.4 . .Sh AUTHORS .An Kurt Shoens +(July 1978) .An Liz Allen (added goal length concept) .An Gareth McCaughan diff --git a/usr.bin/fmt/fmt.c b/usr.bin/fmt/fmt.c index 1ce6f7e05f0..40aa65edc12 100644 --- a/usr.bin/fmt/fmt.c +++ b/usr.bin/fmt/fmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fmt.c,v 1.27 2009/10/27 23:59:38 deraadt Exp $ */ +/* $OpenBSD: fmt.c,v 1.28 2012/01/15 11:43:45 schwarze Exp $ */ /* Sensible version of fmt * @@ -221,7 +221,7 @@ static const char *sentence_enders = ".?!"; /* Double-space after these */ static int grok_mail_headers = 0; /* treat embedded mail headers magically? */ static int format_troff = 0; /* Format troff? */ -static int n_errors = 0; /* Number of failed files. Return on exit. */ +static int n_errors = 0; /* Number of failed files. */ static char *output_buffer = NULL; /* Output line will be built here */ static size_t x; /* Horizontal position in output line */ static size_t x0; /* Ditto, ignoring leading whitespace */ |