-/* $NetBSD: cards.c,v 1.23 2008/02/24 03:56:48 christos Exp $ */
+/* $NetBSD: cards.c,v 1.27 2014/12/29 10:38:52 jnemeth 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.23 2008/02/24 03:56:48 christos Exp $");
+__RCSID("$NetBSD: cards.c,v 1.27 2014/12/29 10:38:52 jnemeth Exp $");
#endif
#endif /* not lint */
#include <sys/types.h>
-#include <sys/endian.h>
+#include <sys/_endian.h>
#include "monop.h"
#include "deck.h"
{ "MU",
"Advance to the nearest Utility.\n"
"If unowned, you may buy it from the bank.\n"
- "If owned, throw dice and pay oner a total of ten times\n"
+ "If owned, throw dice and pay owner a total of ten times\n"
"the amount thrown.\n"
},
{ "MB3",
* This routine initializes the decks from the data above.
*/
void
-init_decks()
+init_decks(void)
{
CC_D.info = cc_cards;
CC_D.num_cards = sizeof(cc_cards) / sizeof(cc_cards[0]);
* This routine sets up the offset pointers for the given deck.
*/
static void
-set_up(dp)
- DECK *dp;
+set_up(DECK *dp)
{
int r1, r2;
int i;
* This routine draws a card from the given deck
*/
void
-get_card(dp)
- DECK *dp;
+get_card(DECK *dp)
{
char type_maj, type_min;
int num;
do {
thiscard = &dp->info[dp->top_card];
type_maj = thiscard->actioncode[0];
- dp->top_card = ++(dp->top_card) % dp->num_cards;
+ dp->top_card = (dp->top_card + 1) % dp->num_cards;
} while (dp->gojf_used && type_maj == GOJF);
type_min = thiscard->actioncode[1];
num = atoi(thiscard->actioncode+2);
* deck.
*/
void
-ret_card(plr)
- PLAY *plr;
+ret_card(PLAY *plr)
{
char type_maj;
int gojfpos, last_card;