From 2b67592dfdba0f429c69e92f6073d43d5195aa1c Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Wed, 9 Feb 2022 18:24:36 +0100 Subject: [PATCH] [kbdbind] const in kbd_nm_lookup --- src/config/kbdbind.c | 4 ++-- src/config/kbdbind.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/kbdbind.c b/src/config/kbdbind.c index 3a49ae4fe..3570df0d8 100644 --- a/src/config/kbdbind.c +++ b/src/config/kbdbind.c @@ -231,7 +231,7 @@ kbd_act_lookup(keymap_id_T keymap_id, action_id_T action_id) } struct keybinding * -kbd_nm_lookup(keymap_id_T keymap_id, char *name) +kbd_nm_lookup(keymap_id_T keymap_id, const char *name) { action_id_T action_id = get_action_from_string(keymap_id, name); @@ -279,7 +279,7 @@ get_action_name_from_keystroke(keymap_id_T keymap_id, } action_id_T -get_action_from_string(keymap_id_T keymap_id, char *str) +get_action_from_string(keymap_id_T keymap_id, const char *str) { const struct action *action; diff --git a/src/config/kbdbind.h b/src/config/kbdbind.h index 7bddd37a0..160c2b654 100644 --- a/src/config/kbdbind.h +++ b/src/config/kbdbind.h @@ -124,7 +124,7 @@ void free_keybinding(struct keybinding *); const struct action *get_action(keymap_id_T keymap_id, action_id_T action_id); char *get_action_name(keymap_id_T keymap_id, action_id_T action_id); -action_id_T get_action_from_string(keymap_id_T keymap_id, char *str); +action_id_T get_action_from_string(keymap_id_T keymap_id, const char *str); char *get_action_name_from_keystroke(keymap_id_T keymap_id, const char *keystroke_str); @@ -198,7 +198,7 @@ void add_keystroke_to_string(struct string *str, struct term_event_keyboard *kbd action_id_T kbd_action(keymap_id_T, struct term_event *, int *); struct keybinding *kbd_ev_lookup(keymap_id_T, struct term_event_keyboard *kbd, int *); -struct keybinding *kbd_nm_lookup(keymap_id_T, char *); +struct keybinding *kbd_nm_lookup(keymap_id_T, const char *); int bind_do(char *, const char *, char *, int); char *bind_act(char *, const char *);