function prototype with unspecified argument is obsolete since c99.
additionally some of these function which don't take any argument were
being called with a `const char *` arg, which is UB.
fix both these issues by declararing ALL the components to accept a
`const char *`, and name the arg "unused" if it's meant to be ignored.
- 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.