|
b4e81ca1
|
2022-12-16T01:26:25
|
|
context: add XKB_CONTEXT_NO_SECURE_GETENV flag (#312)
This flag is useful for clients that may have relatively benign capabilities
set, like CAP_SYS_NICE, that also want to use the xkb configuration from the
environment and user configs in XDG_CONFIG_HOME.
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/308
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/129
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
1915632e
|
2021-05-08T21:08:37
|
|
compose: add mapped locale to Compose-file-not-found error log
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
02b9cabf
|
2021-03-29T16:05:14
|
|
compose: use a ternary tree instead of a regular trie
Previously we used a simple trie with a linked list for each chain.
Unfortunately most compose files have very long chains which means the
constructions performs an almost quadratic number of comparisons.
Switch to using a ternary search tree instead. This is very similar to a
trie, only the linked list is essentially replaced with a binary tree.
On the en_US/Compose file, the perf diff is the following (the modified
function is `parse`):
Event 'cycles:u'
Baseline Delta Abs Shared Object Symbol
........ ......... ................ .................................
39.91% -17.62% bench-compose [.] parse.constprop.0
20.54% +6.47% bench-compose [.] lex
17.28% +5.55% libc-2.33.so [.] __strcmp_avx2
12.78% +4.01% bench-compose [.] xkb_keysym_from_name
2.30% +0.83% libc-2.33.so [.] __GI_____strtoull_l_internal
3.36% +0.78% bench-compose [.] strcmp@plt
Thanks to some careful packing, the memory usage is pretty much the
same.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
8b09e177
|
2021-03-30T20:12:08
|
|
compose: use anonymous union
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
ddd1188d
|
2020-07-17T01:09:47
|
|
Make path retrieval consistent in xkb_compose_table_new_from_locale()
|
|
17ad0df1
|
2020-07-16T12:06:49
|
|
compose: add xdg base directory support
Before reading ~/.XCompose, try to read $XDG_CONFIG_HOME/XCompose
(falling back to ~/.config/XCompose).
This helps unclutter the home directory of users who want that.
|
|
da4a90c1
|
2019-12-28T13:49:40
|
|
Open files in binary mode
This turns off some misfeatures on Windows, and does nothing on POSIX.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
40aab05e
|
2019-12-27T13:03:20
|
|
build: include config.h manually
Previously we included it with an `-include` compiler directive. But
that's not portable. And it's better to be explicit anyway.
Every .c file should have `include "config.h"` first thing.
Signed-off-by: Ran Benita <ran@unusedvar.com>
|
|
edc98b54
|
2014-09-12T18:44:30
|
|
compose: add xkbcommon-compose - implementation
Signed-off-by: Ran Benita <ran234@gmail.com>
|