scanner-utils: optimize one-line comments

Compose files have a lot of those.

Signed-off-by: Ran Benita <ran234@gmail.com>
COPYING: add copyright notice from libX11:modules/im/ximcp/imLcPrs.c

We have used some portions of it, so add the notice.

Signed-off-by: Ran Benita <ran234@gmail.com>
compose/parser: fix segfault when including

The keysym cache for the new scanner was not initialized.
To avoid such errors also in the future, require passing the priv
argument in scanner_init(), instead of initializing it separately.

Signed-off-by: Ran Benita <ran234@gmail.com>
compose/parser: one more skip_to_eol()

Signed-off-by: Ran Benita <ran234@gmail.com>
compose/parser: use parameter as intended

Signed-off-by: Ran Benita <ran234@gmail.com>
compose/parser: resolve keysyms in parser instead of scanner

It will become context-sensitive.

Signed-off-by: Ran Benita <ran234@gmail.com>
compose/parser: parse (! mods) properly

We don't actually do anything with them. But if someone uses them we can
at least not choke.

Signed-off-by: Ran Benita <ran234@gmail.com>
compose/parser: fix parsing of multiple modifiers

Signed-off-by: Ran Benita <ran234@gmail.com>
test/compose: test modifier syntax

Signed-off-by: Ran Benita <ran234@gmail.com>
test/compose: test include statement

Signed-off-by: Ran Benita <ran234@gmail.com>
Make librt optional, required for at least OpenBSD
Merge pull request #13 from jasperla/librt

Make librt optional, required for at least OpenBSD
disable -Wl,--no-undefined on OpenBSD for it doesn't have DT_NEEDED for libc
Merge pull request #14 from jasperla/undefined

disable -Wl,--no-undefined on OpenBSD for it doesn't have DT_NEEDED for libc
parser: bring back warning about includes of files with no default

Using the same format as xkbcomp.

Signed-off-by: Ran Benita <ran234@gmail.com>
symbols: don't warn about conflicting syms if they are the same

Signed-off-by: Ran Benita <ran234@gmail.com>
state: correctly infer inactive type entries

The current test is incorrect, since 'map[None]' is entirely valid. In
most cases this doesn't cause any problems, since the default fallback
is Level1, and it's almost always 'map[None] = Level1' anyway. But in
one case in xkeyboard-config it isn't, in types/numpad(mac):

    type "KEYPAD" {
        modifiers = None;
        map[None] = Level2;
        level_name[Level2] = "Number";
    };

So before checking if no modifiers were mapped, make sure there *were*
any modifiers at all.

https://bugs.freedesktop.org/show_bug.cgi?id=85092

Reported-by: Gatis Paeglis <gatis.paeglis@digia.com>
Signed-off-by: Ran Benita <ran234@gmail.com>
test/data: sync to xkeyboard-config 2.13

(Run ./test/data/sync.sh).

Signed-off-by: Ran Benita <ran234@gmail.com>
test/data: add files for model=applealu_ansi layout=us

Signed-off-by: Ran Benita <ran234@gmail.com>
test/keyseq: test 'map[None] = Level2;' scenario

See previous commit for an explanation.

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