- Get rid of camel-casing
- Don't use all-caps for variable names
- use LEN()-macro
- use strncmp() rather than strstr() for prefix-checking
- clean up the tokenizer-loop and don't use copies
- make the loop more readable by separating different breaking
conditions
- stricter error-checking and cleanup
- store the layout directly with bprintf rather than having
a separate buffer
Adding a new keymap component that will
indicate the current keyboard layout (language)
and variant if any was set. I use the
standard X11 XKB APIs to retrieve and parse
the xkb_symbols set with setxkbmap.