mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[config] get_keymap_name const
This commit is contained in:
parent
1e7de877d3
commit
d5f06127ff
@ -659,7 +659,8 @@ static char *
|
||||
get_keybinding_info(struct listbox_item *item, struct terminal *term)
|
||||
{
|
||||
struct keybinding *keybinding = (struct keybinding *)item->udata;
|
||||
char *action, *keymap;
|
||||
char *action;
|
||||
const char *keymap;
|
||||
struct string info;
|
||||
|
||||
if (item->depth < 2) return NULL;
|
||||
|
@ -341,7 +341,7 @@ get_keymap_id(char *keymap_str)
|
||||
return KEYMAP_INVALID;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
get_keymap_name(keymap_id_T keymap_id)
|
||||
{
|
||||
return get_keymap(keymap_id)->str;
|
||||
@ -953,7 +953,7 @@ static void
|
||||
single_bind_config_string(struct string *file, keymap_id_T keymap_id,
|
||||
struct keybinding *keybinding)
|
||||
{
|
||||
char *keymap_str = get_keymap_name(keymap_id);
|
||||
const char *keymap_str = get_keymap_name(keymap_id);
|
||||
char *action_str = get_action_name(keymap_id, keybinding->action_id);
|
||||
|
||||
if (!keymap_str || !action_str || action_str[0] == ' ')
|
||||
|
@ -46,7 +46,7 @@ struct action_list {
|
||||
int num_actions;
|
||||
};
|
||||
struct keymap {
|
||||
char *str;
|
||||
const char *str;
|
||||
keymap_id_T keymap_id;
|
||||
char *desc;
|
||||
};
|
||||
@ -177,7 +177,7 @@ action_requires_form(keymap_id_T keymap_id, action_id_T action_id)
|
||||
}
|
||||
|
||||
term_event_key_T read_key(const char *);
|
||||
char *get_keymap_name(keymap_id_T);
|
||||
const char *get_keymap_name(keymap_id_T);
|
||||
|
||||
int parse_keystroke(const char *, struct term_event_keyboard *);
|
||||
void add_keystroke_to_string(struct string *str, struct term_event_keyboard *kbd, int escape);
|
||||
|
Loading…
x
Reference in New Issue
Block a user