Simplify getele()
No need to check player->aborted(), checking value of uprmptrd() suffices.
This commit is contained in:
parent
05364c0f68
commit
052d514bfe
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue