Remove priv arguments from ExprResolveKeyName
authorDaniel Stone <daniel@fooishbar.org>
Mon, 20 Feb 2012 14:08:55 +0000 (14:08 +0000)
committerDaniel Stone <daniel@fooishbar.org>
Mon, 20 Feb 2012 14:08:55 +0000 (14:08 +0000)
They've never been used.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
src/xkbcomp/action.c
src/xkbcomp/expr.c
src/xkbcomp/expr.h
src/xkbcomp/geometry.c
src/xkbcomp/symbols.c

index e2b8d40..cf8d852 100644 (file)
@@ -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))
index f5b1129..df94824 100644 (file)
@@ -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);
index 782cf20..fabb0ec 100644 (file)
@@ -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 */ ,
index bd3e5e6..f2eb5da 100644 (file)
@@ -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");
index 8c261fb..5934c3e 100644 (file)
@@ -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",