mirror of
https://github.com/openbsd/src.git
synced 2024-12-21 23:18:00 -08:00
Emit a warning if all fortunes in the file are too short or too long
From Nir Lichtman
This commit is contained in:
parent
5793e77b11
commit
1d26f69e64
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: fortune.c,v 1.66 2024/10/20 21:07:58 tb Exp $ */
|
/* $OpenBSD: fortune.c,v 1.67 2024/10/21 06:39:03 tb Exp $ */
|
||||||
/* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */
|
/* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -163,8 +163,11 @@ main(int ac, char *av[])
|
|||||||
|
|
||||||
init_prob();
|
init_prob();
|
||||||
if ((Short_only && minlen_in_list(File_list) > SLEN) ||
|
if ((Short_only && minlen_in_list(File_list) > SLEN) ||
|
||||||
(Long_only && maxlen_in_list(File_list) <= SLEN))
|
(Long_only && maxlen_in_list(File_list) <= SLEN)) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"no fortunes matching length constraint found\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
get_fort();
|
get_fort();
|
||||||
|
Loading…
Reference in New Issue
Block a user