src/xkbcomp/keymap-dump.c


Log

Author Commit Date CI Message
Ran Benita 26453b84 2017-12-12T14:30:21 keymap: fix NULL dereference when dumping the default fallback type The default fallback type uses type->level_names = NULL but the keymap-dump code was not checking this case. Instead of adding more workarounds and possible bugs (e.g. previous commit), let's just keep the number of level names separately. This has the additional advantage retains extraneous level name if someone adds them for some reason. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 0dd610fb 2016-06-09T16:32:05 keymap-dump: use consistent order set/latch/lock (style) Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 725ae134 2014-09-25T22:01:17 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>
Ran Benita 68962aa1 2014-09-21T23:54:34 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>
Ran Benita 67d884ec 2014-06-01T15:24:10 Remove unnecessary !!(expressions) _Bool already does that. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 9014cf8c 2014-04-22T13:15:21 keymap, keycodes, compat: don't use darray for LEDs Use a static array of size XKB_MAX_LEDS instead, as in xkb_mod_set. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 6b1cdee1 2014-04-22T11:47:23 keymap: add and use xkb_mods_{foreach,enumerate}() To iterate over an xkb_mod_set. Slightly nicer interface and makes transitioning from darray easier. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 0f6bca2b 2014-04-22T11:33:47 keymap: rename xkb_foreach_key to xkb_keys_foreach We'll use the format xkb_foos_foreach and xkb_foos_enumerate for the various iterators. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita edc0aef5 2013-02-08T13:21:27 text: take xkb_mod_set instead of the entire keymap The modifier printing functions only need the modifier information, they don't care about keys or leds, etc. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita ca3170ad 2013-02-08T13:09:33 Add struct xkb_mod_set The only thing that the compilation phase needs the keymap for currently is for access to the modifier information (it also modifies it in place!). We want to only pass along the neccessary information, to make it more tractable and testable, so instead of passing the entire keymap we add a new 'mod_set' object and pass a (const) reference to that. The new object is just the old array of 'struct xkb_mod'. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 18191702 2014-02-16T10:59:42 keymap: change action flag NO_ACCEL -> ACCEL It's easier to deal with, but we need to set it as "factory default". Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita af261cb6 2014-02-16T10:22:32 action: fix SwitchScreen "same" field handling This used to *unset* a flag called "SwitchApplication"; we changed the flag to "same" but forgot to switch the cases. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 8d3db622 2014-02-15T23:50:21 keymap-dump: add missing support for NoLock and NoUnlock flags Based on a libxkbfile patch by Andreas Wettstein. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 11a9f76b 2014-02-15T23:27:23 keymap-dump: don't print "affect=lock" in PtrLock It's the same as no flags, so might as well not print it. (In fact it is slightly harmful, because it actively *clears* the affect flags, which might have been set in some other manner. But in practice this cannot happen). Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita be27b603 2014-02-15T23:13:21 keymap-dump: unbreak some complex lines It's very hard to read as-is. Apologies for those reading over a VT100. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 769b91c5 2014-02-08T15:30:05 Use (1u << idx) instead of (1 << idx) where appropriate It doesn't matter (I think), since the implicit conversion doesn't have any effect (e.g. sign-extension). But it's better to be aware of the type. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 623b10f8 2014-02-08T00:27:54 Fix sign-compare warnings Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita d2383d38 2013-08-01T20:44:46 keymap-dump: use correct format specifiers For keycodes, groups, levels, etc, which are unsigned. The really proper inttypes.h ones seem a bit much though. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 9ffe9dae 2013-07-21T09:48:12 keymap: don't use darray for sym_interprets We want xkb_keymap to be easy to handle everywhere. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 17a956d8 2013-05-09T14:47:09 Widen keycode range to 8/255 if possible (bug #63390) If the keycode range is smaller than 8 → 255, artifically widen it when dumping the keymap as not to displease X. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 57bfde3a 2013-03-04T18:41:13 keymap: rename xkb_kt_map_entry to xkb_key_type_entry That's a better name and fits more nicely. Also change type->map to type->entries. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita f8d3ec9f 2013-03-04T12:27:06 keymap: don't use darray for key aliases With a little tweak to the copy-to-keymap routine in keycodes.c we can use a normal array. 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>