Log

Author Commit Date CI Message
Daniel Stone 9308a460 2012-07-17T10:20:15 Run source tree through uncrustify .uncrustify.cfg committed for future reference also, but had to manually fix up a few things: it really likes justifying struct initialisers. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita c6c937ab 2012-07-15T17:35:35 Fix typo in out of range group calculation Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 7d400657 2012-07-14T19:53:13 Remove unused control num_groups We have xkb_map_num_groups for that. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 6c3e0811 2012-07-14T15:14:44 Convert missed enum merge_mode variables Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 43bf4136 2012-07-14T15:19:12 Fix fileID mess A few problems here: * In e.g. keycodes.c the fileID field of the Info struct was never initialized to the id of the appropriate file, so it was always 0. There's some code which uses it, mostly for warnings. * Some of the fileID fields were unsigned char, which overflows several times, seeing as the ID in some of our tests can get > 1000 (because we reuse the context). * Some sign mismatches. * fileID vs file_id. Hopefully this fixes everything. I doubt this stuff had ever worked as intended, in xkbcomp or otherwise. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 70683f7d 2012-07-14T12:37:25 path: fix error message Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita d705c5d9 2012-07-14T01:12:50 Make compile_keymap a little nicer Just using the fact that we must have all of the components, without optional ones. Also fixes a memleak on the way, by making the functions which allocate the XkbFiles to free them, which is easier to get right. 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 0765064b 2012-07-13T18:34:11 Remove MERGE_ALT_FORM merge mode The mode comes from the "alternate" keyword, which is unused in xkeyboard-config and mostly undocumented. Its purpose is to allow to assign the same key name to multiple key codes, which is not allowed otherwise (and doesn't make much sense). The xkblib specification implies that this was part of the overlay functionality, which we also no longer support. If we do encounter this keyword, we just treat it as MERGE_DEFAULT. The keycodes.c code will detect a collision and will ignore all but the first key code (and the error count is not incremented). Some peripheral code is also removed as a result. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita dd85790c 2012-07-13T17:51:26 Move InitCanonicalKeyTypes to keytypes.c It's only got one call site and it's in keytypes.c, so move it there and make it static. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 0aaa84d8 2012-07-13T17:37:31 Remove xkb_kt_map_entry::active Takes the advice of acdad6058d52dc8a3e724dc95448300850d474f2 and removes this field, since its not used anymore now. 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>
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 b7c0737a 2012-07-13T14:40:14 compat: fix XkbSI_AllOf matching condition To quote the spec: XkbSI_AllOf All of the bits that are on in mods must be set, but others may be set as well. Here "mods" refers to interp->mods. This matches xserver/libX11. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 6e7d1678 2012-07-13T00:40:25 FindAutomaticType: Add FIXME It doesn't play well with multiple keysyms per level right now. But that's OK, because no-one really uses them. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 3640e14d 2012-07-13T00:39:34 Add multiple-keysyms-per-level to test data Make sure this keeps on working. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone a19abd26 2012-07-13T00:32:41 rulescomp: Fix benchmark runs We'd accidentally inverted silent vs. non-silent compilation, which would skew the benchmark pretty badly, but also forgot to change base to evdev for the rules here. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone a77e9a92 2012-07-13T00:12:57 tests: Update dump.data for recent fixes Makes the test pass again. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita f0599675 2012-07-11T16:16:20 dump: add back kccgst names Readd the component names to the keymap->names struct. This is used when printing the component, e.g. xkb_keymap { xkb_keycodes "evdev+aliases(qwerty)" { instead of xkb_keymap { xkb_keycodes { This makes diffing against xkbcomp $DISPLAY a bit easier and is kind of useful anyway. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 2ec0a22d 2012-07-13T00:10:23 Add Cyrillic and Greek to case-checking Evidently good to have on its own, but also fixes a regression from xkbcomp where we'd identify implicitly-typed Cyrillic keys as TWO_LEVEL rather than ALPHABETIC. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita fe5bfdf9 2012-07-11T16:35:43 dump: a few more tweaks to match xkbcomp output Only uppercase / lowercase stuff. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 9e505225 2012-07-12T19:28:52 symbols: fix bug in modifier_map handling The code used to match a keysym to a keycode (see added comment) differed in behavior from xkbcomp, always taking the first key it found. This caused some incorrect interpretation of the xkeyboard-config data, for example the one corrected in dump.data (see the diff): since the de-neo layout sets the both_capslock option, the Left Shift key (LFSH) has the Caps_Lock keysym in group 4 level 2; now since keycode(Left Shift) = 50 < keycode(Caps Lock) = 64 the Left Shift one was picked, instead of the Caps Lock one which is group 1 level 1. The correct behavior is to pick according to group, level, keycode. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita fedcf370 2012-07-12T17:54:09 dump: use KeyNameText instead of copying Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 62deaeb5 2012-07-12T14:42:31 Import dataset into test/data/ Use a self-contained dataset instead of relying on a globally-installed set. Data taken from xkeyboard-config 2.5.1. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
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>
Daniel Stone 059c1842 2012-07-12T12:02:19 Move test data files to test/data/keymaps Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone b10f924b 2012-07-03T21:22:09 Make BindIndicators static Since BindIndicators was only ever called immediately after CopyIndicatorMapDefs, move it up in the file and turn it into a static function, which avoids the need to ever pass the unbound LEDs around. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone d38d16e1 2012-07-03T21:17:11 Change BindIndicators return to void Since it could only ever return true, which avoids a totally unnecessary cleanup path. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 9116e02d 2012-07-03T21:15:28 Remove 'unboundRtrn' argument from BindIndicators It was only ever passed as NULL from its single callsite, so just remove it and be done with it. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone cfed7960 2012-07-03T21:13:11 Remove 'force' argument from BindIndicators It was always true in the one callsite, so just remove the other branches. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 1f492901 2012-07-11T18:00:31 Enlarge keysym name buffers and mention in comment The longest keysym is 27 chars long. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 01024259 2012-07-11T16:23:35 test/dump: output commentary to stderr Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita e4d4de8c 2012-07-11T21:37:59 symbols: fix bug in symbol merging When we merge two KeyInfo's (belonging to the same keycode), we may take a shortcut from copying if we see that the merged keys will be exactly like those in one of the two KeyInfo's. In the case where we take the symbols from the KeyInfo we are *not* merging into, we need to copy the three arrays: syms[group], symsMapNumEntries[group], symsMapIndex[group] The code currently only copies the first one, so if there's a merge conflict some levels may seem to disappear (i.e. have a NoSymbol keysym). This fixes the failing test added in c8d6bba. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 09d1445b 2012-07-11T14:12:12 keyseq: add a failing group-switching test For some reason, with the grp:alt_shift_toggle option, the following sequence switches a group: < Left Shift down, Left Alt down > While the reverse doesn't: < Left Alt down, Left Shift down > And it should. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 19f814f9 2012-07-11T14:08:28 rules: fix parsing of multiple options This was broken by commit 18d331b86b4942ba54fe087ca07e47c9383d768b (where only the first option out of a comma-separated string was matched). Do it correctly this time and add a test. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 8ff98487 2012-07-01T00:45:20 keymap: remove redundant check This is handled above in the LEGAL_FILE_TYPES check. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita e201c165 2012-06-30T00:07:09 state: fix base mod set/clear behavior This commit fixes the incorrect current behavior, where at the end of the following key sequence Left Shift down, Right Shift down, Left Shift up the Shift modifier is cleared. Clearly the code is not as nice as before, but it seems like some count of the depressed modifiers must be kept. The code is lifted mostly as is from xkbActions.c. [ There they also assign to setMods and clearMods each time and not OR it. I assume its correct, although I wouldn't have guessed... ] Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 13f030ba 2012-06-29T22:25:27 Tiny reformatting Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 37f43849 2012-06-30T00:49:41 rules: remove support for keymap rule This commit removes the ability to specify a keymap *in a rules file*, e.g. in /usr/share/X11/xkb/rules/evdev or somesuch. This is unused in xkeyboard-data, and the current code has never even supported it, because xkb_map_new_from_kccgst (which is no longer exposed in the API) checks to see that one of the usual components (e.g. symbols, types, ..) has been filled, while the rules parser, on the other hand, doesn't allow to specify a keymap and other stuff at the same time. ( The idea was to remove xkb_map_new_from_kccgst entirely, but it's used by a test so it can stay. ) tl;dr: dead code. Of course passing a keymap file to xkb_map_new_from_file still works. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 337c3007 2012-06-30T00:37:12 Remove _X_EXPORT from xkb_map_new_from_kccgst Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita ddb0ff9d 2012-06-29T19:26:01 xkbcomp: remove useless function XkbChooseMap compile_keymap can only be passes a single keymap file now, from all code paths leading to it. So this function doesn't do anything. The remaining check is performed inside CompileKeymap, so we can remove it as well; compile_keymap doesn't do much now. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 7111eb8e 2012-06-29T17:45:47 compat: move some unclear code where it belongs It seems like at some point it was needed to break the abstraction and perform this piece of code in the context above CompileCompatMap. The extra argument and the typedef look strange now, and doesn't seem to be needed any more, so move them back. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 213dcf68 2012-06-29T17:31:10 Use enum for merge mode The merge mode shows up in a lot of functions, so it's useful to give it a distinct type. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 48b4d30a 2012-06-29T17:05:33 Use enum for file types enums are nice for some type safety and readability. This one also removes the distinction between file type mask / file type index and some naming consistency. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 8f257397 2012-06-29T16:04:55 keymap: simplify legal/required logic a bit Now that we've consolidated on the keymap file type, this code only serves to confuse. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita f637d35a 2012-06-27T00:22:31 Use void* instead of old style char* in CommonInfo functions Removes some annoying casts. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 2cb6c35b 2012-06-22T16:08:05 Don't set explicit repeat masks when derived If we've only derived that a key should repeat, rather than had it explicitly specified, don't set the explicit member. Fixes the dump test. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone acdad605 2012-06-22T16:03:17 Don't ignore inactive type entries An entry for a type will only get marked as active if a virtual modifier can be directly mapped to it, and not if an action indirectly leads to it (e.g. LevelThree). We don't really need this test since entries which can never be triggered ... won't be triggered. The entire map->active thing should probably just go away. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 6d606d10 2012-06-22T15:29:47 state: Add more comprehensive repeating test Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 8e2c66e9 2012-06-22T15:27:05 Add xkb_key_repeats Does what it says on the box. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone fe89d031 2012-06-22T15:26:07 Work out a default repeat for all keys Our early exit in ApplyInterpsToKey meant we weren't hitting the code that's supposed to set a sensible default autorepeat value for most keys. 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 cd5a8274 2012-06-06T10:44:22 utils: remove unused recalloc and related macros Their use is superseded by darray everywhere now. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 955ed8c4 2012-06-06T10:38:45 state: use darray for filters For the darray we need to specify the explicit struct xkb_filter type instead of void*, so we move the definition of struct xkb_state into state.c thus making it opaque even from the rest of the files. It has enough getters to get going and is otherwise good style. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita a1f8440d 2012-06-06T10:01:43 symbols: use darray in struct xkb_sym_map Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 54bdfd05 2012-06-06T01:22:52 symbols: use darray for KeyInfo acts Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita ce9c18a7 2012-06-06T00:57:42 symbols: use darray for KeyInfo symsMapNumEntries Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 920cc270 2012-06-06T00:39:23 symbols: use darray for KeyInfo symsMapIndex Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita e82b9b14 2012-06-05T19:25:23 symbols: remove sizeSyms array from KeyInfo This information is kept inside the darray now. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 4237a204 2012-06-05T19:09:01 symbols: use darray for KeyInfo syms array The arrays found in KeyInfo are by far the most complicated, so this is taken one member at a time so as not to break anything. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 93ef2560 2012-06-08T09:54:08 Comment out unused fields in xkb_controls Until (if) we implement/use them the should take up any (mental) space. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita cb631c2d 2012-06-08T09:25:38 Unconstify a few string struct fields These were made const when the structs were exposed in the API. Now they are private and we shouldn't mess around with the UNCONSTIFY business. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita d0718e98 2012-06-05T17:48:08 test/dump: allow to run manually Without the srcdir envvar (and a couple trivial changes). 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>
Ran Benita 58b030bb 2012-05-20T20:39:35 Move XKB_KEY_NoSymbol to xkbcommon-keysyms.h This avoids a couple of special cases in the code, and is more consistent. Since anyone who includes xkbcommon.h also gets xkbcommon-keysyms.h, and anyone who include xkbcommon-keysyms.h would want NoSymbol anyway, there's no down side. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 1c27bb8e 2012-06-06T00:19:48 Update .gitignore Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita bc50cdd4 2012-06-05T18:46:24 darray: some changes for convenience - Make darray_free also initialize the array back to an empty state, and stop worrying about it everywhere. - Add darray_mem, to access the underlying memory, which we do manually now using &darray_item(arr, 0). This makes a bit more clear when we actually mean to take the address of a specific item. - Add darray_copy, to make a deep copy of a darray. - Add darray_same, to test whether two darrays have the same underlying memory (e.g. if the struct itself was value copied). This should used where previously two arrays were compared for pointer equality. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 57f184e2 2012-05-30T15:55:21 darray: tweak parameters a bit for better memory usage Here are some quick numbers from valgrind, running rulescomp only with a simple, common "us,de" rule set: before darray: cb047bb total heap usage: 44,924 allocs, 44,924 frees, 3,162,342 bytes allocated after darray: c87468e total heap usage: 52,670 allocs, 52,670 frees, 2,844,517 bytes allocated tweaking specific inital allocation sizes: total heap usage: 52,652 allocs, 52,652 frees, 2,841,814 bytes allocated changing initial alloc = 2 globally total heap usage: 47,802 allocs, 47,802 frees, 2,833,614 bytes allocated changing initial alloc = 3 globally total heap usage: 47,346 allocs, 47,346 frees, 3,307,110 bytes allocated changing initial alloc = 4 globally total heap usage: 44,643 allocs, 44,643 frees, 2,853,646 bytes allocated [ Changing the geometric progression constant from 2 only made things worse. I tried the golden ratio - not so golden :) ] The last one is obviously the best, so it was chosen, with the specific tweaks thrown in as well (these were there before but don't make much difference). Overall it seems to do better than the previous manual allocations which is a bit surprising. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 6992de40 2012-06-08T14:54:31 Add keypad sequences to UTF-8 keysym printing Signed-off-by: Daniel Stone <daniel@fooishbar.org>
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 77c909de 2012-06-04T16:16:20 Fix tiny memory leak in dump test We forgot to free the path we'd allocated with asprintf. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 2e009f69 2012-06-04T16:15:10 Avoid duplicating keysyms for merge if possible If we can merge cleanly (i.e. use the entirety of one entry rather than having to go level by level), then just reuse the existing symbols array and skip the entire merge process. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
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 e6ca6fc5 2012-06-04T14:04:04 Fix action= NoAction() printing Print it explicitly, rather than type=0x00, with all the private data too. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 0f09c307 2012-06-04T13:27:41 Make xkb_map_get_as_string test more comprehensive Add a test/dump.data file which contains the result we're expecting from xkb_map_get_as_string run on a particularly complex set of keymaps, and assert that the string representations are the same. This means that any updates to xkb_map_get_as_string will also need to update the test data, but should also ensure that we don't have any more parser regressions. Compared with diff to the output of setxkbmap + xkbcomp for the same keymap; seems completely solid. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 64c277d9 2012-06-04T13:08:01 Revert "dump" (Ahem.) This reverts commit f43f75fb83e94224000ebc6b0736182546781c5e.
Ran Benita dd1ae1e4 2012-05-23T21:24:50 Remove fake support for global group range settings A symbols file may contain a global, non key specific setting for the group out-of-range handling method (wrap, clamp, redirect). Only that: * Its parsed and kept in the SymbolsInfo, but is not otherwise used in any way (it's the same in the real xkbcomp). * It's not used in any of xkeyboard-config files. * It's not mentioned in the xkb specs (only the per-key ones). * It doesn't make much sense anyway. So remove the struct field, and emit an "unsupported, ignored" warning. We don't increment the error count because of it, just continue (the radio group warning just below is changed to do the same - there's no reason to possibly abort the entire thing for it). Signed-off-by: Ran Benita <ran234@gmail.com> Conflicts: src/xkbcomp/symbols.c
Daniel Stone 98b155c8 2012-06-04T13:01:33 Symbols: Don't include NoSymbols in the map Instead of using NoSymbol in the map, we use num_syms == 0 to signify the non-presence of a symbol. So instead of adding NoSymbol mappings to the list regardless, detect them and set num_syms == 0. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 28e66a70 2012-06-04T12:54:54 Fix multiple errors when merging symbol definitions We were getting the size calculation wrong, as well as inconsistently picking a merge strategy. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone f43f75fb 2012-06-02T15:29:21 dump
Daniel Stone f531d1e1 2012-06-02T15:25:36 keymap-dump: Print NoAction actions too The failure mode here is a little irritating: - server loads map with ISO_Lock action - server dumps keymap to string, including: interpret ISO_Lock+AnyOfOrAll(None) { action= NoAction(); }; as we don't (yet) print ISO_Lock actions - client parses keymap from string - client dumps keymap to string, including: interpret ISO_Lock+AnyOfOrAll(None) { }; - this results in a syntax error Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone c87468e9 2012-05-29T16:15:07 stringcomp: NULL-terminate string Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone a3ae0e84 2012-05-29T16:12:54 Pass merge down through indicator creation To avoid using potentially undefined memory. 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>
Daniel Stone 208d9578 2012-05-25T17:58:32 Fix signed vs. unsigned confusion in actions Some actions could also take relative rather than absolute parameters, so they really needed to be signed instead of explicitly unsigned. Oops. Fixes, e.g., action= MovePtr(x=-1,y=+1), which was reported as (x=+65535,y=+1). Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita ccc047c4 2012-05-22T18:00:56 compat: use darray for acts and key_acts in the server map Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 89c5e886 2012-05-22T15:45:42 keycodes: use darray in KeyNamesInfo Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 07c88b55 2012-05-22T15:20:47 symbols: use darray for xkb_sym_map Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 4daa34b5 2012-05-22T14:18:48 keytypes: use darray for level names Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita ee990d53 2012-05-22T14:00:16 symbols: use darray for KeyInfo Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita dcdbd149 2012-05-22T12:24:54 parser: use darray for keysym list Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita c65a3596 2012-05-22T10:59:46 keytypes: use darray for xkb_kt_map_entry's Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 374b0c98 2012-05-22T08:39:09 alloc: use darray in xkb_key_names Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita c2ac3a2b 2012-05-22T08:07:52 keytypes: use darray for key types in the client map Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 56150416 2012-05-22T00:52:28 compat: use darray for sym_interprets Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita d0288bb2 2012-05-22T00:37:53 context: use darray for include paths Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita ef51b572 2012-05-22T00:26:58 atom: use darray for the node_table Signed-off-by: Ran Benita <ran234@gmail.com>