diff options
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkbInit.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index 22b971fc6..33420b6b6 100644 --- a/xkb/xkbInit.c +++ b/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) { |