Commit Graph

1566 Commits (b04344ff631d5c0564b7cd23b8ec346620d1c2ca)

Author SHA1 Message Date
Daniel Stone b04344ff63 travis: Enable documentation build
Make sure Doxygen is installed before we build.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2016-03-15 11:34:01 +00:00
Daniel Stone a2974d5f8a doc: Fix Doxygen include for srcdir != builddir
Instead of giving Doxygen a series of absolute paths to the source
files and a relative path to the output directory, run it from the
source directory with purely relative paths to the source files, and
give it an absolute path to the build directory.

This fixes the parsing of README.md with a separate build directory,
since the relative includes for doc/quick-guide.md and doc/compat.md
don't resolve otherwise. Doxygen's INCLUDE_PATH turns out not to fix
this either, since that's just a set of paths to open and parse, rather
than an analogue to cpp's -I.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2016-03-15 11:21:29 +00:00
Ran Benita d627549c61 Update NEWS
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 23:38:40 +02:00
Ran Benita 919b97a837 NEWS: add some spacing
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 23:33:18 +02:00
Ran Benita 914e84e018 build: don't run test/x11comp in make check for now
For some reason, the dumped keymap started repeating the two key types
FOUR_LEVEL_PLUS_LOCK and FOUR_LEVEL_KEYPAD. I need to investigate, but
let's disable it for now until I do (the problem would likely not be in
the xkbcommon - at most in the test itself).

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 23:17:23 +02:00
Ran Benita 37ee8e652b test/x11comp: fix memory leak
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 23:17:23 +02:00
Ran Benita fa1b454328 test: add a test that all symbol version file is updated
It is easy to forget to update these files when adding new symbols.

Stolen with slight changes from libinput (commit by Marek Chalupa):
https://cgit.freedesktop.org/wayland/libinput/commit/?id=a9f216ab47ea2f643f20ed741b741a2b5766eba3

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 23:17:23 +02:00
Ran Benita 1c6d21b45f Add symbol versions forgotten in 0ce17ef3ea
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 23:17:21 +02:00
Ran Benita 712b39ac7d build: make it easier to add non-built (e.g. script) tests
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 21:33:03 +02:00
Ran Benita 763e2b7e53 src/utils: check if fileno() failed in map_file
fileno() can fail, if called on e.g. fmemopen() FILEs which are not
backed by a file descriptor. This functions uses mmap to map the entire
file to memory, so using such FILEs will not work.

(There is actually no change of behavior here, since the following fstat
would have already failed with EBADF. But lets make it clear.)

Another possibility is to fall back to the !HAVE_MMAP case; but it
sounds like a better idea to leave it to the programmer to use the
new_from_string/new_from_buffer functions instead, instead of doing
double allocation behind their back.

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-03-13 20:24:44 +02:00
Ran Benita 39082082f6 keymap: share LevelsSameSyms()
The function is generic enough.

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-02-28 00:33:19 +02:00
Ran Benita c8a2564588 state: factor out get_entry_for_mods()
Will be useful later.

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-02-28 00:09:30 +02:00
Ran Benita 9f5139b5ea state: factor out entry_is_active() check
Makes the code slightly cleaner and I plan to use the function in
another place.

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-02-28 00:09:19 +02:00
Ran Benita c991a7df56 build: fix distcheck
File was renamed in 4266402.

Signed-off-by: Ran Benita <ran234@gmail.com>
2016-01-20 23:30:51 +02:00
Ran Benita e8f04f222a doc: add environment variables index
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-01-20 23:17:42 +02:00
Ran Benita 4aa50c9d88 doc: some notes about key names and aliases
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-01-20 23:17:42 +02:00
Mike Blumenkrantz 0ce17ef3ea keymap: add xkb_keymap_key_by_name(), xkb_keymap_key_get_name(), tests
xkb_keymap_key_by_name() allows finding a keycode from a given keyname and
is useful for generating keyboard events to use in regression tests
during CI

xkb_keymap_key_get_name() is the inverse of xkb_keymap_key_by_name()

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
[ran: some stylistic tweaks + another test case]
Signed-off-by: Ran Benita <ran234@gmail.com>
2016-01-20 23:17:10 +02:00
Ran Benita 7f3bb16729 doc/keymap-format-text-v1: add title and intro
Signed-off-by: Ran Benita <ran234@gmail.com>
2015-11-23 00:07:15 +02:00
Ran Benita cf337875c5 doc/quick-guide: small improvements
Signed-off-by: Ran Benita <ran234@gmail.com>
2015-11-21 23:17:55 +02:00
Ran Benita 4266402345 doc/keymap-format-text-v1: convert to markdown
Make it more readable for random browsing.

Signed-off-by: Ran Benita <ran234@gmail.com>
2015-11-21 23:12:18 +02:00
Ran Benita 8891953514 doc/keymap-format-text-v1: update info on preserve
Signed-off-by: Ran Benita <ran234@gmail.com>
2015-11-21 22:51:13 +02:00
Ran Benita 2cca028906 src/utils: change map_file to not take const string argument
map_file() uses PROT_READ, so const seems fitting; however unmap_file
calls munmap/free, which do not take const, so an UNCONSTIFY is needed.
To avoid the UNCONSTIFY hack, which is likely undefined behavior or some
such, just remove the const.

Signed-off-by: Ran Benita <ran234@gmail.com>
2015-11-19 00:44:27 +02:00
Ran Benita c7e2e6d7b4 keymap: fix outdated comment
See 725ae134d4.

Signed-off-by: Ran Benita <ran234@gmail.com>
2015-10-26 22:16:54 +02:00
Ran Benita 7bb425c14e 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>
2015-09-08 17:28:42 +03:00
Ran Benita 7a15c0efcc doc/Doxyfile: only keep non-default values
Signed-off-by: Ran Benita <ran234@gmail.com>
2015-09-08 09:21:32 +03:00
Ran Benita 8c0d6c7960 doc/Doxyfile: sync with latest version
Signed-off-by: Ran Benita <ran234@gmail.com>
2015-09-08 09:17:16 +03:00
Ran Benita 13d232592e 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>
2015-09-07 14:45:09 +03:00
Ran Benita 6ee503261b Merge pull request #27 from nuko8/osx_test_progs
Modifications to make 'make check' test complete for Mac OS X
2015-08-28 14:20:20 +03:00
Kazunobu Kuriyama 3c12d671cc 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.
2015-08-28 20:02:26 +09:00
Kazunobu Kuriyama 91a19905b3 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.
2015-08-28 19:37:09 +09:00
Ran Benita 74f85d0540 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>
2015-08-23 23:16:37 +03:00
Ran Benita bdf6880364 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>
2015-08-23 23:16:23 +03:00
Ran Benita afbe21a2ef Merge pull request #25 from mvo5/master
Add XKB_CONFIG_ROOT environment
2015-07-20 11:46:15 +03:00
Michael Vogt 7ea129fbfb Add XKB_CONFIG_ROOT environment
The XKB_CONFIG_ROOT environment allows overrding the build time
DFLT_XKB_CONFIG_ROOT path.
2015-07-20 10:31:02 +02:00
Ran Benita 257e38c821 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
2015-07-17 23:26:20 +03:00
Ran Benita 8e1fed6c68 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>
2015-03-24 16:49:47 +02:00
Daniel Stone c8c41c0160 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.
2015-03-10 12:20:01 +00:00
Ran Benita b0450847ff 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>
2015-02-19 17:03:06 +02:00
Ran Benita 74482de623 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>
2015-02-03 21:47:08 +02:00
Ran Benita ca58937da3 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>
2014-10-24 23:40:24 +03:00
Ran Benita dc275a289f PACKAGING: fix confusing typo
Signed-off-by: Ran Benita <ran234@gmail.com>
2014-10-24 23:06:07 +03:00
Ran Benita 508fbcd167 doc: explain the envvars which affect compose
Signed-off-by: Ran Benita <ran234@gmail.com>
2014-10-24 23:03:41 +03:00
Ran Benita 9162017947 keycodes: use correct printf format
Signed-off-by: Ran Benita <ran234@gmail.com>
2014-10-23 21:03:13 +03:00
Ran Benita c03834a1c6 Reduce variable scopes
Signed-off-by: Ran Benita <ran234@gmail.com>
2014-10-23 21:00:20 +03:00
Ran Benita 5e3615b246 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>
2014-10-18 20:04:57 +03:00
Ran Benita 4a660d7f86 xkbcomp: remove file->topName
It is useless.

Signed-off-by: Ran Benita <ran234@gmail.com>
2014-10-18 19:47:19 +03:00
Ran Benita 96a29ede77 xkbcomp/keymap: remove useless free()
Signed-off-by: Ran Benita <ran234@gmail.com>
2014-10-18 19:22:56 +03:00
Ran Benita c43c3c866e Bump version to 0.5.0
Signed-off-by: Ran Benita <ran234@gmail.com>
2014-10-18 16:41:59 +03:00
Ran Benita 60104e7955 Update NEWS
Signed-off-by: Ran Benita <ran234@gmail.com>
2014-10-18 16:41:36 +03:00
Ran Benita b92f792409 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>
2014-10-18 16:40:59 +03:00