diff options
Diffstat (limited to 'xorg-server/xkb')
-rw-r--r-- | xorg-server/xkb/xkbInit.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/xorg-server/xkb/xkbInit.c b/xorg-server/xkb/xkbInit.c index d3bcbc9f2..acabd8e7b 100644 --- a/xorg-server/xkb/xkbInit.c +++ b/xorg-server/xkb/xkbInit.c @@ -129,11 +129,11 @@ XkbFreeRMLVOSet(XkbRMLVOSet * rmlvo, Bool freeRMLVO) if (!rmlvo) return; - free((void *) rmlvo->rules); - free((void *) rmlvo->model); - free((void *) rmlvo->layout); - free((void *) rmlvo->variant); - free((void *) rmlvo->options); + free(rmlvo->rules); + free(rmlvo->model); + free(rmlvo->layout); + free(rmlvo->variant); + free(rmlvo->options); if (freeRMLVO) free(rmlvo); @@ -206,6 +206,21 @@ XkbWriteRulesProp(ClientPtr client, void *closure) return TRUE; } +void +XkbInitRules(XkbRMLVOSet *rmlvo, + const char *rules, + const char *model, + const char *layout, + const char *variant, + const char *options) +{ + rmlvo->rules = rules ? xnfstrdup(rules) : NULL; + rmlvo->model = model ? xnfstrdup(model) : NULL; + rmlvo->layout = layout ? xnfstrdup(layout) : NULL; + rmlvo->variant = variant ? xnfstrdup(variant) : NULL; + rmlvo->options = options ? xnfstrdup(options) : NULL; +} + static void XkbSetRulesUsed(XkbRMLVOSet * rmlvo) { |