Make REDO unconditional.

This commit is contained in:
Sean Hunt
2015-02-27 19:24:28 -05:00
committed by Pasi Kallinen
parent 11d11c5de3
commit f27d319e68
18 changed files with 7 additions and 95 deletions

View File

@@ -928,11 +928,9 @@ register const char *let,*word;
Sprintf(qbuf, "What do you want to %s? [%s or ?*]",
word, buf);
}
#ifdef REDO
if (in_doagain)
ilet = readchar();
else
#endif
ilet = yn_function(qbuf, (char *)0, '\0');
if (digit(ilet) && !allowcnt) {
pline("No count allowed with this command.");
@@ -940,9 +938,7 @@ register const char *let,*word;
}
if (ilet == '0') prezero = TRUE;
while (digit(ilet)) {
#ifdef REDO
if (ilet != '?' && ilet != '*') savech(ilet);
#endif
/* accumulate unless cnt has overflowed */
if (allowcnt < 3) {
prevcnt = cnt;
@@ -1018,23 +1014,17 @@ register const char *let,*word;
}
}
context.botl = 1; /* May have changed the amount of money */
#ifdef REDO
savech(ilet);
#endif
for (otmp = invent; otmp; otmp = otmp->nobj)
if (otmp->invlet == ilet) break;
if(!otmp) {
You("don't have that object.");
#ifdef REDO
if (in_doagain) return((struct obj *) 0);
#endif
continue;
} else if (cnt < 0 || otmp->quan < cnt) {
You("don't have that many! You have only %ld.",
otmp->quan);
#ifdef REDO
if (in_doagain) return((struct obj *) 0);
#endif
continue;
}
break;
@@ -2102,9 +2092,7 @@ dotypeinv()
if(class_count > 1) {
c = yn_function(prompt, types, '\0');
#ifdef REDO
savech(c);
#endif
if(c == '\0') {
clear_nhwindow(WIN_MESSAGE);
return 0;