Translate some loops out of FORTRAN.

This commit is contained in:
Eric S. Raymond 2017-06-06 09:55:30 -04:00
parent 4d6078d8a8
commit 00c0da471d

View file

@ -146,12 +146,13 @@ int attack(FILE *input) {
/* CLAM AND OYSTER BOTH TREATED AS CLAM FOR INTRANSITIVE CASE; NO HARM DONE. */ /* CLAM AND OYSTER BOTH TREATED AS CLAM FOR INTRANSITIVE CASE; NO HARM DONE. */
if(HERE(CLAM) || HERE(OYSTER))OBJ=100*OBJ+CLAM; if(HERE(CLAM) || HERE(OYSTER))OBJ=100*OBJ+CLAM;
if(OBJ > 100) return(8000); if(OBJ > 100) return(8000);
L9124: if(OBJ != BIRD) goto L9125; L9124: if(OBJ == BIRD) {
SPK=137; SPK=137;
if(CLOSED) return(2011); if(CLOSED) return(2011);
DSTROY(BIRD); DSTROY(BIRD);
PROP[BIRD]=0; PROP[BIRD]=0;
SPK=45; SPK=45;
}
L9125: if(OBJ != VEND) goto L9126; L9125: if(OBJ != VEND) goto L9126;
PSPEAK(VEND,PROP[VEND]+2); PSPEAK(VEND,PROP[VEND]+2);
PROP[VEND]=3-PROP[VEND]; PROP[VEND]=3-PROP[VEND];
@ -197,13 +198,13 @@ L9128: RSPEAK(SPK);
RSPEAK(6); RSPEAK(6);
DSTROY(OGRE); DSTROY(OGRE);
K=0; K=0;
/* 9129 */ for (I=1; I<=5; I++) { for (I=1; I<=5; I++) {
if(DLOC[I] != LOC) goto L9129; if(DLOC[I] == LOC) {
K=K+1; K=K+1;
DLOC[I]=61; DLOC[I]=61;
DSEEN[I]=false; DSEEN[I]=false;
L9129: /*etc*/ ; }
} /* end loop */ }
SPK=SPK+1+1/K; SPK=SPK+1+1/K;
return(2011); return(2011);
} }