diff options
author | charnier <charnier@FreeBSD.org> | 1997-06-23 06:45:38 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-06-23 06:45:38 +0000 |
commit | 514c793c39343496d38d00916410302a19e4c3ff (patch) | |
tree | 030f1d53caf5de80f5d933b86580dc428f0e644b /usr.bin/biff | |
parent | ff79b92da85d8241ca66ea45b76cab7190765149 (diff) | |
download | FreeBSD-src-514c793c39343496d38d00916410302a19e4c3ff.zip FreeBSD-src-514c793c39343496d38d00916410302a19e4c3ff.tar.gz |
Typo fix in man page. Use err(3) instead of local copy.
Diffstat (limited to 'usr.bin/biff')
-rw-r--r-- | usr.bin/biff/biff.1 | 4 | ||||
-rw-r--r-- | usr.bin/biff/biff.c | 24 |
2 files changed, 10 insertions, 18 deletions
diff --git a/usr.bin/biff/biff.1 b/usr.bin/biff/biff.1 index c850bf6..c0caf75 100644 --- a/usr.bin/biff/biff.1 +++ b/usr.bin/biff/biff.1 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)biff.1 8.1 (Berkeley) 6/6/93 -.\" $Id$ +.\" $Id: biff.1,v 1.4 1997/02/22 19:54:13 peter Exp $ .\" .Dd June 6, 1993 .Dt BIFF 1 @@ -40,7 +40,7 @@ .Nd "be notified if mail arrives and who it is from" .Sh SYNOPSIS .Nm biff -.Op Cm ny +.Op Cm n | y .Sh DESCRIPTION .Nm Biff informs the system whether you want to be notified when mail arrives diff --git a/usr.bin/biff/biff.c b/usr.bin/biff/biff.c index 4d59650..a3e450c 100644 --- a/usr.bin/biff/biff.c +++ b/usr.bin/biff/biff.c @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $Id$ */ #ifndef lint @@ -48,9 +50,9 @@ static char sccsid[] = "@(#)biff.c 8.1 (Berkeley) 6/6/93"; #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <err.h> static void usage __P((void)); -static void err __P((char *)); main(argc, argv) int argc; @@ -70,13 +72,11 @@ main(argc, argv) argc -= optind; argv += optind; - if ((name = ttyname(STDERR_FILENO)) == NULL) { - (void)fprintf(stderr, "biff: unknown tty\n"); - exit(2); - } + if ((name = ttyname(STDERR_FILENO)) == NULL) + err(2, "unknown tty"); if (stat(name, &sb)) - err(name); + err(2, "stat"); if (*argv == NULL) { (void)printf("is %s\n", sb.st_mode&0100 ? "y" : "n"); @@ -86,11 +86,11 @@ main(argc, argv) switch(argv[0][0]) { case 'n': if (chmod(name, sb.st_mode & ~0100) < 0) - err(name); + err(2, name); break; case 'y': if (chmod(name, sb.st_mode | 0100) < 0) - err(name); + err(2, name); break; default: usage(); @@ -99,14 +99,6 @@ main(argc, argv) } static void -err(name) - char *name; -{ - (void)fprintf(stderr, "biff: %s: %s\n", name, strerror(errno)); - exit(2); -} - -static void usage() { (void)fprintf(stderr, "usage: biff [y | n]\n"); |