1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00

Document -D option. Give a more helpful error message for some cases.

PR:		bin/10152
Obtained from:	Matthew D. Fuller <fullermd@futuresouth.com>
This commit is contained in:
Daniel C. Sobral 1999-03-09 11:44:51 +00:00
parent 269dfbee64
commit d0194c03fb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44599
2 changed files with 11 additions and 3 deletions

View File

@ -33,7 +33,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)fortune.6 8.3 (Berkeley) 4/19/94
.\" $Id$
.\" $Id: fortune.6,v 1.5 1997/02/22 14:46:50 peter Exp $
.\"
.Dd April 19, 1994
.Dt FORTUNE 6
@ -43,7 +43,7 @@
.Nd "print a random, hopefully interesting, adage"
.Sh SYNOPSIS
.Nm fortune
.Op Fl aefilosw
.Op Fl aDefilosw
.Op Fl m Ar pattern
.Oo
.Op Ar \&N%
@ -63,6 +63,10 @@ Choose from all lists of maxims, both offensive and not.
(See the
.Fl o
option for more information on offensive fortunes.)
.It Fl D
Enable additional debugging output.
Specify this option multiple times for more verbose output.
Only available if compiled with -DDEBUG.
.It Fl e
Consider all fortune files to be of equal size (see discussion below
on multiple files).

View File

@ -799,8 +799,12 @@ int check_for_offend;
datfile = copy(file, (unsigned int) (strlen(file) + 4)); /* +4 for ".dat" */
strcat(datfile, ".dat");
if (access(datfile, R_OK) < 0) {
DPRINTF(2, (stderr, "FALSE (no readable \".dat\" file)\n"));
#ifdef DEBUG
if (Debug < 2)
DPRINTF(0, (stderr, "Warning: file \"%s\" unreadable\n", datfile));
#endif
free(datfile);
DPRINTF(2, (stderr, "FALSE (no \".dat\" file)\n"));
return FALSE;
}
if (datp != NULL)