diff options
author | Ran Benita <ran234@gmail.com> | 2013-03-04 18:41:13 +0200 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2013-03-18 22:20:06 +0000 |
commit | 57bfde3aff9b3a98f764a3bd3eeb924e299ae9b7 (patch) | |
tree | a9b29383fc9796bab92ba8e082c9eb5d1f29ee58 /src/xkbcomp | |
parent | 6a39a0657d868e62fe99b912c0201cf5986a12cc (diff) |
keymap: rename xkb_kt_map_entry to xkb_key_type_entry
That's a better name and fits more nicely.
Also change type->map to type->entries.
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/xkbcomp')
-rw-r--r-- | src/xkbcomp/keymap-dump.c | 2 | ||||
-rw-r--r-- | src/xkbcomp/keymap.c | 4 | ||||
-rw-r--r-- | src/xkbcomp/types.c | 22 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/xkbcomp/keymap-dump.c b/src/xkbcomp/keymap-dump.c index 5c57e17..034a8c1 100644 --- a/src/xkbcomp/keymap-dump.c +++ b/src/xkbcomp/keymap-dump.c @@ -202,7 +202,7 @@ write_types(struct xkb_keymap *keymap, struct buf *buf) for (unsigned j = 0; j < type->num_entries; j++) { const char *str; - const struct xkb_kt_map_entry *entry = &type->map[j]; + const struct xkb_key_type_entry *entry = &type->entries[j]; /* * Printing level 1 entries is redundant, it's the default, diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c index 6686948..5f4bfb6 100644 --- a/src/xkbcomp/keymap.c +++ b/src/xkbcomp/keymap.c @@ -201,8 +201,8 @@ UpdateDerivedKeymapFields(struct xkb_keymap *keymap) ComputeEffectiveMask(keymap, &keymap->types[i].mods); for (j = 0; j < keymap->types[i].num_entries; j++) { - ComputeEffectiveMask(keymap, &keymap->types[i].map[j].mods); - ComputeEffectiveMask(keymap, &keymap->types[i].map[j].preserve); + ComputeEffectiveMask(keymap, &keymap->types[i].entries[j].mods); + ComputeEffectiveMask(keymap, &keymap->types[i].entries[j].preserve); } } diff --git a/src/xkbcomp/types.c b/src/xkbcomp/types.c index 26eb3e7..1eb1b73 100644 --- a/src/xkbcomp/types.c +++ b/src/xkbcomp/types.c @@ -149,7 +149,7 @@ typedef struct { xkb_atom_t name; xkb_mod_mask_t mods; xkb_level_index_t num_levels; - darray(struct xkb_kt_map_entry) entries; + darray(struct xkb_key_type_entry) entries; darray(xkb_atom_t) level_names; } KeyTypeInfo; @@ -164,7 +164,7 @@ typedef struct { /***====================================================================***/ static inline const char * -MapEntryTxt(KeyTypesInfo *info, struct xkb_kt_map_entry *entry) +MapEntryTxt(KeyTypesInfo *info, struct xkb_key_type_entry *entry) { return ModMaskText(info->keymap, entry->mods.mods); } @@ -379,10 +379,10 @@ SetModifiers(KeyTypesInfo *info, KeyTypeInfo *type, ExprDef *arrayNdx, /***====================================================================***/ -static struct xkb_kt_map_entry * +static struct xkb_key_type_entry * FindMatchingMapEntry(KeyTypeInfo *type, xkb_mod_mask_t mods) { - struct xkb_kt_map_entry *entry; + struct xkb_key_type_entry *entry; darray_foreach(entry, type->entries) if (entry->mods.mods == mods) @@ -393,9 +393,9 @@ FindMatchingMapEntry(KeyTypeInfo *type, xkb_mod_mask_t mods) static bool AddMapEntry(KeyTypesInfo *info, KeyTypeInfo *type, - struct xkb_kt_map_entry *new, bool clobber, bool report) + struct xkb_key_type_entry *new, bool clobber, bool report) { - struct xkb_kt_map_entry *old; + struct xkb_key_type_entry *old; old = FindMatchingMapEntry(type, new->mods.mods); if (old) { @@ -435,7 +435,7 @@ static bool SetMapEntry(KeyTypesInfo *info, KeyTypeInfo *type, ExprDef *arrayNdx, ExprDef *value) { - struct xkb_kt_map_entry entry; + struct xkb_key_type_entry entry; if (arrayNdx == NULL) return ReportTypeShouldBeArray(info, type, "map entry"); @@ -471,8 +471,8 @@ static bool AddPreserve(KeyTypesInfo *info, KeyTypeInfo *type, xkb_mod_mask_t mods, xkb_mod_mask_t preserve_mods) { - struct xkb_kt_map_entry *entry; - struct xkb_kt_map_entry new; + struct xkb_key_type_entry *entry; + struct xkb_key_type_entry new; darray_foreach(entry, type->entries) { if (entry->mods.mods != mods) @@ -791,7 +791,7 @@ CopyKeyTypesToKeymap(struct xkb_keymap *keymap, KeyTypesInfo *info) type->mods.mods = 0; type->num_levels = 1; - type->map = NULL; + type->entries = NULL; type->num_entries = 0; type->name = xkb_atom_intern(keymap->ctx, "default"); type->level_names = NULL; @@ -805,7 +805,7 @@ CopyKeyTypesToKeymap(struct xkb_keymap *keymap, KeyTypesInfo *info) type->mods.mods = def->mods; type->num_levels = def->num_levels; - type->map = darray_mem(def->entries, 0); + type->entries = darray_mem(def->entries, 0); type->num_entries = darray_size(def->entries); darray_init(def->entries); type->name = def->name; |