keymap: abstract a bit over the keymap format
authorRan Benita <ran234@gmail.com>
Fri, 1 Mar 2013 19:48:02 +0000 (21:48 +0200)
committerDaniel Stone <daniel@fooishbar.org>
Mon, 18 Mar 2013 22:20:04 +0000 (22:20 +0000)
commit14842d6dc911db0a30afff8c75a89d34390de2e9
tree3c7f9c19241564107db14e6251c49aa5d0d32401
parentd1eae42ac58a334c5d299ef66342957deae4cd78
keymap: abstract a bit over the keymap format

Make it a bit easier to experiment with other formats.

Add a struct xkb_keymap_format_operations, which currently contains the
keymap compilation and _get_as_string functions. Each format can
implement whatever it wants from these.

The current public entry points become wrappers which do some error
reporting, allocation etc., and calling to the specific format. The
wrappers are all moved to src/keymap.c, so there are no XKB_EXPORT's
under src/xkbcomp/ anymore.

The only format available now is normal text_v1.

This is all not very KISS, and adds some indirection, but it is helpful
and somewhat cleaner.

Signed-off-by: Ran Benita <ran234@gmail.com>
Makefile.am
src/context.h
src/keymap.c
src/keymap.h
src/xkbcomp/keymap-dump.c [moved from src/keymap-dump.c with 96% similarity]
src/xkbcomp/xkbcomp-priv.h
src/xkbcomp/xkbcomp.c
test/filecomp.c
test/rulescomp.c
test/stringcomp.c