summaryrefslogtreecommitdiffstats
path: root/cribbage/support.c
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-10-10 12:26:34 +0000
committerlukem <lukem@NetBSD.org>1997-10-10 12:26:34 +0000
commit4af35eddcd99b72236d11e2354dd8fcd3b9f6e74 (patch)
treeb5301debb2cb032e91d96ad619385e02f97382bb /cribbage/support.c
parent952db1ec53b2365d68d84970049975065cd884f5 (diff)
downloadbsdgames-darwin-4af35eddcd99b72236d11e2354dd8fcd3b9f6e74.tar.gz
bsdgames-darwin-4af35eddcd99b72236d11e2354dd8fcd3b9f6e74.tar.zst
bsdgames-darwin-4af35eddcd99b72236d11e2354dd8fcd3b9f6e74.zip
WARNSify
Diffstat (limited to 'cribbage/support.c')
-rw-r--r--cribbage/support.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/cribbage/support.c b/cribbage/support.c
index a2064a21..96ea67ad 100644
--- a/cribbage/support.c
+++ b/cribbage/support.c
@@ -1,4 +1,4 @@
-/* $NetBSD: support.c,v 1.3 1995/03/21 15:08:59 cgd Exp $ */
+/* $NetBSD: support.c,v 1.4 1997/10/10 12:32:36 lukem Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -33,11 +33,12 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)support.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: support.c,v 1.3 1995/03/21 15:08:59 cgd Exp $";
+__RCSID("$NetBSD: support.c,v 1.4 1997/10/10 12:32:36 lukem Exp $");
#endif
#endif /* not lint */
@@ -62,7 +63,7 @@ cchose(h, n, s)
CARD h[];
int n, s;
{
- register int i, j, l;
+ int i, j, l;
if (n <= 1)
return (0);
@@ -132,8 +133,8 @@ plyrhand(hand, s)
char *s;
{
static char prompt[BUFSIZ];
- register int i, j;
- register BOOLEAN win;
+ int i, j;
+ BOOLEAN win;
prhand(hand, CINHAND, Playwin, FALSE);
(void) sprintf(prompt, "Your %s scores ", s);
@@ -167,7 +168,7 @@ comphand(h, s)
CARD h[];
char *s;
{
- register int j;
+ int j;
j = scorehand(h, turnover, CINHAND, strcmp(s, "crib") == 0, FALSE);
prhand(h, CINHAND, Compwin, FALSE);
@@ -190,8 +191,8 @@ chkscr(scr, inc)
myturn = (scr == &cscore);
if (inc != 0) {
- prpeg(Lastscore[myturn], '.', myturn);
- Lastscore[myturn] = *scr;
+ prpeg(Lastscore[(int)myturn], '.', myturn);
+ Lastscore[(int)myturn] = *scr;
*scr += inc;
prpeg(*scr, PEG, myturn);
refresh();
@@ -206,11 +207,11 @@ chkscr(scr, inc)
*/
void
prpeg(score, peg, myturn)
- register int score;
+ int score;
int peg;
BOOLEAN myturn;
{
- register int y, x;
+ int y, x;
if (!myturn)
y = SCORE_Y + 2;
@@ -248,7 +249,7 @@ cdiscard(mycrib)
BOOLEAN mycrib;
{
CARD d[CARDS], h[FULLHAND], cb[2];
- register int i, j, k;
+ int i, j, k;
int nc, ns;
long sums[15];
static int undo1[15] = {0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4};
@@ -301,7 +302,7 @@ anymove(hand, n, sum)
CARD hand[];
int n, sum;
{
- register int i, j;
+ int i, j;
if (n < 1)
return (FALSE);
@@ -322,7 +323,7 @@ anysumto(hand, n, s, t)
CARD hand[];
int n, s, t;
{
- register int i;
+ int i;
for (i = 0; i < n; i++) {
if (s + VAL(hand[i].rank) == t)
@@ -339,7 +340,7 @@ numofval(h, n, v)
CARD h[];
int n, v;
{
- register int i, j;
+ int i, j;
j = 0;
for (i = 0; i < n; i++) {
@@ -357,7 +358,7 @@ makeknown(h, n)
CARD h[];
int n;
{
- register int i;
+ int i;
for (i = 0; i < n; i++)
known[knownum++] = h[i];