platform/upstream/libxkbcommon.git
8 years agodoc/Doxyfile: explicitly set HTML_TIMESTAMP = NO
Ran Benita [Tue, 8 Sep 2015 06:22:20 +0000 (09:22 +0300)]
doc/Doxyfile: explicitly set HTML_TIMESTAMP = NO

YES was the default in older version. Having a timestamp hurts
reproducible builds, and serves no purpose, so remove it.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789071

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc/Doxyfile: only keep non-default values
Ran Benita [Tue, 8 Sep 2015 06:21:32 +0000 (09:21 +0300)]
doc/Doxyfile: only keep non-default values

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agodoc/Doxyfile: sync with latest version
Ran Benita [Tue, 8 Sep 2015 06:17:16 +0000 (09:17 +0300)]
doc/Doxyfile: sync with latest version

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agostate: reduce scope of fake action
Ran Benita [Mon, 7 Sep 2015 11:45:09 +0000 (14:45 +0300)]
state: reduce scope of fake action

Also rename to "dummy" as I think it is a nicer name.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agoMerge pull request #27 from nuko8/osx_test_progs
Ran Benita [Fri, 28 Aug 2015 11:20:20 +0000 (14:20 +0300)]
Merge pull request #27 from nuko8/osx_test_progs

Modifications to make 'make check' test complete for Mac OS X

8 years agobench: Modify benchmarks for a wider range of platforms
Kazunobu Kuriyama [Mon, 24 Aug 2015 04:33:32 +0000 (13:33 +0900)]
bench: Modify benchmarks for a wider range of platforms

 - Add the new files bench.c and bench.h to implement a timer module.
 - Implement the module with clock_gettime(), mach_absolute_time(), or
   gettimeofday(), depending on a given platform.
 - Replace the time measurement code of the benchmark programs with the
   functions of the module.

8 years agotest/x11comp: Fix contention between X11 and Xvfb on Mac OS X
Kazunobu Kuriyama [Mon, 24 Aug 2015 04:44:20 +0000 (13:44 +0900)]
test/x11comp: Fix contention between X11 and Xvfb on Mac OS X

 - Abandon use of -displayfd.
 - Have x11comp itself look for an unused X11 display number instead.

8 years agotest/x11comp: remove duplicate FOUR_LEVEL_KEYPAD from test keymap
Ran Benita [Sun, 23 Aug 2015 20:02:10 +0000 (23:02 +0300)]
test/x11comp: remove duplicate FOUR_LEVEL_KEYPAD from test keymap

The `test/data/keymaps/host.xkb` file contains a duplicate definition of
this type. On my computer (linux, xkbcomp 1.3.0, xserver 1.17.2), the
test passes as is, but if I remove the duplicate definition, the
roundtrip brings it back and the test fails. I can also reproduce it
without relation to the test, by loading `test/data/keymaps/host.xkb`
(without the duplicate) using

    xkbcomp -I $(pwd)/test/data/keymaps/host.xkb $DISPLAY

and downloading it again using

    xkbcomp $DISPLAY out.xkb

the duplicate is added. On Mac OS X however, the duplicate is removed
(correctly), so the test fails there.

xkbcommon itself, which was forked from xkbcomp, doesn't have this bug;
in fact, doing

    ./test/print-compiled-keymap -k keymaps/host.xkb

removes the duplicate if it is present.

This is (probably) a regression in xkbcomp or xserver compared to the
versions used in Mac OS X. Since getting a patch for any of these two is
hopeless from my experience, I did not try to investigate further.

I am not sure why, but if I also add a `PC_SUPER_LEVEL2` type, the
duplicate of `FOUR_LEVEL_KEYPAD` doesn't show up. Hopefully the test
will work on all platforms now.

https://github.com/xkbcommon/libxkbcommon/issues/26

Reported-by: @nuko8
Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agotest/x11comp: small simplifications
Ran Benita [Sun, 23 Aug 2015 19:22:11 +0000 (22:22 +0300)]
test/x11comp: small simplifications

xkbcomp doesn't need the search-path argument, since we pass an absolute
path. Keep the plain -I which clears the search path just to be sure.

Signed-off-by: Ran Benita <ran234@gmail.com>
8 years agoMerge pull request #25 from mvo5/master
Ran Benita [Mon, 20 Jul 2015 08:46:15 +0000 (11:46 +0300)]
Merge pull request #25 from mvo5/master

Add XKB_CONFIG_ROOT environment

8 years agoAdd XKB_CONFIG_ROOT environment
Michael Vogt [Fri, 17 Jul 2015 18:59:52 +0000 (20:59 +0200)]
Add XKB_CONFIG_ROOT environment

The XKB_CONFIG_ROOT environment allows overrding the build time
DFLT_XKB_CONFIG_ROOT path.

8 years agobuild: don't fail if linker version scripts are not supported
Ran Benita [Fri, 17 Jul 2015 20:26:20 +0000 (23:26 +0300)]
build: don't fail if linker version scripts are not supported

Some platforms (such as OSX) do not support version scripts. In these
platforms the symbols will not be versioned, but it is OK to omit them.

https://github.com/xkbcommon/libxkbcommon/issues/24

9 years agocompose: correctly parse modifier syntax
Ran Benita [Tue, 24 Mar 2015 14:40:29 +0000 (16:40 +0200)]
compose: correctly parse modifier syntax

As described in:
http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=ddf3b09bb262d01b56fbaade421ac85b0e60a69f

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agorename to LICENSE
Daniel Stone [Tue, 10 Mar 2015 12:20:01 +0000 (12:20 +0000)]
rename to LICENSE

GitHub uses 'LICENSE' to scrape for repository license information, cf.
https://github.com/blog/1964-open-source-license-usage-on-github-com

Rename to make it a bit easier for it.

9 years agodoc: some editorial changes to compose documentation
Ran Benita [Thu, 19 Feb 2015 15:03:06 +0000 (17:03 +0200)]
doc: some editorial changes to compose documentation

Use nicer Markdown syntax, `surround` some words, fix some typos.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agotest/common: print keycode in decimal not hex
Ran Benita [Tue, 3 Feb 2015 18:50:52 +0000 (20:50 +0200)]
test/common: print keycode in decimal not hex

Keycodes are usually written in decimal, so hex is hard to compare.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoconfigure.ac: also print ${datarootdir} in summary
Ran Benita [Fri, 24 Oct 2014 20:40:24 +0000 (23:40 +0300)]
configure.ac: also print ${datarootdir} in summary

It goes something like:

    ${XLOCALEDIR} ->
    ${datarootdir}/locale/X11 ->
    ${prefix}/share/locale/X11 ->
    /usr/share/locale/X11

But AC_MSG_RESULT only performs one substitution. Instead of starting to
expand this stuff manually, just print datarootdir so all the pieces are
there.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoPACKAGING: fix confusing typo
Ran Benita [Fri, 24 Oct 2014 20:06:07 +0000 (23:06 +0300)]
PACKAGING: fix confusing typo

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc: explain the envvars which affect compose
Ran Benita [Fri, 24 Oct 2014 20:03:41 +0000 (23:03 +0300)]
doc: explain the envvars which affect compose

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agokeycodes: use correct printf format
Ran Benita [Thu, 23 Oct 2014 18:03:13 +0000 (21:03 +0300)]
keycodes: use correct printf format

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoReduce variable scopes
Ran Benita [Thu, 23 Oct 2014 18:00:20 +0000 (21:00 +0300)]
Reduce variable scopes

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoast-build: remove log message about allocation failure
Ran Benita [Sat, 18 Oct 2014 17:04:57 +0000 (20:04 +0300)]
ast-build: remove log message about allocation failure

We don't do so anywhere else, so until we have something comprehensive,
let's not so here.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoxkbcomp: remove file->topName
Ran Benita [Sat, 18 Oct 2014 16:47:19 +0000 (19:47 +0300)]
xkbcomp: remove file->topName

It is useless.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoxkbcomp/keymap: remove useless free()
Ran Benita [Sat, 18 Oct 2014 16:22:56 +0000 (19:22 +0300)]
xkbcomp/keymap: remove useless free()

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoBump version to 0.5.0 xkbcommon-0.5.0
Ran Benita [Sat, 18 Oct 2014 13:41:59 +0000 (16:41 +0300)]
Bump version to 0.5.0

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoUpdate NEWS
Ran Benita [Sat, 18 Oct 2014 13:35:49 +0000 (16:35 +0300)]
Update NEWS

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoChange initial symbol file versions to V_0.5.0
Ran Benita [Sat, 18 Oct 2014 13:38:13 +0000 (16:38 +0300)]
Change initial symbol file versions to V_0.5.0

It will be quite confusing to use V_0.4.3 since this was already
released without symbol versioning.

Hopefully this doesn't cause any trouble for people who are using -git.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agocompose: fill @since TBD
Ran Benita [Sat, 18 Oct 2014 13:37:46 +0000 (16:37 +0300)]
compose: fill @since TBD

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc/compat.md: add compose incompatibilities
Ran Benita [Sat, 18 Oct 2014 13:03:41 +0000 (16:03 +0300)]
doc/compat.md: add compose incompatibilities

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoAdd PACKAGING file
Ran Benita [Sat, 18 Oct 2014 12:51:41 +0000 (15:51 +0300)]
Add PACKAGING file

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoMakefile.am: add symbol files to EXTRA_DIST
Ran Benita [Sat, 18 Oct 2014 12:07:37 +0000 (15:07 +0300)]
Makefile.am: add symbol files to EXTRA_DIST

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoREADME: we also accepts patches through github
Ran Benita [Sat, 18 Oct 2014 11:52:54 +0000 (14:52 +0300)]
README: we also accepts patches through github

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodocs: make html output have a fixed width, hide footer
Ran Benita [Sat, 18 Oct 2014 11:50:49 +0000 (14:50 +0300)]
docs: make html output have a fixed width, hide footer

It's hard to read text which stretches indefinitely.

The footer is not adding much.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoREADME: add notes about Compose support
Ran Benita [Sat, 18 Oct 2014 11:29:37 +0000 (14:29 +0300)]
README: add notes about Compose support

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc/quick-guide: some improvements
Ran Benita [Sat, 18 Oct 2014 11:12:14 +0000 (14:12 +0300)]
doc/quick-guide: some improvements

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoREADME: remove elaborate details from the intro
Ran Benita [Sat, 18 Oct 2014 10:58:56 +0000 (13:58 +0300)]
README: remove elaborate details from the intro

Point to the "quick guide" instead.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc/compat.md: we don't support more groups or mods yet
Ran Benita [Sat, 18 Oct 2014 10:53:25 +0000 (13:53 +0300)]
doc/compat.md: we don't support more groups or mods yet

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoREADME: move compatibility notes to their own page
Ran Benita [Sat, 18 Oct 2014 10:50:54 +0000 (13:50 +0300)]
README: move compatibility notes to their own page

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoREADME: link to online API docs
Ran Benita [Sat, 18 Oct 2014 10:44:02 +0000 (13:44 +0300)]
README: link to online API docs

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoREADME: move note about xkeyboard-config to its own section
Ran Benita [Sat, 18 Oct 2014 10:34:15 +0000 (13:34 +0300)]
README: move note about xkeyboard-config to its own section

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoREADME: remove section on API stability
Ran Benita [Sat, 18 Oct 2014 10:31:32 +0000 (13:31 +0300)]
README: remove section on API stability

This was useful when we *weren't* stable. But now that we are this
should be obvious.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoReplace some strncmp's with memcmp
Ran Benita [Sat, 18 Oct 2014 10:23:53 +0000 (13:23 +0300)]
Replace some strncmp's with memcmp

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agocompose/parser: save len in keysym_from_name cache
Ran Benita [Sat, 18 Oct 2014 09:36:40 +0000 (12:36 +0300)]
compose/parser: save len in keysym_from_name cache

This reduces a lot of strcmp's, and allows to use a faster memcmp.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agotest/keyseq: test 'map[None] = Level2;' scenario
Ran Benita [Thu, 16 Oct 2014 22:14:57 +0000 (01:14 +0300)]
test/keyseq: test 'map[None] = Level2;' scenario

See previous commit for an explanation.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agotest/data: add files for model=applealu_ansi layout=us
Ran Benita [Thu, 16 Oct 2014 14:55:46 +0000 (17:55 +0300)]
test/data: add files for model=applealu_ansi layout=us

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agotest/data: sync to xkeyboard-config 2.13
Ran Benita [Thu, 16 Oct 2014 14:48:00 +0000 (17:48 +0300)]
test/data: sync to xkeyboard-config 2.13

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

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agostate: correctly infer inactive type entries
Ran Benita [Thu, 16 Oct 2014 21:41:05 +0000 (00:41 +0300)]
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>
9 years agosymbols: don't warn about conflicting syms if they are the same
Ran Benita [Thu, 16 Oct 2014 21:13:48 +0000 (00:13 +0300)]
symbols: don't warn about conflicting syms if they are the same

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoparser: bring back warning about includes of files with no default
Ran Benita [Thu, 16 Oct 2014 15:51:51 +0000 (18:51 +0300)]
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>
9 years agoMerge pull request #14 from jasperla/undefined
Ran Benita [Thu, 16 Oct 2014 10:11:26 +0000 (13:11 +0300)]
Merge pull request #14 from jasperla/undefined

disable -Wl,--no-undefined on OpenBSD for it doesn't have DT_NEEDED for libc

9 years agodisable -Wl,--no-undefined on OpenBSD for it doesn't have DT_NEEDED for libc
Jasper Lievisse Adriaanse [Thu, 16 Oct 2014 09:35:18 +0000 (11:35 +0200)]
disable -Wl,--no-undefined on OpenBSD for it doesn't have DT_NEEDED for libc

9 years agoMerge pull request #13 from jasperla/librt
Ran Benita [Wed, 15 Oct 2014 19:38:17 +0000 (22:38 +0300)]
Merge pull request #13 from jasperla/librt

Make librt optional, required for at least OpenBSD

9 years agoMake librt optional, required for at least OpenBSD
Jasper Lievisse Adriaanse [Wed, 15 Oct 2014 19:08:17 +0000 (21:08 +0200)]
Make librt optional, required for at least OpenBSD

9 years agotest/compose: test include statement
Ran Benita [Tue, 14 Oct 2014 08:47:25 +0000 (11:47 +0300)]
test/compose: test include statement

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agotest/compose: test modifier syntax
Ran Benita [Tue, 14 Oct 2014 07:53:38 +0000 (10:53 +0300)]
test/compose: test modifier syntax

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agocompose/parser: fix parsing of multiple modifiers
Ran Benita [Tue, 14 Oct 2014 08:28:17 +0000 (11:28 +0300)]
compose/parser: fix parsing of multiple modifiers

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agocompose/parser: parse (! mods) properly
Ran Benita [Mon, 13 Oct 2014 15:19:16 +0000 (18:19 +0300)]
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>
9 years agocompose/parser: resolve keysyms in parser instead of scanner
Ran Benita [Mon, 13 Oct 2014 12:47:13 +0000 (15:47 +0300)]
compose/parser: resolve keysyms in parser instead of scanner

It will become context-sensitive.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agocompose/parser: use parameter as intended
Ran Benita [Mon, 13 Oct 2014 12:05:48 +0000 (15:05 +0300)]
compose/parser: use parameter as intended

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agocompose/parser: one more skip_to_eol()
Ran Benita [Sun, 12 Oct 2014 21:16:59 +0000 (00:16 +0300)]
compose/parser: one more skip_to_eol()

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agocompose/parser: fix segfault when including
Ran Benita [Mon, 13 Oct 2014 15:51:12 +0000 (18:51 +0300)]
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>
9 years agoCOPYING: add copyright notice from libX11:modules/im/ximcp/imLcPrs.c
Ran Benita [Mon, 13 Oct 2014 11:28:27 +0000 (14:28 +0300)]
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>
9 years agoscanner-utils: optimize one-line comments
Ran Benita [Tue, 7 Oct 2014 20:42:08 +0000 (23:42 +0300)]
scanner-utils: optimize one-line comments

Compose files have a lot of those.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agobench/compose: add new benchmark
Ran Benita [Thu, 2 Oct 2014 21:30:43 +0000 (00:30 +0300)]
bench/compose: add new benchmark

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agotest/interactive-evdev: add compose support
Ran Benita [Wed, 29 Jan 2014 11:46:42 +0000 (13:46 +0200)]
test/interactive-evdev: add compose support

To try, do e.g.:
sudo ./test/interactive-evdev -l us -v intl -o compose:ralt -d

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agotest/compose: add new test
Ran Benita [Sun, 27 Oct 2013 18:37:27 +0000 (20:37 +0200)]
test/compose: add new test

Some results from the benchmark (compilation of en_US.UTF-8/Compose):

$ grep 'model name' /proc/cpuinfo
model name  : Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz
model name  : Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz

$ uname -a
Linux ran 3.16.1-1-ARCH #1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014 x86_64 GNU/Linux

$ ./test/compose bench
compiled 1000 compose tables in 7.776488331s

So according to the above benchmark and valgrind --tool=massif, an
xkb_compose_table adds an overhead of about ~8ms time and ~130KB
resident memory.
For contrast, a plain US keymap adds an overhead of ~3ms time and 90KB
resident memory.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agocompose: add xkbcommon-compose - implementation
Ran Benita [Fri, 12 Sep 2014 15:44:30 +0000 (18:44 +0300)]
compose: add xkbcommon-compose - implementation

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agocompose: add xkbcommon-compose - API
Ran Benita [Fri, 12 Sep 2014 15:43:58 +0000 (18:43 +0300)]
compose: add xkbcommon-compose - API

xkbcommon-compose is a Compose implementation for xkbcommon. It mostly
behaves like libX11's Compose, but the support is somewhat low-level and
is not transparent like in libX11. The user must add some supporting code
in order to utilize it.

The intended audience are users who use xkbcommon but not a full-blown
input method. With this they can add Compose support in a straightforward
manner, so they have a fairly complete keyboard input for Latin-like
languages at least.

See the header documentation for details.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoscanner-utils: add priv member
Ran Benita [Fri, 12 Sep 2014 15:40:18 +0000 (18:40 +0300)]
scanner-utils: add priv member

For when a user of the scanner wants to pass something along with it.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodarray: add darray_shrink()
Ran Benita [Thu, 11 Sep 2014 21:31:40 +0000 (00:31 +0300)]
darray: add darray_shrink()

If we have a big array which can be finalized, on average we can give
back 1/4 of its size, which the allocator might be able to use.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agokeysym: add function to test if a keysym is for a modifier
Ran Benita [Wed, 5 Feb 2014 23:48:32 +0000 (01:48 +0200)]
keysym: add function to test if a keysym is for a modifier

Needed for compose.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoscanner-utils: add helper for appending an entire string
Ran Benita [Mon, 3 Feb 2014 12:55:37 +0000 (14:55 +0200)]
scanner-utils: add helper for appending an entire string

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoscanner-utils: add helper for hex string escape
Ran Benita [Sun, 27 Oct 2013 18:17:29 +0000 (20:17 +0200)]
scanner-utils: add helper for hex string escape

Like the already existing oct.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoMove benchmarks from tests to their own files in bench/
Ran Benita [Thu, 2 Oct 2014 19:03:28 +0000 (22:03 +0300)]
Move benchmarks from tests to their own files in bench/

The tests only contain tests, and the benchmarks are more visible.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agobuild: don't rebuild everything for libtest.la
Ran Benita [Thu, 2 Oct 2014 18:24:29 +0000 (21:24 +0300)]
build: don't rebuild everything for libtest.la

We added a -fvisibilty=default to the libtest.la CFLAGS. When automake
sees that the CFLAGS are different from those of libxkbcommon.la, it
figures it should recompile all of the $(libxkbcommon_la_SOURCES),
instead of reusing the already-compiled object files.

But actually, the convenience library is not a shared object, it's just
used as an archive, thus the -fvisibility is entirely pointless. So
avoid the recompilations by just removing it.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoscanner-utils: optimize str()/lit()
Ran Benita [Wed, 1 Oct 2014 16:14:36 +0000 (19:14 +0300)]
scanner-utils: optimize str()/lit()

Replace the dog-slow unneeded strncasecmp() with an inlineable memcmp().

Before:
compiled 2500 keymaps in 8.348715629s

After:
compiled 2500 keymaps in 7.872640338s

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agokeymap: rename XkbKeyGroupWidth to XkbKeyNumLevels
Ran Benita [Thu, 25 Sep 2014 19:01:17 +0000 (22:01 +0300)]
keymap: rename XkbKeyGroupWidth to XkbKeyNumLevels

The "width" terminology comes from the group*width+level layout of the
keysyms in a key, as used in the old implementations. We don't keep all
the keysyms of a key in one array so change it to a more accurate name.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agosymbols: improve FindKeyForSymbol()
Ran Benita [Thu, 25 Sep 2014 18:55:52 +0000 (21:55 +0300)]
symbols: improve FindKeyForSymbol()

A bit more involved, but can short circuit.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agosymbols: use correct max value
Ran Benita [Thu, 25 Sep 2014 18:25:39 +0000 (21:25 +0300)]
symbols: use correct max value

xkb_level_index_t was initially uint16_t, now it's 32.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc: disable alphabetical data structure index
Ran Benita [Mon, 22 Sep 2014 12:45:26 +0000 (15:45 +0300)]
doc: disable alphabetical data structure index

It is useless - we have very little data structures.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc: disable BRIEF_MEMBER_DESC
Ran Benita [Mon, 22 Sep 2014 12:31:51 +0000 (15:31 +0300)]
doc: disable BRIEF_MEMBER_DESC

It's easier to quickly go through the functions in a module this way.
The names provide enough "brief description" to get someone to click for
the full description.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc: disable tree view
Ran Benita [Mon, 22 Sep 2014 12:27:13 +0000 (15:27 +0300)]
doc: disable tree view

It is redundant with the header navigation.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc: linkify some references
Ran Benita [Mon, 22 Sep 2014 12:23:10 +0000 (15:23 +0300)]
doc: linkify some references

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agox11, doc: add note about Key{Press,Release}->state field
Ran Benita [Mon, 22 Sep 2014 08:44:51 +0000 (11:44 +0300)]
x11, doc: add note about Key{Press,Release}->state field

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agox11, doc: add note about per-client flags like detectable autorepeat
Ran Benita [Mon, 22 Sep 2014 08:24:17 +0000 (11:24 +0300)]
x11, doc: add note about per-client flags like detectable autorepeat

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agokeymap-dump: combine modifier_map's with the same modifier
Ran Benita [Sun, 21 Sep 2014 20:54:34 +0000 (23:54 +0300)]
keymap-dump: combine modifier_map's with the same modifier

A bit less efficient, but makes for shorter, nicer output.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agorules: fix mlvo-not-used warning
Ran Benita [Sun, 21 Sep 2014 14:09:58 +0000 (17:09 +0300)]
rules: fix mlvo-not-used warning

An mlvo can also be used in an expansion, but we didn't mark them in
this case in commit d8a4f52cb95d989b4. This caused wrongful warnings on
something like -l ch -v fr -- the `fr` is only added via expansion.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoquick-guide: fix xkb_state_key_get_syms() example
Ran Benita [Sat, 20 Sep 2014 21:59:11 +0000 (00:59 +0300)]
quick-guide: fix xkb_state_key_get_syms() example

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoquick-guide: fix Java-esque array syntax
Ran Benita [Sat, 20 Sep 2014 21:56:33 +0000 (00:56 +0300)]
quick-guide: fix Java-esque array syntax

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agorules: warn when an RMLVO component isn't used
Ran Benita [Sat, 20 Sep 2014 13:13:24 +0000 (16:13 +0300)]
rules: warn when an RMLVO component isn't used

Due to wildcard matches in the rules file, this is only really useful
for misspelled or missing options, e.g.

$ ./test/rmlvo-to-kccgst -o comprose:ralt > /dev/null
xkbcommon: ERROR: Unrecognized RMLVO option "comprose:ralt" was ignored

Although it is more of a warning, it indicates a misconfiguration which
the user probably wants to see. Therefore the log level is ERROR.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoparser: use "atom" instead of "sval" in yylval
Ran Benita [Sat, 20 Sep 2014 12:06:13 +0000 (15:06 +0300)]
parser: use "atom" instead of "sval" in yylval

"sval" is already used for "struct sval".

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc: reorder "Keymap Components" functions
Ran Benita [Fri, 19 Sep 2014 09:35:52 +0000 (12:35 +0300)]
doc: reorder "Keymap Components" functions

Put the general keymap stuff before key-specific functions.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc: move consumed modifier description to its own section
Ran Benita [Thu, 18 Sep 2014 21:56:16 +0000 (00:56 +0300)]
doc: move consumed modifier description to its own section

With small edits.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc: order the modules better
Ran Benita [Thu, 18 Sep 2014 18:09:41 +0000 (21:09 +0300)]
doc: order the modules better

Explicitly specify the files in INPUT so that "X11 Support" appears
after the main modules.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agox11, doc: fix typo
Ran Benita [Thu, 18 Sep 2014 09:13:59 +0000 (12:13 +0300)]
x11, doc: fix typo

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agox11, doc: add overview
Ran Benita [Thu, 18 Sep 2014 08:59:27 +0000 (11:59 +0300)]
x11, doc: add overview

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agotest/keyseq: add test
Ran Benita [Thu, 11 Sep 2014 11:08:12 +0000 (14:08 +0300)]
test/keyseq: add test

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agoconfigure.ac: add -Wdocumentation
Ran Benita [Thu, 11 Sep 2014 09:15:31 +0000 (12:15 +0300)]
configure.ac: add -Wdocumentation

It's supported by clang and warns about bad doxygen comments.

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agodoc: fix @param display for xkb_x11_setup_xkb_extension()
Ran Benita [Thu, 11 Sep 2014 09:09:57 +0000 (12:09 +0300)]
doc: fix @param display for xkb_x11_setup_xkb_extension()

Signed-off-by: Ran Benita <ran234@gmail.com>
9 years agosymbols: use darray_foreach_from for nicer loop
Ran Benita [Wed, 10 Sep 2014 23:55:51 +0000 (02:55 +0300)]
symbols: use darray_foreach_from for nicer loop

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