From a9ed3c3e82c4d571af1500d07caafcfa27316cf2 Mon Sep 17 00:00:00 2001 From: jmc Date: Sat, 2 Jul 2005 08:32:32 +0000 Subject: KNF and WARNS=3 --- cribbage/cards.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'cribbage/cards.c') diff --git a/cribbage/cards.c b/cribbage/cards.c index 50e2f481..dba3bc7b 100644 --- a/cribbage/cards.c +++ b/cribbage/cards.c @@ -1,4 +1,4 @@ -/* $NetBSD: cards.c,v 1.7 2003/08/07 09:37:08 agc Exp $ */ +/* $NetBSD: cards.c,v 1.8 2005/07/02 08:32:32 jmc Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #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.8 2005/07/02 08:32:32 jmc Exp $"); #endif #endif /* not lint */ @@ -51,8 +51,7 @@ __RCSID("$NetBSD: cards.c,v 1.7 2003/08/07 09:37:08 agc Exp $"); * Initialize a deck of cards to contain one of each type. */ void -makedeck(d) - CARD d[]; +makedeck(CARD d[]) { int i, j, k; @@ -72,8 +71,7 @@ makedeck(d) * see Knuth, vol. 2, page 125. */ void -shuffle(d) - CARD d[]; +shuffle(CARD d[]) { int j, k; CARD c; @@ -90,8 +88,7 @@ shuffle(d) * return true if the two cards are equal... */ int -eq(a, b) - CARD a, b; +eq(CARD a, CARD b) { return ((a.rank == b.rank) && (a.suit == b.suit)); } @@ -100,10 +97,7 @@ eq(a, b) * 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; @@ -117,9 +111,7 @@ is_one(a, b, n) * 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; @@ -135,9 +127,7 @@ cremove(a, d, n) * Sort a hand of n cards */ void -sorthand(h, n) - CARD h[]; - int n; +sorthand(CARD h[], int n) { CARD *cp, *endp; CARD c; -- cgit v1.2.3-56-ge451