#repeat */
| 1635 | |
| 1636 | /* #repeat */ |
| 1637 | int |
| 1638 | do_repeat(void) |
| 1639 | { |
| 1640 | int res = ECMD_OK; |
| 1641 | |
| 1642 | if (!gi.in_doagain) { |
| 1643 | struct _cmd_queue *repeat_copy; |
| 1644 | |
| 1645 | if (!cmdq_peek(CQ_REPEAT)) { |
| 1646 | Norep("There is no command available to repeat."); |
| 1647 | return ECMD_FAIL; |
| 1648 | } |
| 1649 | repeat_copy = cmdq_copy(CQ_REPEAT); |
| 1650 | gi.in_doagain = TRUE; |
| 1651 | rhack(0); /* read and execute command */ |
| 1652 | gi.in_doagain = FALSE; |
| 1653 | cmdq_clear(CQ_REPEAT); |
| 1654 | gc.command_queue[CQ_REPEAT] = repeat_copy; |
| 1655 | iflags.menu_requested = FALSE; |
| 1656 | if (svc.context.move) |
| 1657 | res = ECMD_TIME; |
| 1658 | } |
| 1659 | return res; |
| 1660 | } |
| 1661 | |
| 1662 | /* extcmdlist: full command list, ordered by command name; |
| 1663 | commands with no keystroke or with only a meta keystroke generally |
nothing calls this directly
no test coverage detected