Simplify getele()

No need to check player->aborted(), checking value of uprmptrd()
suffices.
This commit is contained in:
Markus Armbruster 2008-07-19 15:50:15 -04:00
parent 05364c0f68
commit 052d514bfe

View file

@ -56,7 +56,7 @@ getele(char *recipient, char *buf)
pr("undo last line with ~u, print with ~p, abort with ~q, end with ^D or .\n"); pr("undo last line with ~u, print with ~p, abort with ~q, end with ^D or .\n");
bp = buf; bp = buf;
*bp = 0; *bp = 0;
while (!player->aborted) { for (;;) {
sprintf(left, "%4d left: ", (int)(buf + MAXTELSIZE - bp)); sprintf(left, "%4d left: ", (int)(buf + MAXTELSIZE - bp));
if (uprmptrd(left, buffer, sizeof(buffer) - 2) <= 0) if (uprmptrd(left, buffer, sizeof(buffer) - 2) <= 0)
return -1; return -1;
@ -93,8 +93,6 @@ getele(char *recipient, char *buf)
bp += len; bp += len;
} }
} }
if (player->aborted)
return -1;
return bp - buf; return bp - buf;
} }