ExprResult mod;
XkbcServerMapPtr srv;
XkbNamesPtr names;
- Atom stmtName;
srv = info->xkb->server;
names = info->xkb->names;
- stmtName = XkbcInternAtom(XkbcAtomGetString(stmt->name), False);
for (i = 0, bit = 1, nextFree = -1; i < XkbNumVirtualMods; i++, bit <<= 1)
{
if (info->defined & bit)
{
- if (names->vmods[i] == stmtName)
+ if (names->vmods[i] == stmt->name)
{ /* already defined */
info->available |= bit;
if (stmt->value == NULL)
info->defined |= (1 << nextFree);
info->newlyDefined |= (1 << nextFree);
info->available |= (1 << nextFree);
- names->vmods[nextFree] = stmtName;
+ names->vmods[nextFree] = stmt->name;
if (stmt->value == NULL)
return True;
if (ExprResolveModMask(stmt->value, &mod, NULL, NULL))
srv->vmods[nextFree] = mod.uval;
return True;
}
- ACTION("Declaration of %s ignored\n",
- XkbcAtomText(stmt->name));
+ ACTION("Declaration of %s ignored\n", XkbcAtomText(stmt->name));
return False;
}
LookupVModIndex(char * priv,
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
{
- register int i;
- register char *fieldStr;
- register char *modStr;
+ int i;
XkbcDescPtr xkb;
xkb = (XkbcDescPtr) priv;
{
return False;
}
- /* get the actual name */
- fieldStr = XkbcAtomGetString(field);
- if (fieldStr == NULL)
- return False;
/* For each named modifier, get the name and compare it to the one passed
* in. If we get a match, return the index of the modifier.
* The order of modifiers is the same as in the virtual_modifiers line in
*/
for (i = 0; i < XkbNumVirtualMods; i++)
{
- modStr = XkbcAtomGetString(xkb->names->vmods[i]);
- if ((modStr != NULL) && (uStrCaseCmp(fieldStr, modStr) == 0))
+ if (xkb->names->vmods[i] == field)
{
val_rtrn->uval = i;
return True;
names = info->xkb->names;
if (def->op == ExprIdent)
{
- register int i, bit;
+ int i, bit;
for (i = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1)
{
- char *str1, *str2;
- str1 = XkbcAtomGetString(names->vmods[i]);
- str2 = XkbcAtomGetString(def->value.str);
- if ((info->available & bit) && (uStrCaseCmp(str1, str2) == Equal))
+ if ((info->available & bit) && names->vmods[i] == def->value.str)
{
val_rtrn->uval = i;
return True;