Rename ->last_card to ->top_card to match OpenBSD (and also to make
somewhat more sense...)
This commit is contained in:
parent
7aa9230dd8
commit
82ff30a443
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cards.c,v 1.18 2008/02/23 19:09:00 dholland Exp $ */
|
||||
/* $NetBSD: cards.c,v 1.19 2008/02/23 19:49:21 dholland 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.18 2008/02/23 19:09:00 dholland Exp $");
|
||||
__RCSID("$NetBSD: cards.c,v 1.19 2008/02/23 19:49:21 dholland Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -106,7 +106,7 @@ set_up(dp)
|
||||
/* convert offsets from big-endian byte order */
|
||||
for (i = 0; i < dp->num_cards; i++)
|
||||
BE64TOH(dp->offsets[i]);
|
||||
dp->last_card = 0;
|
||||
dp->top_card = 0;
|
||||
dp->gojf_used = FALSE;
|
||||
for (i = 0; i < dp->num_cards; i++) {
|
||||
off_t temp;
|
||||
@ -132,8 +132,8 @@ get_card(dp)
|
||||
OWN *op;
|
||||
|
||||
do {
|
||||
fseek(deckf, dp->offsets[dp->last_card], SEEK_SET);
|
||||
dp->last_card = ++(dp->last_card) % dp->num_cards;
|
||||
fseek(deckf, dp->offsets[dp->top_card], SEEK_SET);
|
||||
dp->top_card = ++(dp->top_card) % dp->num_cards;
|
||||
type_maj = getc(deckf);
|
||||
} while (dp->gojf_used && type_maj == GOJF);
|
||||
type_min = getc(deckf);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: deck.h,v 1.6 2003/08/07 09:37:27 agc Exp $ */
|
||||
/* $NetBSD: deck.h,v 1.7 2008/02/23 19:49:21 dholland Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
struct dk_st { /* deck description structure */
|
||||
int num_cards; /* number of cards in deck */
|
||||
int last_card; /* number of last card picked */
|
||||
int top_card; /* number of last card picked */
|
||||
bool gojf_used; /* set if gojf card out of deck */
|
||||
off_t *offsets; /* offsets for start of cards */
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user