Am 17.11.2016 03:39, schrieb Mihail Konev: > Signed-off-by: Mihail Konev <[email protected]> > BugLink: https://github.com/xkbcommon/libxkbcommon/issues/40 > --- > setxkbmap.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/setxkbmap.c b/setxkbmap.c > index cf0f02d6e704..f5b9f637a136 100644 > --- a/setxkbmap.c > +++ b/setxkbmap.c > @@ -50,6 +50,9 @@ > #ifndef DFLT_XKB_CONFIG_ROOT > #define DFLT_XKB_CONFIG_ROOT "/usr/share/X11/xkb" > #endif > +#ifndef DFLT_XKB_CONFIG_HOME > +#define DFLT_XKB_CONFIG_HOME ".xkb" > +#endif > #ifndef DFLT_XKB_RULES_FILE > #define DFLT_XKB_RULES_FILE "base" > #endif > @@ -394,6 +397,12 @@ parseArgs(int argc, char **argv) > > ok = True; > addToList(&inclPath, "."); > + { > + char *homepath = getenv("HOME"); > + char *home_incl_path = malloc(strlen(homepath) + 1 + > strlen(DFLT_XKB_CONFIG_HOME) + 1); > + sprintf(home_incl_path, "%s/%s", homepath, DFLT_XKB_CONFIG_HOME); > + addToList(&inclPath, home_incl_path); > + } > addToList(&inclPath, DFLT_XKB_CONFIG_ROOT); > for (i = 1; (i < argc) && ok; i++) > {
asprintf was added some time ago. re, wh _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
