Resolve a goto.

This commit is contained in:
Eric S. Raymond 2017-06-10 19:08:58 -04:00
parent a4da53086b
commit 39c1b4db81

12
main.c
View file

@ -510,7 +510,7 @@ static bool playermove(FILE *cmdin, token_t verb)
if (K == game.loc)K2=91; if (K == game.loc)K2=91;
if (CNDBIT(game.loc,4))K2=274; if (CNDBIT(game.loc,4))K2=274;
if (K2 == 0) { if (K2 == 0) {
L21: for (;;) {
LL=MOD((labs(TRAVEL[KK])/1000),1000); LL=MOD((labs(TRAVEL[KK])/1000),1000);
if (LL != K) { if (LL != K) {
if (LL <= 300) { if (LL <= 300) {
@ -519,7 +519,7 @@ static bool playermove(FILE *cmdin, token_t verb)
} }
if (TRAVEL[KK] >= 0) { if (TRAVEL[KK] >= 0) {
++KK; ++KK;
goto L21; continue;
} }
KK=K2; KK=K2;
if (KK == 0) { if (KK == 0) {
@ -530,7 +530,8 @@ static bool playermove(FILE *cmdin, token_t verb)
K=MOD(labs(TRAVEL[KK]),1000); K=MOD(labs(TRAVEL[KK]),1000);
KK=KEY[game.loc]; KK=KEY[game.loc];
goto L9; break; /* fall through to ordinary travel */
}
} else { } else {
RSPEAK(K2); RSPEAK(K2);
return true; return true;
@ -551,10 +552,13 @@ static bool playermove(FILE *cmdin, token_t verb)
RSPEAK((OUTSID(game.loc) && game.loc != 8) ? 57 : 58); RSPEAK((OUTSID(game.loc) && game.loc != 8) ? 57 : 58);
return true; return true;
} }
else {
/* none of the specials */
game.oldlc2=game.oldloc; game.oldlc2=game.oldloc;
game.oldloc=game.loc; game.oldloc=game.loc;
}
L9: /* ordinary travel */
for (;;) { for (;;) {
LL=labs(TRAVEL[KK]); LL=labs(TRAVEL[KK]);
if (MOD(LL,1000) == 1 || MOD(LL,1000) == K) if (MOD(LL,1000) == 1 || MOD(LL,1000) == K)