Add common xkb_key struct
authorRan Benita <ran234@gmail.com>
Sun, 15 Jul 2012 07:38:05 +0000 (10:38 +0300)
committerRan Benita <ran234@gmail.com>
Wed, 18 Jul 2012 09:45:22 +0000 (12:45 +0300)
commite8a6a5f09afa725b4ebc72eddb6e38740f3e5fda
tree2b80d9d1cd5a007bb85fbbdbf51194ed4cd9f72a
parente668d00956e81c9638ee0b7542cee17bec8a23e1
Add common xkb_key struct

Instead of having a million arrays from the keycode to various
key-specific info in the keymap, add a single struct xkb_key to hold all
of the data for the key in one object. This way we can pass it around,
do some refactoring and make the code simpler. It's also nice to see
everything in one place.

The keys array is still indexed by keycode, which is suboptimal because
there may be a lot of holes (i.e. unused keycodes between min_key_code
and max_key_code). By the end of this series it would be abstracted
enough to replace it by a hash table or similar if there's ever a need.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/alloc.c
src/keymap-dump.c
src/map.c
src/xkb-priv.h
src/xkbcomp/compat.c
src/xkbcomp/keycodes.c
src/xkbcomp/misc.c
src/xkbcomp/symbols.c