1 // SPDX-License-Identifier: GPL-2.0-only
4 #include "mnconf-common.h"
8 int next_jump_key(int key
)
10 if (key
< '1' || key
> '9')
21 int handle_search_keys(int key
, size_t start
, size_t end
, void *_data
)
23 struct search_data
*data
= _data
;
27 if (key
< '1' || key
> '9')
30 list_for_each_entry(pos
, data
->head
, entries
) {
31 index
= next_jump_key(index
);
33 if (pos
->offset
< start
)
36 if (pos
->offset
>= end
)
40 data
->target
= pos
->target
;
48 int get_jump_key_char(void)
50 jump_key_char
= next_jump_key(jump_key_char
);