Use strcasecmp consistently instead of uStrCaseCmp

There's no use calling the same thing by a different name.

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-03-24 00:26:12 +02:00 committed by Daniel Stone
parent 3104a8ef18
commit f08ce9b71b
9 changed files with 87 additions and 88 deletions

View File

@ -47,7 +47,6 @@ recalloc(void *ptr, size_t old_size, size_t new_size);
#define uDupString(s) ((s) ? strdup(s) : NULL) #define uDupString(s) ((s) ? strdup(s) : NULL)
#define uStringText(s) ((s) == NULL ? "<NullString>" : (s)) #define uStringText(s) ((s) == NULL ? "<NullString>" : (s))
#define uStrCaseCmp(s1, s2) strcasecmp(s1, s2)
#define uStrCasePrefix(s1, s2) (strncasecmp((s1), (s2), strlen(s1)) == 0) #define uStrCasePrefix(s1, s2) (strncasecmp((s1), (s2), strlen(s1)) == 0)
/***====================================================================***/ /***====================================================================***/

View File

@ -132,7 +132,7 @@ stringToValue(const LookupEntry tab[], const char *string,
return False; return False;
for (entry = tab; entry->name != NULL; entry++) { for (entry = tab; entry->name != NULL; entry++) {
if (uStrCaseCmp(entry->name, string) == 0) { if (strcasecmp(entry->name, string) == 0) {
*value_rtrn = entry->result; *value_rtrn = entry->result;
return True; return True;
} }
@ -251,8 +251,8 @@ CheckModifierField(struct xkb_desc * xkb,
{ {
const char *valStr; const char *valStr;
valStr = XkbcAtomText(value->value.str); valStr = XkbcAtomText(value->value.str);
if (valStr && ((uStrCaseCmp(valStr, "usemodmapmods") == 0) || if (valStr && ((strcasecmp(valStr, "usemodmapmods") == 0) ||
(uStrCaseCmp(valStr, "modmapmods") == 0))) (strcasecmp(valStr, "modmapmods") == 0)))
{ {
*mods_rtrn = 0; *mods_rtrn = 0;
@ -1238,7 +1238,7 @@ SetActionField(struct xkb_desc * xkb,
WSGO("Couldn't allocate space for action default\n"); WSGO("Couldn't allocate space for action default\n");
return False; return False;
} }
if (uStrCaseCmp(elem, "action") == 0) if (strcasecmp(elem, "action") == 0)
new->action = XkbSA_NoAction; new->action = XkbSA_NoAction;
else else
{ {

View File

@ -304,15 +304,15 @@ ResolveStateAndPredicate(ExprDef * expr,
if (expr->op == ExprActionDecl) if (expr->op == ExprActionDecl)
{ {
const char *pred_txt = XkbcAtomText(expr->value.action.name); const char *pred_txt = XkbcAtomText(expr->value.action.name);
if (uStrCaseCmp(pred_txt, "noneof") == 0) if (strcasecmp(pred_txt, "noneof") == 0)
*pred_rtrn = XkbSI_NoneOf; *pred_rtrn = XkbSI_NoneOf;
else if (uStrCaseCmp(pred_txt, "anyofornone") == 0) else if (strcasecmp(pred_txt, "anyofornone") == 0)
*pred_rtrn = XkbSI_AnyOfOrNone; *pred_rtrn = XkbSI_AnyOfOrNone;
else if (uStrCaseCmp(pred_txt, "anyof") == 0) else if (strcasecmp(pred_txt, "anyof") == 0)
*pred_rtrn = XkbSI_AnyOf; *pred_rtrn = XkbSI_AnyOf;
else if (uStrCaseCmp(pred_txt, "allof") == 0) else if (strcasecmp(pred_txt, "allof") == 0)
*pred_rtrn = XkbSI_AllOf; *pred_rtrn = XkbSI_AllOf;
else if (uStrCaseCmp(pred_txt, "exactly") == 0) else if (strcasecmp(pred_txt, "exactly") == 0)
*pred_rtrn = XkbSI_Exactly; *pred_rtrn = XkbSI_Exactly;
else else
{ {
@ -325,7 +325,7 @@ ResolveStateAndPredicate(ExprDef * expr,
else if (expr->op == ExprIdent) else if (expr->op == ExprIdent)
{ {
const char *pred_txt = XkbcAtomText(expr->value.str); const char *pred_txt = XkbcAtomText(expr->value.str);
if ((pred_txt) && (uStrCaseCmp(pred_txt, "any") == 0)) if ((pred_txt) && (strcasecmp(pred_txt, "any") == 0))
{ {
*pred_rtrn = XkbSI_AnyOf; *pred_rtrn = XkbSI_AnyOf;
*mods_rtrn = 0xff; *mods_rtrn = 0xff;
@ -501,7 +501,7 @@ SetInterpField(SymInterpInfo * si,
int ok = 1; int ok = 1;
ExprResult tmp; ExprResult tmp;
if (uStrCaseCmp(field, "action") == 0) if (strcasecmp(field, "action") == 0)
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportSINotArray(si, field, info); return ReportSINotArray(si, field, info);
@ -510,8 +510,8 @@ SetInterpField(SymInterpInfo * si,
if (ok) if (ok)
si->defs.defined |= _SI_Action; si->defs.defined |= _SI_Action;
} }
else if ((uStrCaseCmp(field, "virtualmodifier") == 0) || else if ((strcasecmp(field, "virtualmodifier") == 0) ||
(uStrCaseCmp(field, "virtualmod") == 0)) (strcasecmp(field, "virtualmod") == 0))
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportSINotArray(si, field, info); return ReportSINotArray(si, field, info);
@ -524,7 +524,7 @@ SetInterpField(SymInterpInfo * si,
else else
return ReportSIBadType(si, field, "virtual modifier", info); return ReportSIBadType(si, field, "virtual modifier", info);
} }
else if (uStrCaseCmp(field, "repeat") == 0) else if (strcasecmp(field, "repeat") == 0)
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportSINotArray(si, field, info); return ReportSINotArray(si, field, info);
@ -540,7 +540,7 @@ SetInterpField(SymInterpInfo * si,
else else
return ReportSIBadType(si, field, "boolean", info); return ReportSIBadType(si, field, "boolean", info);
} }
else if (uStrCaseCmp(field, "locking") == 0) else if (strcasecmp(field, "locking") == 0)
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportSINotArray(si, field, info); return ReportSINotArray(si, field, info);
@ -556,8 +556,8 @@ SetInterpField(SymInterpInfo * si,
else else
return ReportSIBadType(si, field, "boolean", info); return ReportSIBadType(si, field, "boolean", info);
} }
else if ((uStrCaseCmp(field, "usemodmap") == 0) || else if ((strcasecmp(field, "usemodmap") == 0) ||
(uStrCaseCmp(field, "usemodmapmods") == 0)) (strcasecmp(field, "usemodmapmods") == 0))
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportSINotArray(si, field, info); return ReportSINotArray(si, field, info);
@ -589,10 +589,10 @@ HandleInterpVar(VarDef * stmt, struct xkb_desc * xkb, CompatInfo * info)
if (ExprResolveLhs(stmt->name, &elem, &field, &ndx) == 0) if (ExprResolveLhs(stmt->name, &elem, &field, &ndx) == 0)
ret = 0; /* internal error, already reported */ ret = 0; /* internal error, already reported */
else if (elem.str && (uStrCaseCmp(elem.str, "interpret") == 0)) else if (elem.str && (strcasecmp(elem.str, "interpret") == 0))
ret = SetInterpField(&info->dflt, xkb, field.str, ndx, stmt->value, ret = SetInterpField(&info->dflt, xkb, field.str, ndx, stmt->value,
info); info);
else if (elem.str && (uStrCaseCmp(elem.str, "indicator") == 0)) else if (elem.str && (strcasecmp(elem.str, "indicator") == 0))
ret = SetIndicatorMapField(&info->ledDflt, xkb, field.str, ndx, ret = SetIndicatorMapField(&info->ledDflt, xkb, field.str, ndx,
stmt->value); stmt->value);
else else

View File

@ -176,7 +176,7 @@ SimpleLookup(const void * priv, xkb_atom_t field, unsigned type,
str = XkbcAtomText(field); str = XkbcAtomText(field);
for (entry = priv; (entry != NULL) && (entry->name != NULL); entry++) for (entry = priv; (entry != NULL) && (entry->name != NULL); entry++)
{ {
if (uStrCaseCmp(str, entry->name) == 0) if (strcasecmp(str, entry->name) == 0)
{ {
val_rtrn->uval = entry->result; val_rtrn->uval = entry->result;
return True; return True;
@ -217,9 +217,9 @@ LookupModMask(const void * priv, xkb_atom_t field, unsigned type,
str = XkbcAtomText(field); str = XkbcAtomText(field);
if (str == NULL) if (str == NULL)
return False; return False;
if (uStrCaseCmp(str, "all") == 0) if (strcasecmp(str, "all") == 0)
val_rtrn->uval = 0xff; val_rtrn->uval = 0xff;
else if (uStrCaseCmp(str, "none") == 0) else if (strcasecmp(str, "none") == 0)
val_rtrn->uval = 0; val_rtrn->uval = 0;
else if (LookupModIndex(priv, field, type, val_rtrn)) else if (LookupModIndex(priv, field, type, val_rtrn))
val_rtrn->uval = (1 << val_rtrn->uval); val_rtrn->uval = (1 << val_rtrn->uval);
@ -251,16 +251,16 @@ ExprResolveBoolean(ExprDef * expr,
bogus = XkbcAtomText(expr->value.str); bogus = XkbcAtomText(expr->value.str);
if (bogus) if (bogus)
{ {
if ((uStrCaseCmp(bogus, "true") == 0) || if ((strcasecmp(bogus, "true") == 0) ||
(uStrCaseCmp(bogus, "yes") == 0) || (strcasecmp(bogus, "yes") == 0) ||
(uStrCaseCmp(bogus, "on") == 0)) (strcasecmp(bogus, "on") == 0))
{ {
val_rtrn->uval = 1; val_rtrn->uval = 1;
return True; return True;
} }
else if ((uStrCaseCmp(bogus, "false") == 0) || else if ((strcasecmp(bogus, "false") == 0) ||
(uStrCaseCmp(bogus, "no") == 0) || (strcasecmp(bogus, "no") == 0) ||
(uStrCaseCmp(bogus, "off") == 0)) (strcasecmp(bogus, "off") == 0))
{ {
val_rtrn->uval = 0; val_rtrn->uval = 0;
return True; return True;

View File

@ -205,8 +205,8 @@ SetIndicatorMapField(LEDInfo * led,
Bool ok; Bool ok;
ok = True; ok = True;
if ((uStrCaseCmp(field, "modifiers") == 0) if ((strcasecmp(field, "modifiers") == 0) ||
|| (uStrCaseCmp(field, "mods") == 0)) (strcasecmp(field, "mods") == 0))
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportIndicatorNotArray(led, field); return ReportIndicatorNotArray(led, field);
@ -216,7 +216,7 @@ SetIndicatorMapField(LEDInfo * led,
led->vmods = (rtrn.uval >> 8) & 0xff; led->vmods = (rtrn.uval >> 8) & 0xff;
led->defs.defined |= _LED_Mods; led->defs.defined |= _LED_Mods;
} }
else if (uStrCaseCmp(field, "groups") == 0) else if (strcasecmp(field, "groups") == 0)
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportIndicatorNotArray(led, field); return ReportIndicatorNotArray(led, field);
@ -225,8 +225,8 @@ SetIndicatorMapField(LEDInfo * led,
led->groups = rtrn.uval; led->groups = rtrn.uval;
led->defs.defined |= _LED_Groups; led->defs.defined |= _LED_Groups;
} }
else if ((uStrCaseCmp(field, "controls") == 0) || else if ((strcasecmp(field, "controls") == 0) ||
(uStrCaseCmp(field, "ctrls") == 0)) (strcasecmp(field, "ctrls") == 0))
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportIndicatorNotArray(led, field); return ReportIndicatorNotArray(led, field);
@ -236,7 +236,7 @@ SetIndicatorMapField(LEDInfo * led,
led->ctrls = rtrn.uval; led->ctrls = rtrn.uval;
led->defs.defined |= _LED_Ctrls; led->defs.defined |= _LED_Ctrls;
} }
else if (uStrCaseCmp(field, "allowexplicit") == 0) else if (strcasecmp(field, "allowexplicit") == 0)
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportIndicatorNotArray(led, field); return ReportIndicatorNotArray(led, field);
@ -248,8 +248,8 @@ SetIndicatorMapField(LEDInfo * led,
led->flags |= XkbIM_NoExplicit; led->flags |= XkbIM_NoExplicit;
led->defs.defined |= _LED_Explicit; led->defs.defined |= _LED_Explicit;
} }
else if ((uStrCaseCmp(field, "whichmodstate") == 0) || else if ((strcasecmp(field, "whichmodstate") == 0) ||
(uStrCaseCmp(field, "whichmodifierstate") == 0)) (strcasecmp(field, "whichmodifierstate") == 0))
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportIndicatorNotArray(led, field); return ReportIndicatorNotArray(led, field);
@ -260,7 +260,7 @@ SetIndicatorMapField(LEDInfo * led,
} }
led->which_mods = rtrn.uval; led->which_mods = rtrn.uval;
} }
else if (uStrCaseCmp(field, "whichgroupstate") == 0) else if (strcasecmp(field, "whichgroupstate") == 0)
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportIndicatorNotArray(led, field); return ReportIndicatorNotArray(led, field);
@ -271,12 +271,12 @@ SetIndicatorMapField(LEDInfo * led,
} }
led->which_groups = rtrn.uval; led->which_groups = rtrn.uval;
} }
else if ((uStrCaseCmp(field, "driveskbd") == 0) || else if ((strcasecmp(field, "driveskbd") == 0) ||
(uStrCaseCmp(field, "driveskeyboard") == 0) || (strcasecmp(field, "driveskeyboard") == 0) ||
(uStrCaseCmp(field, "leddriveskbd") == 0) || (strcasecmp(field, "leddriveskbd") == 0) ||
(uStrCaseCmp(field, "leddriveskeyboard") == 0) || (strcasecmp(field, "leddriveskeyboard") == 0) ||
(uStrCaseCmp(field, "indicatordriveskbd") == 0) || (strcasecmp(field, "indicatordriveskbd") == 0) ||
(uStrCaseCmp(field, "indicatordriveskeyboard") == 0)) (strcasecmp(field, "indicatordriveskeyboard") == 0))
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportIndicatorNotArray(led, field); return ReportIndicatorNotArray(led, field);
@ -288,7 +288,7 @@ SetIndicatorMapField(LEDInfo * led,
led->flags &= ~XkbIM_LEDDrivesKB; led->flags &= ~XkbIM_LEDDrivesKB;
led->defs.defined |= _LED_DrivesKbd; led->defs.defined |= _LED_DrivesKbd;
} }
else if (uStrCaseCmp(field, "index") == 0) else if (strcasecmp(field, "index") == 0)
{ {
if (arrayNdx != NULL) if (arrayNdx != NULL)
return ReportIndicatorNotArray(led, field); return ReportIndicatorNotArray(led, field);

View File

@ -676,9 +676,9 @@ HandleKeyNameVar(VarDef * stmt, KeyNamesInfo * info)
ACTION("Default for field %s ignored\n", field.str); ACTION("Default for field %s ignored\n", field.str);
goto err_out; goto err_out;
} }
if (uStrCaseCmp(field.str, "minimum") == 0) if (strcasecmp(field.str, "minimum") == 0)
which = MIN_KEYCODE_DEF; which = MIN_KEYCODE_DEF;
else if (uStrCaseCmp(field.str, "maximum") == 0) else if (strcasecmp(field.str, "maximum") == 0)
which = MAX_KEYCODE_DEF; which = MAX_KEYCODE_DEF;
else else
{ {

View File

@ -820,7 +820,7 @@ SetKeyTypeField(KeyTypeInfo * type,
{ {
ExprResult tmp; ExprResult tmp;
if (uStrCaseCmp(field, "modifiers") == 0) if (strcasecmp(field, "modifiers") == 0)
{ {
unsigned mods, vmods; unsigned mods, vmods;
if (arrayNdx != NULL) if (arrayNdx != NULL)
@ -850,18 +850,18 @@ SetKeyTypeField(KeyTypeInfo * type,
type->defs.defined |= _KT_Mask; type->defs.defined |= _KT_Mask;
return True; return True;
} }
else if (uStrCaseCmp(field, "map") == 0) else if (strcasecmp(field, "map") == 0)
{ {
type->defs.defined |= _KT_Map; type->defs.defined |= _KT_Map;
return SetMapEntry(type, xkb, arrayNdx, value); return SetMapEntry(type, xkb, arrayNdx, value);
} }
else if (uStrCaseCmp(field, "preserve") == 0) else if (strcasecmp(field, "preserve") == 0)
{ {
type->defs.defined |= _KT_Preserve; type->defs.defined |= _KT_Preserve;
return SetPreserve(type, xkb, arrayNdx, value); return SetPreserve(type, xkb, arrayNdx, value);
} }
else if ((uStrCaseCmp(field, "levelname") == 0) || else if ((strcasecmp(field, "levelname") == 0) ||
(uStrCaseCmp(field, "level_name") == 0)) (strcasecmp(field, "level_name") == 0))
{ {
type->defs.defined |= _KT_LevelNames; type->defs.defined |= _KT_LevelNames;
return SetLevelName(type, arrayNdx, value); return SetLevelName(type, arrayNdx, value);
@ -879,7 +879,7 @@ HandleKeyTypeVar(VarDef * stmt, struct xkb_desc * xkb, KeyTypesInfo * info)
if (!ExprResolveLhs(stmt->name, &elem, &field, &arrayNdx)) if (!ExprResolveLhs(stmt->name, &elem, &field, &arrayNdx))
return False; /* internal error, already reported */ return False; /* internal error, already reported */
if (elem.str && (uStrCaseCmp(elem.str, "type") == 0)) if (elem.str && (strcasecmp(elem.str, "type") == 0))
return SetKeyTypeField(&info->dflt, xkb, field.str, arrayNdx, return SetKeyTypeField(&info->dflt, xkb, field.str, arrayNdx,
stmt->value, info); stmt->value, info);
if (elem.str != NULL) if (elem.str != NULL)

View File

@ -437,14 +437,14 @@ LookupKeysym(char *str, xkb_keysym_t * sym_rtrn)
{ {
xkb_keysym_t sym; xkb_keysym_t sym;
if ((!str) || (uStrCaseCmp(str, "any") == 0) if ((!str) || (strcasecmp(str, "any") == 0) ||
|| (uStrCaseCmp(str, "nosymbol") == 0)) (strcasecmp(str, "nosymbol") == 0))
{ {
*sym_rtrn = NoSymbol; *sym_rtrn = NoSymbol;
return 1; return 1;
} }
else if ((uStrCaseCmp(str, "none") == 0) else if ((strcasecmp(str, "none") == 0) ||
|| (uStrCaseCmp(str, "voidsymbol") == 0)) (strcasecmp(str, "voidsymbol") == 0))
{ {
*sym_rtrn = XK_VoidSymbol; *sym_rtrn = XK_VoidSymbol;
return 1; return 1;

View File

@ -1033,7 +1033,7 @@ SetSymbolsField(KeyInfo * key,
Bool ok = True; Bool ok = True;
ExprResult tmp; ExprResult tmp;
if (uStrCaseCmp(field, "type") == 0) if (strcasecmp(field, "type") == 0)
{ {
ExprResult ndx; ExprResult ndx;
if ((!ExprResolveString(value, &tmp)) if ((!ExprResolveString(value, &tmp))
@ -1062,13 +1062,13 @@ SetSymbolsField(KeyInfo * key,
} }
free(tmp.str); free(tmp.str);
} }
else if (uStrCaseCmp(field, "symbols") == 0) else if (strcasecmp(field, "symbols") == 0)
return AddSymbolsToKey(key, xkb, field, arrayNdx, value, info); return AddSymbolsToKey(key, xkb, field, arrayNdx, value, info);
else if (uStrCaseCmp(field, "actions") == 0) else if (strcasecmp(field, "actions") == 0)
return AddActionsToKey(key, xkb, field, arrayNdx, value, info); return AddActionsToKey(key, xkb, field, arrayNdx, value, info);
else if ((uStrCaseCmp(field, "vmods") == 0) || else if ((strcasecmp(field, "vmods") == 0) ||
(uStrCaseCmp(field, "virtualmods") == 0) || (strcasecmp(field, "virtualmods") == 0) ||
(uStrCaseCmp(field, "virtualmodifiers") == 0)) (strcasecmp(field, "virtualmodifiers") == 0))
{ {
ok = ExprResolveVModMask(value, &tmp, xkb); ok = ExprResolveVModMask(value, &tmp, xkb);
if (ok) if (ok)
@ -1084,18 +1084,18 @@ SetSymbolsField(KeyInfo * key,
longText(key->name)); longText(key->name));
} }
} }
else if ((uStrCaseCmp(field, "locking") == 0) else if ((strcasecmp(field, "locking") == 0) ||
|| (uStrCaseCmp(field, "lock") == 0) (strcasecmp(field, "lock") == 0) ||
|| (uStrCaseCmp(field, "locks") == 0)) (strcasecmp(field, "locks") == 0))
{ {
ok = ExprResolveEnum(value, &tmp, lockingEntries); ok = ExprResolveEnum(value, &tmp, lockingEntries);
if (ok) if (ok)
key->behavior.type = tmp.uval; key->behavior.type = tmp.uval;
key->defs.defined |= _Key_Behavior; key->defs.defined |= _Key_Behavior;
} }
else if ((uStrCaseCmp(field, "radiogroup") == 0) || else if ((strcasecmp(field, "radiogroup") == 0) ||
(uStrCaseCmp(field, "permanentradiogroup") == 0) || (strcasecmp(field, "permanentradiogroup") == 0) ||
(uStrCaseCmp(field, "allownone") == 0)) (strcasecmp(field, "allownone") == 0))
{ {
ERROR("Radio groups not supported\n"); ERROR("Radio groups not supported\n");
ACTION("Ignoring radio group specification for key %s\n", longText(key->name)); ACTION("Ignoring radio group specification for key %s\n", longText(key->name));
@ -1107,9 +1107,9 @@ SetSymbolsField(KeyInfo * key,
ERROR("Overlays not supported\n"); ERROR("Overlays not supported\n");
ACTION("Ignoring overlay specification for key %s\n", longText(key->name)); ACTION("Ignoring overlay specification for key %s\n", longText(key->name));
} }
else if ((uStrCaseCmp(field, "repeating") == 0) || else if ((strcasecmp(field, "repeating") == 0) ||
(uStrCaseCmp(field, "repeats") == 0) || (strcasecmp(field, "repeats") == 0) ||
(uStrCaseCmp(field, "repeat") == 0)) (strcasecmp(field, "repeat") == 0))
{ {
ok = ExprResolveEnum(value, &tmp, repeatEntries); ok = ExprResolveEnum(value, &tmp, repeatEntries);
if (!ok) if (!ok)
@ -1122,8 +1122,8 @@ SetSymbolsField(KeyInfo * key,
key->repeat = tmp.uval; key->repeat = tmp.uval;
key->defs.defined |= _Key_Repeat; key->defs.defined |= _Key_Repeat;
} }
else if ((uStrCaseCmp(field, "groupswrap") == 0) || else if ((strcasecmp(field, "groupswrap") == 0) ||
(uStrCaseCmp(field, "wrapgroups") == 0)) (strcasecmp(field, "wrapgroups") == 0))
{ {
ok = ExprResolveBoolean(value, &tmp); ok = ExprResolveBoolean(value, &tmp);
if (!ok) if (!ok)
@ -1139,8 +1139,8 @@ SetSymbolsField(KeyInfo * key,
key->groupInfo = XkbClampIntoRange; key->groupInfo = XkbClampIntoRange;
key->defs.defined |= _Key_GroupInfo; key->defs.defined |= _Key_GroupInfo;
} }
else if ((uStrCaseCmp(field, "groupsclamp") == 0) || else if ((strcasecmp(field, "groupsclamp") == 0) ||
(uStrCaseCmp(field, "clampgroups") == 0)) (strcasecmp(field, "clampgroups") == 0))
{ {
ok = ExprResolveBoolean(value, &tmp); ok = ExprResolveBoolean(value, &tmp);
if (!ok) if (!ok)
@ -1156,8 +1156,8 @@ SetSymbolsField(KeyInfo * key,
key->groupInfo = XkbWrapIntoRange; key->groupInfo = XkbWrapIntoRange;
key->defs.defined |= _Key_GroupInfo; key->defs.defined |= _Key_GroupInfo;
} }
else if ((uStrCaseCmp(field, "groupsredirect") == 0) || else if ((strcasecmp(field, "groupsredirect") == 0) ||
(uStrCaseCmp(field, "redirectgroups") == 0)) (strcasecmp(field, "redirectgroups") == 0))
{ {
if (!ExprResolveGroup(value, &tmp)) if (!ExprResolveGroup(value, &tmp))
{ {
@ -1218,20 +1218,20 @@ HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
if (ExprResolveLhs(stmt->name, &elem, &field, &arrayNdx) == 0) if (ExprResolveLhs(stmt->name, &elem, &field, &arrayNdx) == 0)
return 0; /* internal error, already reported */ return 0; /* internal error, already reported */
if (elem.str && (uStrCaseCmp(elem.str, "key") == 0)) if (elem.str && (strcasecmp(elem.str, "key") == 0))
{ {
ret = SetSymbolsField(&info->dflt, xkb, field.str, arrayNdx, ret = SetSymbolsField(&info->dflt, xkb, field.str, arrayNdx,
stmt->value, info); stmt->value, info);
} }
else if ((elem.str == NULL) && ((uStrCaseCmp(field.str, "name") == 0) || else if ((elem.str == NULL) && ((strcasecmp(field.str, "name") == 0) ||
(uStrCaseCmp(field.str, "groupname") == (strcasecmp(field.str, "groupname") ==
0))) 0)))
{ {
ret = SetGroupName(info, arrayNdx, stmt->value); ret = SetGroupName(info, arrayNdx, stmt->value);
} }
else if ((elem.str == NULL) else if ((elem.str == NULL)
&& ((uStrCaseCmp(field.str, "groupswrap") == 0) && ((strcasecmp(field.str, "groupswrap") == 0) ||
|| (uStrCaseCmp(field.str, "wrapgroups") == 0))) (strcasecmp(field.str, "wrapgroups") == 0)))
{ {
if (!ExprResolveBoolean(stmt->value, &tmp)) if (!ExprResolveBoolean(stmt->value, &tmp))
{ {
@ -1248,8 +1248,8 @@ HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
} }
} }
else if ((elem.str == NULL) else if ((elem.str == NULL)
&& ((uStrCaseCmp(field.str, "groupsclamp") == 0) && ((strcasecmp(field.str, "groupsclamp") == 0) ||
|| (uStrCaseCmp(field.str, "clampgroups") == 0))) (strcasecmp(field.str, "clampgroups") == 0)))
{ {
if (!ExprResolveBoolean(stmt->value, &tmp)) if (!ExprResolveBoolean(stmt->value, &tmp))
{ {
@ -1266,8 +1266,8 @@ HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
} }
} }
else if ((elem.str == NULL) else if ((elem.str == NULL)
&& ((uStrCaseCmp(field.str, "groupsredirect") == 0) && ((strcasecmp(field.str, "groupsredirect") == 0) ||
|| (uStrCaseCmp(field.str, "redirectgroups") == 0))) (strcasecmp(field.str, "redirectgroups") == 0)))
{ {
if (!ExprResolveGroup(stmt->value, &tmp)) if (!ExprResolveGroup(stmt->value, &tmp))
{ {
@ -1281,7 +1281,7 @@ HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
ret = True; ret = True;
} }
} }
else if ((elem.str == NULL) && (uStrCaseCmp(field.str, "allownone") == 0)) else if ((elem.str == NULL) && (strcasecmp(field.str, "allownone") == 0))
{ {
ERROR("Radio groups not supported\n"); ERROR("Radio groups not supported\n");
ACTION("Ignoring \"allow none\" specification\n"); ACTION("Ignoring \"allow none\" specification\n");