Hash :
7697c712
Author :
Date :
2024-09-16T16:09:11
rules: Resolve relative include statements using XKB paths Contrary to keymap files, the `! include` statement in rules does not lookup include paths added to `xkb_context`. So it is not possible e.g. to import another file in the same folder without using an absolute path. - Added path utils: `is_absolute(path)`. - Added XKB paths lookup to enable e.g. `! include evdev` to work. - Added test.
#ifndef UTILS_PATHS_H
#define UTILS_PATHS_H
#include <stdbool.h>
#ifdef _WIN32
#define PATH_SEPARATOR '\\'
#define ALT_PATH_SEPARATOR '/'
#define is_path_separator(s) \
((s) == PATH_SEPARATOR || (s) == ALT_PATH_SEPARATOR)
#else
#define PATH_SEPARATOR '/'
#define is_path_separator(s) ((s) == PATH_SEPARATOR)
#endif
bool
is_absolute(const char *path);
#endif