From 3c255ea736cdb1e3d0bf77f1160b6d495cb090db Mon Sep 17 00:00:00 2001 From: sabetts Date: Wed, 5 Sep 2001 07:48:49 +0000 Subject: * src/messages.h (MESSAGE_WELCOME): The help keystroke is not hardcoded. * src/main.c (show_welcome_message): new function (main): call show_welcome_message to show the welcome message. * src/actions.h (find_keybinding_by_action): new prototype * src/actions.c (key_actions): change to a static variable. (key_actions_last): likewise (key_actions_table_size): likewise (find_keybinding_by_action): new function --- src/actions.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src/actions.c') diff --git a/src/actions.c b/src/actions.c index c68ae5e..74196d5 100644 --- a/src/actions.c +++ b/src/actions.c @@ -26,9 +26,25 @@ #include "ratpoison.h" -rp_action *key_actions; -int key_actions_last; -int key_actions_table_size; +static rp_action *key_actions; +static int key_actions_last; +static int key_actions_table_size; + +rp_action* +find_keybinding_by_action (char *action) +{ + int i; + + for (i=0; i