summaryrefslogtreecommitdiff
path: root/src/context-priv.c
Commit message (Collapse)AuthorAgeFilesLines
* meson.build: always set the default variants/optionsPeter Hutterer2020-07-081-8/+0
| | | | | | | Make this more balanced with the rules/layouts so we can rely on that #define to exist. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* MSVC: Use <io.h> as an alternative for <unistd.h>Adrian Perez de Castro2019-12-281-1/+0
| | | | | | | | | Only the input/output functions from <unistd.h> options are used, so using <io.h> when building with MSVC should be enough. The inclusion of the header in context-priv.c does not seem to be needed (tested on GNU/Linux) and so it is removed. Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: include config.h manuallyRan Benita2019-12-271-0/+2
| | | | | | | | | 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>
* atom: combine atom_intern() and atom_lookup()Ran Benita2019-11-091-2/+2
| | | | | | Use an "add" bool parameter instead. This simplifies the code a bit. Signed-off-by: Ran Benita <ran@unusedvar.com>
* parser: get rid of "stealing" atomsRan Benita2019-11-081-7/+1
| | | | | | | | | This requires (well, at least implemented by) casting away `const` which is undefined behavior, and clang started to warn about it. The micro optimization didn't save too many allocations, anyway. Signed-off-by: Ran Benita <ran@unusedvar.com>
* context: add xkb_context_sanitize_rule_names()Ran Benita2014-02-101-5/+24
| | | | | | | We want all the default logic in a test, so encapsulate it in this function, and make all the get_default_* functions static. Signed-off-by: Ran Benita <ran234@gmail.com>
* context: fix wrong VARIANT instead of LAYOUT getenvRan Benita2014-02-101-1/+1
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Use secure_getenv when availableRan Benita2014-02-041-6/+6
| | | | | | | | | We probably don't want to get a privileged process to compile arbitrary keymaps. So we should be careful about the envvars which control include paths or default RMLVOs. But then secure_getenv is more sensible for everything we do. Signed-off-by: Ran Benita <ran234@gmail.com>
* context: split private functions to context-priv.cRan Benita2014-01-131-0/+171
(Same as keymap-priv.c). Signed-off-by: Ran Benita <ran234@gmail.com>