Remove priv arguments from ExprResolveKeyName They've never been used. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index e2b8d40..cf8d852 100644
--- a/src/xkbcomp/action.c
+++ b/src/xkbcomp/action.c
@@ -1048,7 +1048,7 @@ HandleRedirectKey(struct xkb_desc * xkb,
switch (field)
{
case F_Keycode:
- if (!ExprResolveKeyName(value, &rtrn, NULL, NULL))
+ if (!ExprResolveKeyName(value, &rtrn))
return ReportMismatch(action->type, field, "key name");
tmp = KeyNameToLong(rtrn.keyName.name);
if (!FindNamedKey(xkb, tmp, &kc, True, CreateKeyNames(xkb), 0))
diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c
index f5b1129..df94824 100644
--- a/src/xkbcomp/expr.c
+++ b/src/xkbcomp/expr.c
@@ -761,12 +761,8 @@ ExprResolveString(ExprDef * expr,
int
ExprResolveKeyName(ExprDef * expr,
- ExprResult * val_rtrn,
- IdentLookupFunc lookup, char * lookupPriv)
+ ExprResult * val_rtrn)
{
- int ok = 0;
- ExprDef *left;
- ExprResult leftRtrn;
char *bogus = NULL;
switch (expr->op)
@@ -781,27 +777,14 @@ ExprResolveKeyName(ExprDef * expr,
memcpy(val_rtrn->keyName.name, expr->value.keyName, XkbKeyNameLength);
return True;
case ExprIdent:
- if (lookup)
- {
- ok = (*lookup) (lookupPriv,
- None, expr->value.str, TypeString, val_rtrn);
- }
- if (!ok)
- ERROR("Identifier \"%s\" of type string not found\n",
- XkbcAtomText(expr->value.str));
- return ok;
+ ERROR("Identifier \"%s\" of type string not found\n",
+ XkbcAtomText(expr->value.str));
+ return False;
case ExprFieldRef:
- if (lookup)
- {
- ok = (*lookup) (lookupPriv,
- expr->value.field.element,
- expr->value.field.field, TypeString, val_rtrn);
- }
- if (!ok)
- ERROR("Default \"%s.%s\" of type key name not found\n",
- XkbcAtomText(expr->value.field.element),
- XkbcAtomText(expr->value.field.field));
- return ok;
+ ERROR("Default \"%s.%s\" of type key name not found\n",
+ XkbcAtomText(expr->value.field.element),
+ XkbcAtomText(expr->value.field.field));
+ return False;
case OpAdd:
if (bogus == NULL)
bogus = "Addition";
@@ -826,18 +809,10 @@ ExprResolveKeyName(ExprDef * expr,
ERROR("%s of key name values not permitted\n", bogus);
return False;
case OpNot:
- left = expr->value.binary.left;
- if (ExprResolveString(left, &leftRtrn, lookup, lookupPriv))
- {
- ERROR("The ! operator cannot be applied to a key name\n");
- }
+ ERROR("The ! operator cannot be applied to a key name\n");
return False;
case OpUnaryPlus:
- left = expr->value.binary.left;
- if (ExprResolveString(left, &leftRtrn, lookup, lookupPriv))
- {
- ERROR("The + operator cannot be applied to a key name\n");
- }
+ ERROR("The + operator cannot be applied to a key name\n");
return False;
default:
WSGO("Unknown operator %d in ResolveKeyName\n", expr->op);
diff --git a/src/xkbcomp/expr.h b/src/xkbcomp/expr.h
index 782cf20..fabb0ec 100644
--- a/src/xkbcomp/expr.h
+++ b/src/xkbcomp/expr.h
@@ -127,9 +127,7 @@ extern int ExprResolveString(ExprDef * /* expr */ ,
);
extern int ExprResolveKeyName(ExprDef * /* expr */ ,
- ExprResult * /* val_rtrn */ ,
- IdentLookupFunc /* lookup */ ,
- char * /* lookupPriv */
+ ExprResult * /* val_rtrn */
);
extern int ExprResolveEnum(ExprDef * /* expr */ ,
diff --git a/src/xkbcomp/geometry.c b/src/xkbcomp/geometry.c
index bd3e5e6..f2eb5da 100644
--- a/src/xkbcomp/geometry.c
+++ b/src/xkbcomp/geometry.c
@@ -2078,7 +2078,7 @@ SetKeyField(KeyInfo * key,
info->errorCount++;
return ReportNotArray("key", field, keyText(key));
}
- if (!ExprResolveKeyName(value, &tmp, NULL, NULL))
+ if (!ExprResolveKeyName(value, &tmp))
{
info->errorCount++;
return ReportBadType("key", field, keyText(key), "key name");
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index 8c261fb..5934c3e 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -1272,7 +1272,7 @@ SetSymbolsField(KeyInfo * key,
ACTION("Ignored\n");
return False;
}
- ok = ExprResolveKeyName(value, &tmp, NULL, NULL);
+ ok = ExprResolveKeyName(value, &tmp);
if (!ok)
{
ERROR("Illegal overlay key specification for %s\n",