1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-04 12:52:15 +00:00

Typo fix in man page. Use err(3) instead of local copy.

This commit is contained in:
Philippe Charnier 1997-06-23 06:45:38 +00:00
parent 12d20ef97d
commit 0676cb8945
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=26836
2 changed files with 10 additions and 18 deletions

View File

@ -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

View File

@ -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();
@ -98,14 +98,6 @@ main(argc, argv)
exit(sb.st_mode & 0100 ? 0 : 1);
}
static void
err(name)
char *name;
{
(void)fprintf(stderr, "biff: %s: %s\n", name, strerror(errno));
exit(2);
}
static void
usage()
{