vmod: ClearVModInfo doesn't need the keymap

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-08-28 11:14:54 +03:00
parent ab1566cd6b
commit b3aced7e22
3 changed files with 11 additions and 13 deletions

View File

@ -282,7 +282,7 @@ ClearCompatInfo(CompatInfo *info)
FreeActionInfo(info->act);
info->act = NULL;
info->keymap = NULL;
ClearVModInfo(&info->vmods, keymap);
ClearVModInfo(&info->vmods);
}
static SymInterpInfo *

View File

@ -25,27 +25,25 @@
********************************************************/
#include "xkbcomp-priv.h"
#include "text.h"
#include "expr.h"
#include "vmod.h"
void
InitVModInfo(VModInfo *info, struct xkb_keymap *keymap)
{
ClearVModInfo(info, keymap);
}
void
ClearVModInfo(VModInfo *info, struct xkb_keymap *keymap)
{
xkb_mod_index_t i;
xkb_mod_mask_t bit;
xkb_group_index_t i;
info->defined = info->available = 0;
for (i = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1)
for (i = 0; i < XkbNumVirtualMods; i++)
if (keymap->vmod_names[i])
info->defined |= bit;
info->defined |= (1 << i);
}
void
ClearVModInfo(VModInfo *info)
{
info->defined = info->available = 0;
}
/***====================================================================***/

View File

@ -36,7 +36,7 @@ void
InitVModInfo(VModInfo *info, struct xkb_keymap *keymap);
void
ClearVModInfo(VModInfo *info, struct xkb_keymap *keymap);
ClearVModInfo(VModInfo *info);
bool
HandleVModDef(VModDef *stmt, struct xkb_keymap *keymap,