From 126d2d1be33df37137f488c47aac78b2cdedf9b1 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 19 Jul 2009 02:09:38 +0300 Subject: [PATCH] Remove enum {main,edit,menu}_action_offset Remove enum main_action_offset, enum edit_action_offset, and enum menu_action_offset. It seems the original plan (in commit 174eabf1a448d3f084a318aab77805828f35c42e on 2005-05-16) was to include the action flags in the action IDs, perhaps with something like: ACT_##map##_##action = ACT_##map##_OFFSET_##action | flags However, this OR operation was never implemented; each ACT_*_* constant had the same value as the corresponding ACT_*_OFFSET_*, and the code that looked for flags in action IDs found only zeroes. Then on 2005-06-10, a separate action.flags member was added, and the flag checks were corrected to read that instead. So, it seems safe to say that the original plan has been discarded and the offset enumerations won't be needed. --- src/config/kbdbind.h | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/config/kbdbind.h b/src/config/kbdbind.h index e046fd8b3..c24df275e 100644 --- a/src/config/kbdbind.h +++ b/src/config/kbdbind.h @@ -53,42 +53,26 @@ enum action_flags { * and also update the table action_table[] in kbdbind.c. */ #define ACTION_(map, name, action, caption, flags) \ - ACT_##map##_OFFSET_##action + ACT_##map##_##action -enum main_action_offset { +enum main_action { #include "config/actions-main.inc" MAIN_ACTIONS, }; -enum edit_action_offset { +enum edit_action { #include "config/actions-edit.inc" EDIT_ACTIONS }; -enum menu_action_offset { +enum menu_action { #include "config/actions-menu.inc" MENU_ACTIONS }; -#undef ACTION_ -#define ACTION_(map, name, action, caption, flags) \ - ACT_##map##_##action - -enum main_action { -#include "config/actions-main.inc" -}; - -enum edit_action { -#include "config/actions-edit.inc" -}; - -enum menu_action { -#include "config/actions-menu.inc" -}; - #undef ACTION_ enum kbdbind_flags {