No functional changes but we'll need that same lookup in the rules file
include handling in a future patch.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
return 0;
}
+const char *
+xkb_context_include_path_get_system_path(struct xkb_context *ctx)
+{
+ const char *root = secure_getenv("XKB_CONFIG_ROOT");
+ return root ? root : DFLT_XKB_CONFIG_ROOT;
+}
+
/**
* Append the default include directories to the context.
*/
}
}
- root = secure_getenv("XKB_CONFIG_ROOT");
- if (root != NULL)
- ret |= xkb_context_include_path_append(ctx, root);
- else
- ret |= xkb_context_include_path_append(ctx, DFLT_XKB_CONFIG_ROOT);
+ root = xkb_context_include_path_get_system_path(ctx);
+ ret |= xkb_context_include_path_append(ctx, root);
return ret;
}
xkb_context_failed_include_path_get(struct xkb_context *ctx,
unsigned int idx);
+const char *
+xkb_context_include_path_get_system_path(struct xkb_context *ctx);
+
/*
* Returns XKB_ATOM_NONE if @string was not previously interned,
* otherwise returns the atom.