diff options
Diffstat (limited to 'src/maprules.c')
-rw-r--r-- | src/maprules.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/maprules.c b/src/maprules.c index b6d773c..104dad3 100644 --- a/src/maprules.c +++ b/src/maprules.c @@ -449,8 +449,8 @@ Bool append = False; } if (*words == '\0') return False; - group->name = strdup(gname); - group->words = strdup(words); + group->name = _XkbDupString(gname); + group->words = _XkbDupString(words); for (i = 1, words = group->words; *words; words++) { if ( *words == ' ') { *words++ = '\0'; @@ -501,17 +501,17 @@ Bool append = False; rule->flags|= XkbRF_Append; else rule->flags|= XkbRF_Normal; - rule->model= strdup(tmp.name[MODEL]); - rule->layout= strdup(tmp.name[LAYOUT]); - rule->variant= strdup(tmp.name[VARIANT]); - rule->option= strdup(tmp.name[OPTION]); - - rule->keycodes= strdup(tmp.name[KEYCODES]); - rule->symbols= strdup(tmp.name[SYMBOLS]); - rule->types= strdup(tmp.name[TYPES]); - rule->compat= strdup(tmp.name[COMPAT]); - rule->geometry= strdup(tmp.name[GEOMETRY]); - rule->keymap= strdup(tmp.name[KEYMAP]); + rule->model= _XkbDupString(tmp.name[MODEL]); + rule->layout= _XkbDupString(tmp.name[LAYOUT]); + rule->variant= _XkbDupString(tmp.name[VARIANT]); + rule->option= _XkbDupString(tmp.name[OPTION]); + + rule->keycodes= _XkbDupString(tmp.name[KEYCODES]); + rule->symbols= _XkbDupString(tmp.name[SYMBOLS]); + rule->types= _XkbDupString(tmp.name[TYPES]); + rule->compat= _XkbDupString(tmp.name[COMPAT]); + rule->geometry= _XkbDupString(tmp.name[GEOMETRY]); + rule->keymap= _XkbDupString(tmp.name[KEYMAP]); rule->layout_num = rule->variant_num = 0; for (i = 0; i < nread; i++) { @@ -556,7 +556,7 @@ MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs) bzero((char *)mdefs,sizeof(XkbRF_MultiDefsRec)); mdefs->model = defs->model; - mdefs->options = strdup(defs->options); + mdefs->options = _XkbDupString(defs->options); if (mdefs->options) squeeze_spaces(mdefs->options); if (defs->layout) { @@ -565,7 +565,7 @@ MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs) } else { char *p; int i; - mdefs->layout[1] = strdup(defs->layout); + mdefs->layout[1] = _XkbDupString(defs->layout); if (mdefs->layout[1] == NULL) return False; squeeze_spaces(mdefs->layout[1]); @@ -589,7 +589,7 @@ MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs) } else { char *p; int i; - mdefs->variant[1] = strdup(defs->variant); + mdefs->variant[1] = _XkbDupString(defs->variant); if (mdefs->variant[1] == NULL) return False; squeeze_spaces(mdefs->variant[1]); @@ -625,7 +625,7 @@ Apply(char *src, char **dst) *dst= _Concat(*dst, src); } else { if (*dst == NULL) - *dst= strdup(src); + *dst= _XkbDupString(src); } } } @@ -1069,8 +1069,8 @@ XkbRF_AddVarDescCopy(XkbRF_DescribeVarsPtr vars,XkbRF_VarDescPtr from) XkbRF_VarDescPtr nd; if ((nd=XkbRF_AddVarDesc(vars))!=NULL) { - nd->name= strdup(from->name); - nd->desc= strdup(from->desc); + nd->name= _XkbDupString(from->name); + nd->desc= _XkbDupString(from->desc); } return nd; } @@ -1098,7 +1098,7 @@ XkbRF_AddVarToDescribe(XkbRF_RulesPtr rules,char *name) rules->extra= NULL; return NULL; } - rules->extra_names[rules->num_extra]= strdup(name); + rules->extra_names[rules->num_extra]= _XkbDupString(name); bzero(&rules->extra[rules->num_extra],sizeof(XkbRF_DescribeVarsRec)); return &rules->extra[rules->num_extra++]; } @@ -1389,30 +1389,30 @@ Status rtrn; out=(char*)data; end=out+nitems; if (out && (*out) && rf_rtrn) - *rf_rtrn= strdup(out); + *rf_rtrn= _XkbDupString(out); out+=strlen(out)+1; if (out<end) { if (*out) - vd_rtrn->model= strdup(out); + vd_rtrn->model= _XkbDupString(out); out+=strlen(out)+1; } if (out<end) { if (*out) - vd_rtrn->layout= strdup(out); + vd_rtrn->layout= _XkbDupString(out); out+=strlen(out)+1; } if (out<end) { if (*out) - vd_rtrn->variant= strdup(out); + vd_rtrn->variant= _XkbDupString(out); out+=strlen(out)+1; } if (out<end) { if (*out) - vd_rtrn->options= strdup(out); + vd_rtrn->options= _XkbDupString(out); out+=strlen(out)+1; } |