1 #include "io/command-repeater.h"
2 #include "input-key-requester.h"
3 #include "util/int-char-converter.h"
7 /* Number of chars saved */
8 static int repeat__cnt = 0;
11 static int repeat__idx = 0;
14 static COMMAND_CODE repeat__key[REPEAT_MAX];
16 void repeat_push(COMMAND_CODE what)
18 if (repeat__cnt == REPEAT_MAX)
21 repeat__key[repeat__cnt++] = what;
25 bool repeat_pull(COMMAND_CODE *what)
27 if (repeat__idx == repeat__cnt)
30 *what = repeat__key[repeat__idx++];
34 void repeat_check(void)
36 if (command_cmd == ESCAPE)
38 if (command_cmd == ' ')
40 if (command_cmd == '\r')
42 if (command_cmd == '\n')
46 if (command_cmd == 'n') {
48 if (repeat_pull(&what)) {