summaryrefslogtreecommitdiffstats
path: root/snake
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>1999-09-08 21:57:16 +0000
committerjsm <jsm@NetBSD.org>1999-09-08 21:57:16 +0000
commit56b3b679266d099eba0ac4e8282b239c652357c3 (patch)
tree7e3a0748576fc3fd8c50331f1d419996a73538fd /snake
parent82852318e37fa7eddacc3dd162a2d16d3a7487b9 (diff)
downloadbsdgames-darwin-56b3b679266d099eba0ac4e8282b239c652357c3.tar.gz
bsdgames-darwin-56b3b679266d099eba0ac4e8282b239c652357c3.tar.zst
bsdgames-darwin-56b3b679266d099eba0ac4e8282b239c652357c3.zip
Use the symbolic names `SEEK_SET' and `O_RDONLY' where appropriate in
the games.
Diffstat (limited to 'snake')
-rw-r--r--snake/snake/snake.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/snake/snake/snake.c b/snake/snake/snake.c
index cd1957e5..a356a02f 100644
--- a/snake/snake/snake.c
+++ b/snake/snake/snake.c
@@ -1,4 +1,4 @@
-/* $NetBSD: snake.c,v 1.11 1999/09/08 21:45:31 jsm Exp $ */
+/* $NetBSD: snake.c,v 1.12 1999/09/08 21:57:21 jsm Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
#if 0
static char sccsid[] = "@(#)snake.c 8.2 (Berkeley) 1/7/94";
#else
-__RCSID("$NetBSD: snake.c,v 1.11 1999/09/08 21:45:31 jsm Exp $");
+__RCSID("$NetBSD: snake.c,v 1.12 1999/09/08 21:57:21 jsm Exp $");
#endif
#endif /* not lint */
@@ -506,14 +506,14 @@ post(iscore, flag)
/* Figure out what happened in the past */
read(rawscores, &allbscore, sizeof(short));
read(rawscores, &allbwho, sizeof(short));
- lseek(rawscores, uid * sizeof(short), 0);
+ lseek(rawscores, uid * sizeof(short), SEEK_SET);
read(rawscores, &oldbest, sizeof(short));
if (!flag)
return (score > oldbest ? 1 : 0);
/* Update this jokers best */
if (score > oldbest) {
- lseek(rawscores, uid * sizeof(short), 0);
+ lseek(rawscores, uid * sizeof(short), SEEK_SET);
write(rawscores, &score, sizeof(short));
pr("You bettered your previous best of $%d\n", oldbest);
} else
@@ -522,7 +522,7 @@ post(iscore, flag)
/* See if we have a new champ */
p = getpwuid(allbwho);
if (p == NULL || score > allbscore) {
- lseek(rawscores, 0, 0);
+ lseek(rawscores, 0, SEEK_SET);
write(rawscores, &score, sizeof(short));
write(rawscores, &uid, sizeof(short));
if (allbwho)