summaryrefslogtreecommitdiff
path: root/keytypes.c
diff options
context:
space:
mode:
Diffstat (limited to 'keytypes.c')
-rw-r--r--keytypes.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/keytypes.c b/keytypes.c
index 1c11ff8..a1db622 100644
--- a/keytypes.c
+++ b/keytypes.c
@@ -987,26 +987,24 @@ static int
HandleKeyTypeDef(KeyTypeDef * def,
XkbDescPtr xkb, unsigned merge, KeyTypesInfo * info)
{
- KeyTypeInfo type;
-
- if (def->merge != MergeDefault)
- merge = def->merge;
-
- type.defs.defined = 0;
- type.defs.fileID = info->fileID;
- type.defs.merge = merge;
- type.defs.next = NULL;
- type.dpy = info->dpy;
- type.name = def->name;
- type.mask = info->dflt.mask;
- type.vmask = info->dflt.vmask;
- type.groupInfo = info->dflt.groupInfo;
- type.numLevels = 1;
- type.nEntries = type.szEntries = 0;
- type.entries = NULL;
- type.szNames = 0;
- type.lvlNames = NULL;
- type.preserve = NULL;
+ KeyTypeInfo type = {
+ .defs.defined = 0,
+ .defs.fileID = info->fileID,
+ .defs.merge = (def->merge != MergeDefault) ? def->merge : merge,
+ .defs.next = NULL,
+ .dpy = info->dpy,
+ .name = def->name,
+ .mask = info->dflt.mask,
+ .vmask = info->dflt.vmask,
+ .groupInfo = info->dflt.groupInfo,
+ .numLevels = 1,
+ .nEntries = 0,
+ .szEntries = 0,
+ .entries = NULL,
+ .preserve = NULL,
+ .szNames = 0,
+ .lvlNames = NULL
+ };
/* Parse the actual content. */
if (!HandleKeyTypeBody(def->body, xkb, &type, info))
@@ -1132,10 +1130,12 @@ CopyDefToKeyType(XkbDescPtr xkb, XkbKeyTypePtr type, KeyTypeInfo * def)
pre = (PreserveInfo *) pre->defs.next)
{
XkbKTMapEntryPtr match;
- XkbKTMapEntryRec tmp;
- tmp.mods.real_mods = pre->indexMods;
- tmp.mods.vmods = pre->indexVMods;
- tmp.level = 0;
+ XkbKTMapEntryRec tmp = {
+ .mods.real_mods = pre->indexMods,
+ .mods.vmods = pre->indexVMods,
+ .level = 0
+ };
+
AddMapEntry(xkb, def, &tmp, False, False);
match = FindMatchingMapEntry(def, pre->indexMods, pre->indexVMods);
if (!match)