-/* $NetBSD: cards.c,v 1.7 2003/08/07 09:37:08 agc Exp $ */
+/* $NetBSD: cards.c,v 1.9 2009/08/12 05:48:04 dholland Exp $ */
/*-
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)cards.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: cards.c,v 1.7 2003/08/07 09:37:08 agc Exp $");
+__RCSID("$NetBSD: cards.c,v 1.9 2009/08/12 05:48:04 dholland Exp $");
#endif
#endif /* not lint */
* Initialize a deck of cards to contain one of each type.
*/
void
-makedeck(d)
- CARD d[];
+makedeck(CARD d[])
{
int i, j, k;
* see Knuth, vol. 2, page 125.
*/
void
-shuffle(d)
- CARD d[];
+shuffle(CARD d[])
{
int j, k;
CARD c;
/*
* return true if the two cards are equal...
*/
-int
-eq(a, b)
- CARD a, b;
+static int
+eq(CARD a, CARD b)
{
return ((a.rank == b.rank) && (a.suit == b.suit));
}
* is_one returns TRUE if a is in the set of cards b
*/
int
-is_one(a, b, n)
- CARD a;
- const CARD b[];
- int n;
+is_one(CARD a, const CARD b[], int n)
{
int i;
* remove the card a from the deck d of n cards
*/
void
-cremove(a, d, n)
- CARD a, d[];
- int n;
+cremove(CARD a, CARD d[], int n)
{
int i, j;
* Sort a hand of n cards
*/
void
-sorthand(h, n)
- CARD h[];
- int n;
+sorthand(CARD h[], int n)
{
CARD *cp, *endp;
CARD c;