summaryrefslogtreecommitdiffstats
path: root/robots
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>1999-09-18 19:38:46 +0000
committerjsm <jsm@NetBSD.org>1999-09-18 19:38:46 +0000
commit623e5e8eddc42ee4e3cff7c418dc2d3d4e96193f (patch)
tree75e04a7aee754535f179cbf6b43570d46e5e75e7 /robots
parentfa213838b361bf110cedaa5fd78622fe38c911e2 (diff)
downloadbsdgames-darwin-623e5e8eddc42ee4e3cff7c418dc2d3d4e96193f.tar.gz
bsdgames-darwin-623e5e8eddc42ee4e3cff7c418dc2d3d4e96193f.tar.zst
bsdgames-darwin-623e5e8eddc42ee4e3cff7c418dc2d3d4e96193f.zip
Fix -Wsign-compare warnings.
Diffstat (limited to 'robots')
-rw-r--r--robots/extern.c6
-rw-r--r--robots/robots.h6
-rw-r--r--robots/score.c9
3 files changed, 11 insertions, 10 deletions
diff --git a/robots/extern.c b/robots/extern.c
index 395c021b..77d90047 100644
--- a/robots/extern.c
+++ b/robots/extern.c
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.c,v 1.6 1999/09/08 21:17:57 jsm Exp $ */
+/* $NetBSD: extern.c,v 1.7 1999/09/18 19:38:53 jsm Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)extern.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: extern.c,v 1.6 1999/09/08 21:17:57 jsm Exp $");
+__RCSID("$NetBSD: extern.c,v 1.7 1999/09/18 19:38:53 jsm Exp $");
#endif
#endif /* not lint */
@@ -73,7 +73,7 @@ int Num_robots; /* Number of robots left */
int Num_scrap; /* Number of scrap heaps */
int Num_scores; /* Number of scores posted */
int Num_games; /* Number of games to play */
-int Score; /* Current score */
+u_int32_t Score; /* Current score */
int Start_level = 1; /* Level on which to start */
int Wait_bonus; /* bonus for waiting */
diff --git a/robots/robots.h b/robots/robots.h
index eb93806a..c826133e 100644
--- a/robots/robots.h
+++ b/robots/robots.h
@@ -1,4 +1,4 @@
-/* $NetBSD: robots.h,v 1.12 1999/09/12 09:02:22 jsm Exp $ */
+/* $NetBSD: robots.h,v 1.13 1999/09/18 19:38:54 jsm Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -109,9 +109,11 @@ extern bool Pattern_roll, Stand_still;
extern char Cnt_move, Field[Y_FIELDSIZE][X_FIELDSIZE], Run_ch;
extern const char *Next_move, *Move_list;
-extern int Count, Level, Num_robots, Num_scrap, Num_scores, Score,
+extern int Count, Level, Num_robots, Num_scrap, Num_scores,
Start_level, Wait_bonus, Num_games;
+extern u_int32_t Score;
+
extern COORD Max, Min, My_pos, Robots[], Scrap[];
extern jmp_buf End_move;
diff --git a/robots/score.c b/robots/score.c
index ee0b5b18..092b9fdc 100644
--- a/robots/score.c
+++ b/robots/score.c
@@ -1,4 +1,4 @@
-/* $NetBSD: score.c,v 1.10 1999/09/12 09:02:22 jsm Exp $ */
+/* $NetBSD: score.c,v 1.11 1999/09/18 19:38:54 jsm Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: score.c,v 1.10 1999/09/12 09:02:22 jsm Exp $");
+__RCSID("$NetBSD: score.c,v 1.11 1999/09/18 19:38:54 jsm Exp $");
#endif
#endif /* not lint */
@@ -121,7 +121,7 @@ score(score_wfd)
{
int inf = score_wfd;
SCORE *scp;
- int uid;
+ u_int32_t uid;
bool done_show = FALSE;
Newscore = FALSE;
@@ -134,8 +134,7 @@ score(score_wfd)
if (Top[MAXSCORES-1].s_score <= Score) {
numscores = 0;
for (scp = Top; scp < &Top[MAXSCORES]; scp++)
- if (scp->s_score < 0 ||
- (scp->s_uid == uid && ++numscores == max_uid)) {
+ if ((scp->s_uid == uid && ++numscores == max_uid)) {
if (scp->s_score > Score)
break;
scp->s_score = Score;