summaryrefslogtreecommitdiffstats
path: root/games/hangman/getguess.c
diff options
context:
space:
mode:
authorbillf <billf@FreeBSD.org>1999-12-10 03:23:01 +0000
committerbillf <billf@FreeBSD.org>1999-12-10 03:23:01 +0000
commit767877b61197f18d8893f585bfda0036608ced96 (patch)
tree4222250bca638e22dc39ae238bee585426d3328a /games/hangman/getguess.c
parent2c49cfa3455a3ebb31e0de5d0c562591d9490099 (diff)
downloadFreeBSD-src-767877b61197f18d8893f585bfda0036608ced96.zip
FreeBSD-src-767877b61197f18d8893f585bfda0036608ced96.tar.gz
-Wall fixes.
Diffstat (limited to 'games/hangman/getguess.c')
-rw-r--r--games/hangman/getguess.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/games/hangman/getguess.c b/games/hangman/getguess.c
index a338e5c..4caaf0e 100644
--- a/games/hangman/getguess.c
+++ b/games/hangman/getguess.c
@@ -46,6 +46,7 @@ static const char rcsid[] =
* getguess:
* Get another guess
*/
+void
getguess()
{
int i;
@@ -66,7 +67,7 @@ getguess()
break;
}
else if (ch == CTRL('D'))
- die();
+ die(0);
else
mvprintw(MESGY, MESGX, "Not a valid guess: '%s'",
unctrl(ch));
@@ -90,9 +91,10 @@ getguess()
* readch;
* Read a character from the input
*/
+char
readch()
{
- int cnt, r;
+ int cnt;
auto char ch;
cnt = 0;
@@ -100,7 +102,7 @@ readch()
if (read(0, &ch, sizeof ch) <= 0)
{
if (++cnt > 100)
- die();
+ die(0);
}
else if (ch == CTRL('L')) {
wrefresh(curscr);
OpenPOWER on IntegriCloud