diff options
author | billf <billf@FreeBSD.org> | 1999-11-16 02:58:06 +0000 |
---|---|---|
committer | billf <billf@FreeBSD.org> | 1999-11-16 02:58:06 +0000 |
commit | 44fac3a89d25ca434f91c4f961a363ea590faae8 (patch) | |
tree | a0cca4d47c73890ff2acd4b0d9331509ac360eb2 /games/mille | |
parent | ecc8d489403ddff78c214db39def15049d5dae6a (diff) | |
download | FreeBSD-src-44fac3a89d25ca434f91c4f961a363ea590faae8.zip FreeBSD-src-44fac3a89d25ca434f91c4f961a363ea590faae8.tar.gz |
Sync our register usage with NetBSD's (non-)usage.
Diffstat (limited to 'games/mille')
-rw-r--r-- | games/mille/comp.c | 22 | ||||
-rw-r--r-- | games/mille/end.c | 8 | ||||
-rw-r--r-- | games/mille/init.c | 18 | ||||
-rw-r--r-- | games/mille/mille.c | 6 | ||||
-rw-r--r-- | games/mille/mille.h | 4 | ||||
-rw-r--r-- | games/mille/misc.c | 14 | ||||
-rw-r--r-- | games/mille/move.c | 34 | ||||
-rw-r--r-- | games/mille/print.c | 18 | ||||
-rw-r--r-- | games/mille/roll.c | 4 | ||||
-rw-r--r-- | games/mille/save.c | 12 | ||||
-rw-r--r-- | games/mille/table.c | 2 | ||||
-rw-r--r-- | games/mille/types.c | 4 | ||||
-rw-r--r-- | games/mille/varpush.c | 4 |
13 files changed, 73 insertions, 77 deletions
diff --git a/games/mille/comp.c b/games/mille/comp.c index 65f9645..798dce8 100644 --- a/games/mille/comp.c +++ b/games/mille/comp.c @@ -47,13 +47,13 @@ static char sccsid[] = "@(#)comp.c 8.1 (Berkeley) 5/31/93"; calcmove() { - register CARD card; - register int *value; - register PLAY *pp, *op; - register bool foundend, cango, canstop, foundlow; - register unsgn int i, count200, badcount, nummin, nummax, diff; - register int curmin, curmax; - register CARD safe, oppos; + CARD card; + int *value; + PLAY *pp, *op; + bool foundend, cango, canstop, foundlow; + unsgn int i, count200, badcount, nummin, nummax, diff; + int curmin, curmax; + CARD safe, oppos; int valbuf[HAND_SZ], count[NUM_CARDS]; bool playit[HAND_SZ]; @@ -401,9 +401,9 @@ play_it: * Return true if the given player could conceivably win with his next card. */ onecard(pp) -register PLAY *pp; +PLAY *pp; { - register CARD bat, spd, card; + CARD bat, spd, card; bat = pp->battle; spd = pp->speed; @@ -433,8 +433,8 @@ register PLAY *pp; } canplay(pp, op, card) -register PLAY *pp, *op; -register CARD card; +PLAY *pp, *op; +CARD card; { switch (card) { case C_200: diff --git a/games/mille/end.c b/games/mille/end.c index 3a18dba..4fb5f9f 100644 --- a/games/mille/end.c +++ b/games/mille/end.c @@ -48,9 +48,9 @@ static char sccsid[] = "@(#)end.c 8.1 (Berkeley) 5/31/93"; * the end-of-games points to the user who deserves it (if any). */ finalscore(pp) -reg PLAY *pp; { + PLAY *pp; { - reg int temp, tot, num; + int temp, tot, num; if (pp->was_finished == Finished) return; @@ -92,9 +92,9 @@ static int Last_tot[2]; /* last tot used for extrapolate */ * the end-of-games points to the user who deserves it (if any). */ extrapolate(pp) -reg PLAY *pp; { + PLAY *pp; { - reg int x, num, tot, count; + int x, num, tot, count; num = pp - Player; tot += SC_TRIP + SC_DELAY + SC_EXT; diff --git a/games/mille/init.c b/games/mille/init.c index 6aaaf2a..d5e64f7 100644 --- a/games/mille/init.c +++ b/games/mille/init.c @@ -45,9 +45,9 @@ static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 5/31/93"; init() { - reg PLAY *pp; - reg int i, j; - reg CARD card; + PLAY *pp; + int i, j; + CARD card; bzero(Numseen, sizeof Numseen); Numgos = 0; @@ -88,8 +88,8 @@ init() { shuffle() { - reg int i, r; - reg CARD temp; + int i, r; + CARD temp; for (i = 0; i < DECK_SZ; i++) { r = roll(1, DECK_SZ) - 1; @@ -106,8 +106,8 @@ shuffle() { newboard() { - register int i; - register PLAY *pp; + int i; + PLAY *pp; static int first = TRUE; if (first) { @@ -164,8 +164,8 @@ newboard() { newscore() { - reg int i, new; - register PLAY *pp; + int i, new; + PLAY *pp; static int was_full = -1; static int last_win = -1; diff --git a/games/mille/mille.c b/games/mille/mille.c index ff96b60..ca6e12c 100644 --- a/games/mille/mille.c +++ b/games/mille/mille.c @@ -64,10 +64,10 @@ static void usage __P((void)); int main(ac, av) -reg int ac; -reg char *av[]; { + int ac; + char *av[]; { - reg bool restore; + bool restore; /* revoke */ setgid(getgid()); diff --git a/games/mille/mille.h b/games/mille/mille.h index c8281d5..8269fdb 100644 --- a/games/mille/mille.h +++ b/games/mille/mille.h @@ -167,10 +167,6 @@ # endif # endif SYSV -#ifndef reg -#define reg /* register */ -#endif - typedef struct { bool coups[NUM_SAFE]; bool can_go; diff --git a/games/mille/misc.c b/games/mille/misc.c index 7cf6248..86e6b10 100644 --- a/games/mille/misc.c +++ b/games/mille/misc.c @@ -71,7 +71,7 @@ char *str; CARD getcard() { - reg int c, c1; + int c, c1; for (;;) { while ((c = readch()) == '\n' || c == '\r' || c == ' ') @@ -118,7 +118,7 @@ cont: ; } check_ext(forcomp) -reg bool forcomp; { +bool forcomp; { if (End == 700) @@ -137,8 +137,8 @@ done: } } else { - reg PLAY *pp, *op; - reg int i, safe, miles; + PLAY *pp, *op; + int i, safe, miles; pp = &Player[COMP]; op = &Player[PLAYER]; @@ -172,9 +172,9 @@ done: * also allowed. Return TRUE if the answer was yes, FALSE if no. */ getyn(promptno) -register int promptno; { +int promptno; { - reg char c; + char c; Saved = FALSE; for (;;) { @@ -245,7 +245,7 @@ check_more() readch() { - reg int cnt; + int cnt; static char c; for (cnt = 0; read(0, &c, 1) <= 0; cnt++) diff --git a/games/mille/move.c b/games/mille/move.c index e3c60ba..b3741ee 100644 --- a/games/mille/move.c +++ b/games/mille/move.c @@ -60,9 +60,9 @@ char *Movenames[] = { domove() { - reg PLAY *pp; - reg int i, j; - reg bool goodplay; + PLAY *pp; + int i, j; + bool goodplay; pp = &Player[Play]; if (Play == PLAYER) @@ -163,9 +163,9 @@ acc: */ check_go() { - reg CARD card; - reg PLAY *pp, *op; - reg int i; + CARD card; + PLAY *pp, *op; + int i; for (pp = Player; pp < &Player[2]; pp++) { op = (pp == &Player[COMP] ? &Player[PLAYER] : &Player[COMP]); @@ -192,10 +192,10 @@ check_go() { } playcard(pp) -reg PLAY *pp; +PLAY *pp; { - reg int v; - reg CARD card; + int v; + CARD card; /* * check and see if player has picked @@ -342,7 +342,7 @@ protected: getmove() { - reg char c, *sp; + char c, *sp; #ifdef EXTRAP static bool last_ex = FALSE; /* set if last command was E */ @@ -471,9 +471,9 @@ ret: * return whether or not the player has picked */ haspicked(pp) -reg PLAY *pp; { +PLAY *pp; { - reg int card; + int card; if (Topcard <= Deck) return TRUE; @@ -490,9 +490,9 @@ reg PLAY *pp; { } account(card) -reg CARD card; { +CARD card; { - reg CARD oppos; + CARD oppos; if (card == C_INIT) return; @@ -546,10 +546,10 @@ int promptno; } sort(hand) -reg CARD *hand; +CARD *hand; { - reg CARD *cp, *tp; - reg CARD temp; + CARD *cp, *tp; + CARD temp; cp = hand; hand += HAND_SZ; diff --git a/games/mille/print.c b/games/mille/print.c index 72a97a4..9a227bc 100644 --- a/games/mille/print.c +++ b/games/mille/print.c @@ -48,8 +48,8 @@ static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 5/31/93"; prboard() { - reg PLAY *pp; - reg int i, j, k, temp; + PLAY *pp; + int i, j, k, temp; for (k = 0; k < 2; k++) { pp = &Player[k]; @@ -64,8 +64,8 @@ prboard() { show_card(14, temp, pp->battle, &pp->sh_battle); show_card(16, temp, pp->speed, &pp->sh_speed); for (i = C_25; i <= C_200; i++) { - reg char *name; - reg int end; + char *name; + int end; if (pp->nummiles[i] == pp->sh_nummiles[i]) continue; @@ -102,7 +102,7 @@ prboard() { */ show_card(y, x, c, lc) int y, x; -register CARD c, *lc; +CARD c, *lc; { if (c == *lc) return; @@ -114,10 +114,10 @@ register CARD c, *lc; static char Score_fmt[] = "%4d"; prscore(for_real) -reg bool for_real; { +bool for_real; { - reg PLAY *pp; - reg int x; + PLAY *pp; + int x; stdscr = Score; for (pp = Player; pp < &Player[2]; pp++) { @@ -161,7 +161,7 @@ reg bool for_real; { */ show_score(y, x, s, ls) int y, x; -register int s, *ls; +int s, *ls; { if (s == *ls) return; diff --git a/games/mille/roll.c b/games/mille/roll.c index b91a8d9..017ac3f 100644 --- a/games/mille/roll.c +++ b/games/mille/roll.c @@ -47,9 +47,9 @@ static char sccsid[] = "@(#)roll.c 8.1 (Berkeley) 5/31/93"; */ roll(ndie, nsides) -reg int ndie, nsides; { +int ndie, nsides; { - reg int tot; + int tot; tot = 0; while (ndie--) diff --git a/games/mille/save.c b/games/mille/save.c index 9efb7f8..728bc1c 100644 --- a/games/mille/save.c +++ b/games/mille/save.c @@ -67,9 +67,9 @@ int read(), write(); save() { extern int errno; - reg char *sp; - reg int outf; - reg time_t *tp; + char *sp; + int outf; + time_t *tp; char buf[80]; time_t tme; STAT junk; @@ -143,10 +143,10 @@ over: * be cleaned up before the game starts. */ rest_f(file) -reg char *file; { +char *file; { - reg char *sp; - reg int inf; + char *sp; + int inf; char buf[80]; STAT sbuf; diff --git a/games/mille/table.c b/games/mille/table.c index 3bf601c..b488f31 100644 --- a/games/mille/table.c +++ b/games/mille/table.c @@ -53,7 +53,7 @@ static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 5/31/93"; main() { - reg int i, j, count; + int i, j, count; printf(" %16s -> %5s %5s %4s %s\n", "Card", "cards", "count", "need", "opposite"); for (i = 0; i < NUM_CARDS - 1; i++) { diff --git a/games/mille/types.c b/games/mille/types.c index f03141d..52f4baf 100644 --- a/games/mille/types.c +++ b/games/mille/types.c @@ -44,13 +44,13 @@ static char sccsid[] = "@(#)types.c 8.1 (Berkeley) 5/31/93"; */ isrepair(card) -reg CARD card; { +CARD card; { return card == C_GAS || card == C_SPARE || card == C_REPAIRS || card == C_INIT; } safety(card) -reg CARD card; { +CARD card; { switch (card) { case C_EMPTY: diff --git a/games/mille/varpush.c b/games/mille/varpush.c index 7f79d8f..8257c7a 100644 --- a/games/mille/varpush.c +++ b/games/mille/varpush.c @@ -51,8 +51,8 @@ int read(), write(); * channel file. func() is either read or write. */ varpush(file, func) -reg int file; -reg int (*func)(); { +int file; +int (*func)(); { int temp; |