action: fix LookupEntry for "lockdevbtn"

xkbcomp has that bug as well, guess no one uses it.

Signed-off-by: Ran Benita <ran234@gmail.com>
log: replace "priority" by "level" everywhere

Now that we don't use syslog, "level" does sound more commonplace. We
should change it while there is still nobody using it.
Also leave some space between the integers of the xkb_log_level enum
values, if we ever need to shove more in between.

Signed-off-by: Ran Benita <ran234@gmail.com>
Set log level for tests through env, not directly

This way the test logs have all the information, but we don't get eye
bleed every time we run them manually. One can always use
TESTS_ENVIRONMENT (we correctly use AM_TESTS_ENVIRONMENT now), or set
the envvars from the shell.

Signed-off-by: Ran Benita <ran234@gmail.com>
include: properly use the default map if none is found

For some reason this piece of code wasn't copied from xkbcomp, which
causes all of the warnings like these:
Warning:       No map in include statement, but "pc" contains several; Using first defined map, "pc105"

Signed-off-by: Ran Benita <ran234@gmail.com>
test/data/symbols: keypad can only have one default section

Avoids a warning, from xkeyboard-config:

commit 6676053f2c93596c2aaa9905151a5c76355a1540
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jun 29 09:53:45 2012 +1000

    symbols: keypad can only have one default section

    Warning:          Multiple default components in keypad
                      Using x11, ignoring pointerkeys

    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

Signed-off-by: Ran Benita <ran234@gmail.com>
include: document ParseIncludeMap better

The format of the include statment is not explained anywhere, the code
is confusing and the comments misleading. Try to explain it better.

Signed-off-by: Ran Benita <ran234@gmail.com>
xkbcomp: add debug messages of the RMLVO and KcCGST

Signed-off-by: Ran Benita <ran234@gmail.com>
Don't printf NULL strings

Signed-off-by: Ran Benita <ran234@gmail.com>
Use XKB_MOD_INVALID instead of XkbNoModifier

Signed-off-by: Ran Benita <ran234@gmail.com>
rules: fix check for appending '|' character when applying

There are two ways to separate multiple files in XKB include statements:
'+' will cause the later file to override the first in case of conflict,
while '|' will cause it augment it (this is done by xkbcomp). '!' is
unrelated here.
Since '|' is practically never used, this wasn't noticed.

In the modified test, the '|some_compat' previously was just ignored.

Signed-off-by: Ran Benita <ran234@gmail.com>
test: add rmlvo-to-kccgst tool

For a quick look at what components result from the rules.

Signed-off-by: Ran Benita <ran234@gmail.com>
test/rules-file: add benchmark

Signed-off-by: Ran Benita <ran234@gmail.com>
atom: make type and name of the 'a' field clearer

Signed-off-by: Ran Benita <ran234@gmail.com>
atom: separate lookup logic from atom_intern

This would allow us to add a non-interning xkb_atom_lookup function.

Signed-off-by: Ran Benita <ran234@gmail.com>
atom: add xkb_atom_lookup

This will only lookup the string and return the atom if found; it will
not intern it if not. This is useful when e.g. getting a string from the
user (which may be arbitrary) and comparing against atoms.

Signed-off-by: Ran Benita <ran234@gmail.com>
expr: make ResolveString return an atom

Almost all callers do xkb_atom_intern on the currently returned string,
while ResolveString converts the atom to the string to begin with...
uselss double work.

Signed-off-by: Ran Benita <ran234@gmail.com>
Convert rest of names in xkb_keymap back to atoms

These were kept as atoms, but since the keymap was exposed in the API,
we converted them to strings; no the keymap is no longer exposed, so we
can go back to atoms. They make the keymap smaller (at least on 64-bit
machines) and the comparisons faster.

Signed-off-by: Ran Benita <ran234@gmail.com>
Unify some string tables from xkbcomp, text and keymap-dump

We move the LookupEntry struct from expr.h to text.h, along with most of
the lookup tables. This makes them available everywhere.
Looking up a value in the LookupEntry format is slower than direct index
mapping, but it allows multiple names per value (with the canonical one
being first) and "all"- and "none"-type masks. These functions are not
used anywhere efficiency matters.

Signed-off-by: Ran Benita <ran234@gmail.com>