summaryrefslogtreecommitdiffstats
path: root/hangman/getword.c
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>2002-01-20 00:42:51 +0000
committerjsm <jsm@NetBSD.org>2002-01-20 00:42:51 +0000
commit067a8b32991f06a59ed967af92ffa3d577522fd2 (patch)
treee2a7ce72009b355c7eb8c4c7ef384648261fcf2c /hangman/getword.c
parent8559db615a9f7ef8bc1aa991f6370ad5ef72ae31 (diff)
downloadbsdgames-darwin-067a8b32991f06a59ed967af92ffa3d577522fd2.tar.gz
bsdgames-darwin-067a8b32991f06a59ed967af92ffa3d577522fd2.tar.zst
bsdgames-darwin-067a8b32991f06a59ed967af92ffa3d577522fd2.zip
Allow minimum word length to be set on command line. Patch based on
one by Joey Hess <joeyh@debian.org>.
Diffstat (limited to 'hangman/getword.c')
-rw-r--r--hangman/getword.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hangman/getword.c b/hangman/getword.c
index 28fa3b8d..571f0d0c 100644
--- a/hangman/getword.c
+++ b/hangman/getword.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getword.c,v 1.6 1999/09/08 21:57:17 jsm Exp $ */
+/* $NetBSD: getword.c,v 1.7 2002/01/20 00:42:51 jsm Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)getword.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: getword.c,v 1.6 1999/09/08 21:57:17 jsm Exp $");
+__RCSID("$NetBSD: getword.c,v 1.7 2002/01/20 00:42:51 jsm Exp $");
#endif
#endif /* not lint */
@@ -64,7 +64,7 @@ getword()
if (fgets(Word, BUFSIZ, inf) == NULL)
continue;
Word[strlen(Word) - 1] = '\0';
- if (strlen(Word) < MINLEN)
+ if (strlen(Word) < Minlen)
continue;
for (wp = Word; *wp; wp++)
if (!islower(*wp))