Makefile.am


Log

Author Commit Date CI Message
Ran Benita 2f93c788 2013-07-30T15:06:40 x11: add a couple of tests Add two tests: ./test/interactive-x11 which is like test/interactive-evdev, but should behave exactly like your X keyboard and react to state and keymap changes - in other words, just like typing in xterm. Press ESC to exit. ./test/x11 which currently should only print out the same keymap as xkbcomp $DISPLAY out.xkb (modulo some whitespace and some constructs we do not support.) Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita eb348255 2013-07-20T23:21:44 x11: add XKB protocol keymap and state creation support These are function to create an xkb_keymap directly from XKB requests to the X server. This opens up the possibility for X clients to use xcb + xcb-xkb + xkbcommon as a proper replacement for Xlib + xkbfile for keyboard support. The X11 support must be enabled with --enable-x11 for now. The functions are in xkbcommon/xkbcommon-x11.h. It depends on a recent libxcb with xkb enabled. The functions are in a new libxkbcommon-x11.so, with a new pkg-config file, etc. so that the packages may be split, and libxkbcommon.so itself remains dependency-free. Why not just use the RMLVO that the server puts in the _XKB_RULES_NAMES property? This does not account for custom keymaps, on-the-fly keymap modifications, remote clients, etc., so is not a proper solution in practice. Also, some servers don't even set it. Now, the client just needs to recreate the keymap in response to a change in the server's keymap (as Xlib clients do with XRefreshKeyboardMapping() and friends). Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita ddbefda3 2014-01-13T18:19:36 build: error out on undefined symbols This helps ensure we don't ship a library with undefined symbols, which can easily happen with multiple inter-dependent DSOs. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita a9c56f64 2014-01-13T17:20:54 context: split private functions to context-priv.c (Same as keymap-priv.c). Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 7210497c 2014-01-13T17:07:41 keymap: split private functions to keymap-priv.c This makes it easier to share the private functions in other DSOs without relying (too much) on dead code elimination, exported symbols, etc. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita d63e0ab8 2013-07-30T13:38:51 test: rename test/interactive to interactive-evdev And share the key-printing functions. In preparation for adding more interactive-* variants. Signed-off-by: Ran Benita <ran234@gmail.com>
Jasper St. Pierre 938a2c37 2013-07-17T17:49:10 makekeys: Move all of the table generation to Python This makes it easier to run the Python script manually.
Ran Benita b246edc6 2013-12-02T14:16:45 test/atom: add test for atom table Mostly a random test. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 13da6da0 2013-09-29T00:24:50 parser: drop %name-prefix, use -p yacc argument instead Even though the %name-prefix is more sensible, byacc doesn't support it, but both bison and byacc support the -p argument. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 0dbe20ae 2013-09-29T00:16:39 Makefile.am: drop AM_LFLAGS We don't use a lex/flex anymore so this is not used. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 5d2b268d 2013-08-29T19:07:25 build: distribute makekeys.py and keywords.gperf This was an oversight: even though we ship the pre-built files, it is still good behavior to include the original generators / source files in the tarball. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 5b7f7668 2013-08-15T09:32:42 build: build libtest.la only on 'make check' For those just running 'make', compiling libtest is wasted heat. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 9bb1d0bc 2013-08-02T11:07:27 build: make all symbols in libtest visible Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita c25bdc3f 2013-08-02T10:21:52 build: use AM_LDFLAGS for general flags We want -no-undefined for every library so do it implictly. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita a392d268 2012-08-12T11:40:02 Replace flex scanner with a hand-written one The scanner is very similar in structure to the one in xkbcomp/rules.c. It avoids copying and has nicer error reporting. It uses gperf to generate a hashtable for the keywords, which gives a nice speed boost (compared to the naive strcasecmp method at least). But since there's hardly a reason to regenerate it every time and require people to install gperf, the output (keywords.c) is added here as well. Here are some stats from test/rulescomp: Before: compiled 1000 keymaps in 4.052939625s ==22063== total heap usage: 101,101 allocs, 101,101 frees, 11,840,834 bytes allocated After: compiled 1000 keymaps in 3.519665434s ==26505== total heap usage: 99,945 allocs, 99,945 frees, 7,033,608 bytes allocated Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita e4bceec8 2013-03-14T14:33:40 utils: add {un,}map_file to read an entire file This wraps the current mmap call and adds a fallback implementation for systems which do not have mmap (e.g. mingw). Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 99f6e6fc 2013-03-14T14:31:55 Add scanner-utils.h for common scanner functions We want to share the same functions for another scanner. Signed-off-by: Ran Benita <ran234@gmail.com>
David Herrmann 36f55c49 2013-03-11T12:53:39 keymap: add xkb_keymap_new_from_buffer() The current API doesn't allow the caller to create keymaps from mmap()'ed files. The problem is, xkb_keymap_new_from_string() requires a terminating 0 byte. However, there is no way to guarantee that when using mmap() so a user currently has to copy the whole file just to get the terminating zero byte (assuming they cannot use xkb_keymap_new_from_file()). This adds a new entry xkb_keymap_new_from_buffer() which takes a memory location and the buffer size in bytes. Internally, we depend on yy_scan_{string,byte}() helpers. According to flex documentation these already copy the input string because they are wrappers around yy_scan_buffer(). yy_scan_buffer() on the other hand has some insane requirements. The buffer must be writeable and the last two bytes must be ASCII-NUL. But the buffer may contain other 0 bytes just fine. Because we don't want these constraints in our public API, xkb_keymap_new_from_buffer() needs to create a copy of the input memory. But it then calls yy_scan_buffer() directly. Hence, we have the same number of buffer-copies as with *_from_string() but without the terminating 0 requirement. The explicit yy_scan_buffer() call is preferred over yy_scan_byte() so the buffer-copy operation is not hidden somewhere in flex. Maybe some day we no longer depend on flex and can have a zero-copy API. A user could mmap() a file and it would get parsed right from this buffer. But until then, we shouldn't expose this limitation in the API but instead provide an API that some day can work with zero-copy. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> [ran: rebased on top of my branch] Conflicts: Makefile.am src/xkbcomp/xkbcomp.c
Daniel Stone 38654f5e 2013-03-27T22:40:58 Add key-sequence checking to rulescomp Make sure we're actually getting the keymaps we're hoping to compile. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 71eb033e 2013-03-03T21:35:43 Move a couple of general keymap functions from keycodes.c To get a key by name and resolve an alias - this makes sense for everyone. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 79329e10 2013-03-02T19:01:18 Don't try to build linux-specific tests on non-linux Some tests use linux/input.h (and epoll), but we're building on some other kernels (e.g. debian freebsd). We could just copy the file but it's GPL. We could also skip the tests (exit code 77) but it doesn't really matter. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 14842d6d 2013-03-01T21:48:02 keymap: abstract a bit over the keymap format Make it a bit easier to experiment with other formats. Add a struct xkb_keymap_format_operations, which currently contains the keymap compilation and _get_as_string functions. Each format can implement whatever it wants from these. The current public entry points become wrappers which do some error reporting, allocation etc., and calling to the specific format. The wrappers are all moved to src/keymap.c, so there are no XKB_EXPORT's under src/xkbcomp/ anymore. The only format available now is normal text_v1. This is all not very KISS, and adds some indirection, but it is helpful and somewhat cleaner. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 958b2728 2013-02-25T12:37:28 Remove list.h We don't use it anymore and it's easy to add back if needed. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 2b352c11 2013-02-25T12:27:24 Makefile.am: don't create INSTALL and ChangeLog It may be xorg standard but it's completely useless and clutter the directory. Signed-off-by: Ran Benita <ran234@gmail.com>
Damien Lespiau 2f7385d0 2012-10-26T00:51:46 build: Make autoreconf honour ACLOCAL_FLAGS When running autoreconf, it's possible to give flags to the underlying aclocal by declaring a ACLOCAL_AMFLAGS variable in the top level Makefile.am. Putting ${ACLOCAL_FLAGS} there allows the user to set an environment variable up before running autogen.sh and pull in the right directories to look for m4 macros, say an up-to-date version of the xorg-util macros. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Cc: Daniel Stone <daniel@fooishbar.org>
Ran Benita 92360016 2012-10-26T15:05:04 Makefile.am: move test.h to libtest_la_SOURCES Rather than EXTRA_DIST, where it doesn't belong. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 22b868fd 2012-10-26T15:00:33 Makefile.am: split sed script into multiple lines To make it visible on one screen. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita c1c1b720 2012-10-24T23:27:40 test: add key processing benchmark This runs a bunch of random keys against xkb_state_update_key() and xkb_state_key_get_one_sym(), in a fairly unintelligent way. It might be nice to check when modifying this code path, or changing it, to see things haven't slowed down considerably. However, given the numbers this benchmark gives, it is pretty clear that we are not going to be the bottleneck for anything. So this can more-or-less be ignored. Incidentally, this also turned out to be a poor man's fuzzer, because it turned up the fix in the previous commit. Maybe we should consider beefing it up with an actual 'break stuff' intention and running it as part of 'make check'. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 5d9a5cb0 2012-10-17T19:52:47 Commit and distribute ks_tables.h The ks_tables.h file is generated by makekeys.py from xkbcommon-keysyms.h, which in turn is generated initially by 'make update-keysyms'. The xkbcommon-keysyms.h file is commited to git and distributed in the tarball. Since ks_tables.h should only ever change when xkbcommon-keysyms.h changes, it is more sensible to update them together and treat them the same, instead of generating ks_tables.h every time for every builder with 'make', as we do now. This means we don't need python as a build dependency (only the one running update-keysyms, i.e. no one, needs this), and we can be sure exactly the same file is used by everyone. We also don't need to run makekeys.py on every build. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 5fff637e 2012-10-16T16:05:33 makekeys: replace helper with python script and binary search This removes the complicated and undocumented hash-table creation-helper and replaces it with an autogenerated sorted array. The search uses simple bsearch() now. We also tried using gperf but it turned out to generate way to big hashtables and when reducing the size it isn't really faster than bsearch() anymore. There are no users complaining about the speed of keysym lookups and we have no benchmarks that tell that we are horribly slow. Hence, we can safely use the simpler approach and drop all that old code. Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Ran Benita 523e46f4 2012-10-12T10:15:43 Change log env vars to XKB_LOG_LEVEL/VERBOSITY A bit more consistent and descriptive. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 108fa1c7 2012-09-22T15:02:54 Add support for building doxygen API documentation Simple HTML docs generated from the doxygen comments. After running 'make' or 'make doc', try firefox doc/html/index.html to see it (if you have doxygen). It's also installed with 'make install'. You can use --enable-docs or --disable-docs, or specifically --with-doxygen or --without-doxygen (autodetected, default yes). The docs are currently not distributed in the tarball, because I couldn't make it work properly in all cases :/ Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 18a43322 2012-09-21T19:57:37 configure.ac: add XORG_MEMORY_CHECK_FLAGS Adds some memory checking (e.g. MALLOC_PERTURB_) to tests. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 414007ca 2012-09-21T19:48:33 configure.ac: remove XORG_CHECK_MALLOC_ZERO We don't use its result. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita bbaa11c6 2012-09-21T14:58:31 Rename map.{c,h} to keymap.{c,h} Seeing as we don't like "map" anymore. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 005dee2b 2012-09-20T23:28:27 Add _xkbcommon_ prefix to parser and lexer symbols Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 80e15681 2012-09-12T19:52:30 Add xkbcommon-compat.h and compat.c So we can start renaming stuff while retaining backwards source and binary compatibility. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 2c96828f 2012-09-19T16:44:15 test: add print-compiled-keymap tool This just prints the compiled keymap string for to the given command line arguments. This often useful when developing. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita b2110705 2012-09-16T14:45:32 Organize src/ and test/ headers - Add context.h and move context-related functions from xkb-priv.h to it. - Move xkb_context definition back to context.c. - Add keysym.h and move keysym upper/lower/keypad from xkb-priv.h to it. - Rename xkb-priv.h to map.h since it only contains keymap-related definitions and declarations now. - Remove unnecessary includes and some and some other small cleanups. Signed-off-by: Ran Benita <ran234@gmail.com>
David Herrmann 095a7f4c 2012-09-11T16:49:04 xkbcommon-keysyms: Add header protection As there is currently no stable release of xkbcommon, other projects might want to include a copy of the keysyms so they can be used even though libxkbcommon may not be available on the machine. However, if xkbcommon.h is still included, conflicts will occur. Hence, to avoid nasty hacks, simply include a header protection in xkbcommon upstream. [daniels: Added protection to Makefile.am's update-keysyms, as well as XKB_KEY_NoSymbol, and a comment noting that it shouldn't be updated directly.] Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 1aa6e2b1 2012-08-28T19:07:07 test/rules-file: add benchmark Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 480f919d 2012-08-29T11:54:05 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>
Ran Benita f3c4032f 2012-08-30T20:23:35 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>
Ran Benita 8c1b1b0e 2012-08-29T15:02:40 Add xkbcomp/keymap.c and move some code there Add CompileKeymap to do most of what compile_keymap_file does now, and move UpdateKeymapFromModifiers along with it from (mostly unrelated) compat.c. Also rename UpdateKeymapFromModifiers to UpdateDerivedKeymapFields, because it does more than update the modifiers. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita cdc228ea 2012-08-13T11:00:43 Organize xkbcomp/ header files Various non-functional changes: - Re-add keycodes.h and move some stuff there. - Add parser-priv.h for internal bison/flex stuff. - Don't include headers from other headers, such that file dependencies are immediate in each file. - Rename xkbcomp.h -> ast.h, parseutils.{c,h} -> ast-build.{c,h} - Rename path.{c,h} -> include.{c,h} - Rename keytypes.c -> types.c - Make the naming of XkbFile-related functions more consistent. - Move xkb_map_{new,ref,unref} to map.c. - Remove most extern keyword from function declarations, it's just noise (XKB_EXPORT is what's important here). - Append XKBCOMP_ to include guards. - Shuffle some code around to make all of this work. Splitting this would be a headache.. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 0cc5ae33 2012-08-10T13:30:44 Remove xkbcomp/misc.c The KeyName functions are more appropriate in keycodes.c. The ProcessIncludeFile can go to path.c along with the other functions dealing with includes. Signed-off-by: Ran Benita <ran234@gmail.com>
Pekka Paalanen 3199ea73 2012-05-14T14:33:29 android: add build files squashed: android: set xkb config path Conflicts: Makefile.am
Daniel Stone e756e9b5 2012-08-03T04:02:31 test/dump: Remove superfluous test No longer necessary now we have stringcomp doing a full round-trip test for us. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 8fe2a484 2012-08-03T03:32:30 Rename xkey test to keysym Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 5cf4f510 2012-08-03T02:57:02 Staticise xkb_map_new_from_kccgst We didn't expose this to the outside world, and its only trivial user was xkb_map_new_from_rules. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 4c212753 2012-04-08T02:20:39 Add an interactive evdev test The program reads key events from evdev input devices, puts them through the library and prints some information about them. It's nice for experimenting, quick testing and trying to break it with random stuff (already found some!). It is called "interactive" for lack of a better name. It's a bit hackish, but can easily be extended, made more portable etc, in the future. Signed-off-by: Ran Benita <ran234@gmail.com> Conflicts: Makefile.am test/.gitignore
Ran Benita 74be1762 2012-07-23T21:30:28 Remove alloc.{c,h} These functions are more appropriate elsewhere now. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 3dc1252d 2012-07-22T19:38:14 Add test for logging functionality Just to make sure everything works properly. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 70f35cfb 2012-07-20T13:10:13 Add logging API Add new public API to provide the library users with some options to control and customize the logging output from the library. It is based upon the skeleton from the libabc demo libray: https://git.kernel.org/?p=linux/kernel/git/kay/libabc.git which is public domain and works pretty well. This requires passing in the context object in every logging call, and thus the conversion is done file by file. We also remove the global warningLevel variable in favor of a verbosity level in the context, which can be set by the user and is silent by default. One issue is the ACTION calls, which, while nice, do not play very well with line- and priority-based logging, and would require some line continuation handling or keeping state or some other compromise. So instead remove these and just inline them with their respective warning/error. So instead of: ERROR("Memory allocation failed\n") ACTION("Removing all files on hardisk\n") its something like that: log_err("Memory allocation failed; Removing all files on harddisk\n") Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 5e164ff1 2012-07-23T00:41:27 build: drop the include/ directory The include/ dir is somewhat redundant and makes it just a bit harder to handle the -I directives from out side of automake; without it the default $(top_buildir) just works. Here's also some further justifications I found: http://smcv.pseudorandom.co.uk/2008/09/pc-uninstalled/ Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita dfa0929c 2012-07-16T22:15:43 Convert macros to inline functions Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita ba4320f7 2012-07-16T22:45:16 Move indicators.c code into compat.c It is only used there. Allows some refactoring. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita cc8b0682 2012-07-16T17:53:46 Move alias.c functions into keycodes.c They are only used in this file. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita b6e2a56d 2012-07-16T11:06:33 Add common linked list implementation Taken from xserver/include/list.h. The changes made are: * Drop the xorg_ prefix and some typedef from the end. * Rename _for_each_entry macros to just _foreach (like darray). * Rename list_is_empty to list_empty (like darray). * Add a list_replace function which we use later. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita fe4f9909 2012-07-14T00:27:19 Move CompileKeymap into xkbcomp.c It's nicer to see the code where its used. Removes keymap.c. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 57374c32 2012-07-13T18:55:10 Rename KSIsLower/Upper and move to keysym.c Seems like a more natural place, and allows to remove the src/misc.c file. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita a3378338 2012-07-13T17:10:48 remove unused function xkb_canonicalise_components commit 46441b1184dfa8553409d493ae6336aabb900d79 removed this from the public API, and we don't need it internally. So send it to the archives. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 3e65531f 2012-07-13T17:31:30 Move ComputeEffectiveMap code and avoid some duplication The ComputeEffectiveMap function is only called from keytypes.c, with the last argument NULL, so we can move it there and remove some code. The function XkbcVirtualModsToRealMods, of which the above is the only user, is already implemented more simply in compat.c, so make this one non-static and use it. This leaves src/xkb.c empty, so remove it. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 3e86ebca 2012-07-12T14:15:08 Add a library of common test functions Including creating a context (will come in useful soon), opening and reading files, and compiling keymaps. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 0015604a 2012-04-10T21:20:27 Add a test for the results of key sequences This test verifies the core purpose of this library, which is to translate the user's keypresses into keysyms according to the keymap and the XKB specification. The tests emulate a series of key presses, and checks that the resulting keysyms are what we expect. Several of the tests currently fail, and plenty more should be added and maybe split up. It also currently uses an RMLVO keymap, which comes from the xkeyboard-config data set, and whose behaviour may change in the future. So it should probably be changed to use several files of our own, but it's OK for now. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 9baf62f3 2012-05-20T20:51:50 Remove configure check for X11 keysym files Since every user building the library, even from git, doesn't need these files anymore, there's no need to check for them (this goes for makekeys as well). The only remaining user is the update-keysyms target, but whoever will run it again (if ever) will probably know what he's doing (at least enough to run git diff before git commit). And the defaults should be fine too. Signed-off-by: Ran Benita <ran234@gmail.com>
Rob Bradford e0524296 2012-06-08T13:10:28 Add API for getting unicode representation of a keysym This code uses a table and code derived from http://www.cl.cam.ac.uk/~mgk25/ucs/keysym2ucs.c The added API calls are: xkb_keysym_to_utf32 xkb_keysym_to_utf8 [daniels: Changed API to be more in line with keysym_get_name, added test, changed formatting to 4-space.]
Daniel Stone d3dfd7de 2012-06-04T16:14:42 Use $(top_builddir) rather than relative paths Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 734be500 2012-06-04T14:06:01 Work around stupid automake dependency-tracking bug bison/flex-generated objects, when being run in a VPATH build with --disable-dependency-tracking (i.e. Gentoo), would fail to be created because automake didn't bother creating the destination directories before trying to create the objects. Fix this by depending on the destination directory stamp, which according to the automake mailing list, should hopefully remain fairly stable. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 243daf80 2012-05-29T15:08:35 Add test for xkb_map_new_from_string Using data from xkb_map_get_as_string. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone ebd397e1 2012-05-25T17:05:39 Add xkb_map_get_as_string Returns a newly-allocated string representing the specified keymap. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita c815ff96 2012-05-21T23:33:56 Import darray.h for common dynamic array code Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 869c6871 2012-05-19T02:35:15 rules: add test Add a non-extensive test to check that some basic things (e.g. rule matching, var substitution, indexes and groups) work as expected. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita b73bd676 2012-05-13T09:49:08 rules: only export a single function Really all we need from this file is a way to get xkb_component_names from an xkb_rule_names, which is now the only thing being exposed. This should allow for some much needed refactoring of this code. Since this is only used by xkbcomp.c and uses xkbcomp functions, also move rules.{c,h} under the xkbcomp dir. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita db3e8f2c 2012-05-13T10:14:10 Create path.h for the path.c functions No need to stash them in xkbcomp-priv.h; files which need the functions should explicitly include them. Signed-off-by: Ran Benita <ran234@gmail.com>
Pekka Paalanen cb804a9d 2012-05-15T15:23:40 Fix out-of-tree build for config.h config.h appreas in the build dir, not src dir. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Daniel Stone 661cb840 2012-05-18T00:56:36 Add benchmarking test to rulescomp Apparently it only takes us 8ms to build keymaps. Nice! Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Kristian Høgsberg 3fbc277b 2012-05-11T16:14:27 Use $(AM_V_GEN) to prettyfi makekeys step
Daniel Stone f95b4113 2012-05-11T14:28:54 Add xkbcommon-keysyms.h to Makefile.am Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 6433d72e 2012-05-09T20:12:12 Merge remote-tracking branch 'krh/keysyms' Conflicts: src/keysym.c src/misc.c src/text.h src/xkbcomp/expr.c src/xkbcomp/parser.y src/xkbcomp/parseutils.c src/xkbcomp/symbols.c Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Kristian Høgsberg ace1e5df 2012-05-09T09:05:00 Use our own keysyms
Kristian Høgsberg c6897d26 2012-05-09T08:33:04 Add XKB version of X11 keysyms With this we're now completely standalone. add vendor keysyms
Pekka Paalanen bdbb3ac4 2012-05-08T11:46:58 makekeys: fix cross-compilation makekeys must be built with the build-native compiler, not with $(CC) which is the cross-compiler. The only sane way to achieve this seems to be to use a separate Makefile.am for it. This patch fixes the problem apparently caused by: commit b5efe41f190cbb76eb1ca8ddf0c96990ddb83704 Author: Ran Benita <ran234@gmail.com> Date: Sat Mar 24 04:48:31 2012 +0200 Make build non-recursive There is no such thing as makekeys_makekeys_CC in automake. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Daniel Stone f9fa740f 2012-05-09T15:23:44 Make build directory includes more explicit We depend on parser.h which is generated by flex during the build, so use an explicit $(top_builddir) rather than a relative path. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 74a197d2 2012-05-08T17:59:35 Add pre-defined names database xkbcommon-names.h right now just contains a set of hardcoded modifier strings that are most commonly used for the usual modifiers. Provide definitions of these so people don't have to worry about typoing a string or mixing up Mod1 and Mod4. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 1928397a 2012-05-08T17:47:54 Reintroduce $(builddir)/src/xkbcomp include This is required for parser.h, which is autogenerated and thus only in the build directory. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita b610b2b9 2012-05-08T14:52:23 Rename XKBcommonint.h to xkb-priv.h and use it Make the files in the src/* directory use their own header or a consilidated private header. This makes the file dependencies clearer. Also drop the pointless "xkb" file name prefix, add split a few declarations to their own files (atom.h and text.h). Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 33273304 2012-05-08T13:57:07 Rename xkbcomp/misc.h to xkbcomp-priv.h and use it The include dependencies were quite convoluted, where you change the order and get a ton of errors. Instead, change one file to act as the internal interface for the xkbcomp files, and make every file use it. Also drop the pointless "xkb" prefix to file names. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 409ec8a1 2012-04-11T02:02:45 Merge src/alloc.c and src/malloc.c The two files do exactly the same sort of things, without any discernible reason for splitting them. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Updated for xkb_desc -> xkb_keymap changes.]
Ran Benita 4b49e0a1 2012-03-31T02:44:39 Overhaul test suite Rewrite all of the current tests in the following ways: - Instead of the current mix of C and shell, just use single-process pure C file per test. All of the .sh files are removed, but everything that was tested is ported. - Instead of handling the test logs ourselves, use Automake's "parallel-test" mechanism. This will create a single log file for each test with it's stdout+stderr, and a top level "test-suite.log" file for all the failed tests. - The "parallel-tests" directive also makes the test run in parallel, so "make check" runs faster. - Also use the "color-tests" directive to have the "make check" output colorized. Who doesn't like to see PASS in green? - All of the test data files are moved into the test/data subdirectory. That way we can just put the directory in EXTRA_DIST and forget about it. - The test/Makefile.am file is consolidated into the main Makefile.am, for a completely non-recursive build. Right now the tests are completely independent and just use simple assert()'s. More sophistication can be added as needed. It should also be noted that it's still possible to use shell, python, etc. if a test wants more flexibility than C can provide, just do as before. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Updated for xkb_keymap changes.]
Ran Benita 8fbd44fd 2012-04-06T03:12:50 Implicitly include config.h in all files The definitions in config.h should be available in all files an implementation detail; it can be included through the build system instead of having each file pull it every time. This is especially helpful with AC_USE_SYSTEM_EXTENSIONS, as _GNU_SOURCE and friends can have an effect by merely being defined, which can lead to some confusion if its effective for only half the files. And we don't really support a build _without_ config.h; so, one less thing to worry about. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 518debb3 2012-04-08T15:38:04 Set xorg-macros CFLAGS correctly A previous commit messed up all warning flags. Oops. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 3e9dd751 2012-03-27T16:59:01 Add new context API Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 21f1bff4 2012-03-27T15:51:28 Fix distcheck with non-recursive Makefiles Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita b5efe41f 2012-03-24T04:48:31 Make build non-recursive Unify all the different Makefile.am into a single short top level one (the test/Makefile.am file is left intact though). This makes the build system simpler to look and should encourage unifying more currently-disparate code. Some further motivation can be found in this page: http://www.flameeyes.eu/autotools-mythbuster/automake/nonrecursive.html Signed-off-by: Ran Benita <ran234@gmail.com>
Gaetan Nadon 69e52ad9 2010-12-09T16:22:17 config: makekeys prog should stand alone in the makekeys directory This program is a utility to generated a header file. The header file it generates should not be located in the directory where this utility program is compiled. Move the /makekeys dir as a sibling of /src. This reduces the number of bi-directional relationships between directories. Make corresponding makefiles simplifications. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Gaetan Nadon 7ce1a6dc 2010-12-07T10:39:16 config: add the INSTALL target for installation instructions Acked-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Gaetan Nadon f75ff7d9 2010-12-03T15:13:01 config: remove m4/.gitignore now that toplevel one handles it all The -Im4 in Makefile.am will have to wait until the day there is an m4 macro checked-in git in the m4 directory. This does not prevent libtool to install its macros in m4. Acked-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Jan Engelhardt 2b36543a 2010-11-11T23:02:11 build: use AC_CONFIG_MACRO_DIR as per libtoolize warning libtoolize: Consider adding "AC_CONFIG_MACRO_DIR([m4])" to configure.ac and libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. libtoolize: Consider adding "-I m4" to ACLOCAL_AMFLAGS in Makefile.am. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Dan Nicholson a9822d87 2009-04-01T06:22:06 Add xkbcommon pkg-config file