mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
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.
This commit is contained in:
parent
62316163f3
commit
126d2d1be3
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user