Commit 482d4faaa1a04cd6e905f53b1a10544ccc360754

Daniel Stone 2012-02-20T13:44:27

Remove priv arguments from ExprResolveBoolean They've never been used. Signed-off-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index 2688647..e2b8d40 100644
--- a/src/xkbcomp/action.c
+++ b/src/xkbcomp/action.c
@@ -353,7 +353,7 @@ CheckLatchLockFlags(unsigned action,
         tmp = XkbSA_LatchToLock;
     else
         return False;           /* WSGO! */
-    if (!ExprResolveBoolean(value, &result, NULL, NULL))
+    if (!ExprResolveBoolean(value, &result))
         return ReportMismatch(action, field, "boolean");
     if (result.uval)
         *flags_inout |= tmp;
@@ -618,7 +618,7 @@ HandleMovePtr(struct xkb_desc * xkb,
     }
     else if (field == F_Accel)
     {
-        if (!ExprResolveBoolean(value, &rtrn, NULL, NULL))
+        if (!ExprResolveBoolean(value, &rtrn))
             return ReportMismatch(action->type, field, "boolean");
         if (rtrn.uval)
             act->flags &= ~XkbSA_NoAcceleration;
@@ -871,7 +871,7 @@ HandleSwitchScreen(struct xkb_desc * xkb,
     {
         if (array_ndx != NULL)
             return ReportActionNotArray(action->type, field);
-        if (!ExprResolveBoolean(value, &rtrn, NULL, NULL))
+        if (!ExprResolveBoolean(value, &rtrn))
             return ReportMismatch(action->type, field, "boolean");
         if (rtrn.uval)
             act->flags &= ~XkbSA_SwitchApplication;
@@ -975,7 +975,7 @@ HandleActionMessage(struct xkb_desc * xkb,
     case F_GenKeyEvent:
         if (array_ndx != NULL)
             return ReportActionNotArray(action->type, field);
-        if (!ExprResolveBoolean(value, &rtrn, NULL, NULL))
+        if (!ExprResolveBoolean(value, &rtrn))
             return ReportMismatch(action->type, field, "boolean");
         if (rtrn.uval)
             act->flags |= XkbSA_MessageGenKeyEvent;
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index 155d267..1fb52ce 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -528,7 +528,7 @@ SetInterpField(SymInterpInfo * si,
     {
         if (arrayNdx != NULL)
             return ReportSINotArray(si, field, info);
-        ok = ExprResolveBoolean(value, &tmp, NULL, NULL);
+        ok = ExprResolveBoolean(value, &tmp);
         if (ok)
         {
             if (tmp.uval)
@@ -544,7 +544,7 @@ SetInterpField(SymInterpInfo * si,
     {
         if (arrayNdx != NULL)
             return ReportSINotArray(si, field, info);
-        ok = ExprResolveBoolean(value, &tmp, NULL, NULL);
+        ok = ExprResolveBoolean(value, &tmp);
         if (ok)
         {
             if (tmp.uval)
diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c
index 3fbbf37..f5b1129 100644
--- a/src/xkbcomp/expr.c
+++ b/src/xkbcomp/expr.c
@@ -291,8 +291,7 @@ ExprResolveVModMask(ExprDef * expr,
 
 int
 ExprResolveBoolean(ExprDef * expr,
-                   ExprResult * val_rtrn,
-                   IdentLookupFunc lookup, char * lookupPriv)
+                   ExprResult * val_rtrn)
 {
     int ok = 0;
     const char *bogus = NULL;
@@ -328,30 +327,17 @@ ExprResolveBoolean(ExprDef * expr,
                 return True;
             }
         }
-        if (lookup)
-        {
-            ok = (*lookup) (lookupPriv,
-                            None, expr->value.str, TypeBoolean, val_rtrn);
-        }
-        if (!ok)
-            ERROR("Identifier \"%s\" of type int is unknown\n",
-                   XkbcAtomText(expr->value.str));
-        return ok;
+        ERROR("Identifier \"%s\" of type int is unknown\n",
+              XkbcAtomText(expr->value.str));
+        return False;
     case ExprFieldRef:
-        if (lookup)
-        {
-            ok = (*lookup) (lookupPriv,
-                            expr->value.field.element,
-                            expr->value.field.field, TypeBoolean, val_rtrn);
-        }
-        if (!ok)
-            ERROR("Default \"%s.%s\" of type boolean is unknown\n",
-                   XkbcAtomText(expr->value.field.element),
-                   XkbcAtomText(expr->value.field.field));
-        return ok;
+        ERROR("Default \"%s.%s\" of type boolean is unknown\n",
+              XkbcAtomText(expr->value.field.element),
+              XkbcAtomText(expr->value.field.field));
+        return False;
     case OpInvert:
     case OpNot:
-        ok = ExprResolveBoolean(expr, val_rtrn, lookup, lookupPriv);
+        ok = ExprResolveBoolean(expr, val_rtrn);
         if (ok)
             val_rtrn->uval = !val_rtrn->uval;
         return ok;
diff --git a/src/xkbcomp/expr.h b/src/xkbcomp/expr.h
index b5e537b..782cf20 100644
--- a/src/xkbcomp/expr.h
+++ b/src/xkbcomp/expr.h
@@ -103,9 +103,7 @@ extern int ExprResolveVModMask(ExprDef * /* expr */ ,
     );
 
 extern int ExprResolveBoolean(ExprDef * /* expr */ ,
-                              ExprResult * /* val_rtrn */ ,
-                              IdentLookupFunc /* lookup */ ,
-                              char *  /* lookupPriv */
+                              ExprResult * /* val_rtrn */
     );
 
 extern int ExprResolveKeyCode(ExprDef * /* expr */ ,
diff --git a/src/xkbcomp/geometry.c b/src/xkbcomp/geometry.c
index b9386d9..bd3e5e6 100644
--- a/src/xkbcomp/geometry.c
+++ b/src/xkbcomp/geometry.c
@@ -1998,7 +1998,7 @@ SetRowField(RowInfo * row,
             info->errorCount++;
             return ReportNotArray("keyboard row", field, rowText(row));
         }
-        if (!ExprResolveBoolean(value, &tmp, NULL, NULL))
+        if (!ExprResolveBoolean(value, &tmp))
         {
             info->errorCount++;
             return ReportBadType("keyboard row", field, rowText(row),
diff --git a/src/xkbcomp/indicators.c b/src/xkbcomp/indicators.c
index eeb2692..d49a3bc 100644
--- a/src/xkbcomp/indicators.c
+++ b/src/xkbcomp/indicators.c
@@ -243,7 +243,7 @@ SetIndicatorMapField(LEDInfo * led,
     {
         if (arrayNdx != NULL)
             return ReportIndicatorNotArray(led, field);
-        if (!ExprResolveBoolean(value, &rtrn, NULL, NULL))
+        if (!ExprResolveBoolean(value, &rtrn))
             return ReportIndicatorBadType(led, field, "boolean");
         if (rtrn.uval)
             led->flags &= ~XkbIM_NoExplicit;
@@ -285,7 +285,7 @@ SetIndicatorMapField(LEDInfo * led,
     {
         if (arrayNdx != NULL)
             return ReportIndicatorNotArray(led, field);
-        if (!ExprResolveBoolean(value, &rtrn, NULL, NULL))
+        if (!ExprResolveBoolean(value, &rtrn))
             return ReportIndicatorBadType(led, field, "boolean");
         if (rtrn.uval)
             led->flags |= XkbIM_LEDDrivesKB;
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index df787d3..8c261fb 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -1077,7 +1077,7 @@ SetAllowNone(KeyInfo * key, ExprDef * arrayNdx, ExprDef * value)
         }
         radio_groups |= (1 << (tmp.uval - 1));
     }
-    if (!ExprResolveBoolean(value, &tmp, NULL, NULL))
+    if (!ExprResolveBoolean(value, &tmp))
     {
         ERROR("Illegal \"allow none\" value for %s\n",
                longText(key->name));
@@ -1309,7 +1309,7 @@ SetSymbolsField(KeyInfo * key,
     else if ((uStrCaseCmp(field, "groupswrap") == 0) ||
              (uStrCaseCmp(field, "wrapgroups") == 0))
     {
-        ok = ExprResolveBoolean(value, &tmp, NULL, NULL);
+        ok = ExprResolveBoolean(value, &tmp);
         if (!ok)
         {
             ERROR("Illegal groupsWrap setting for %s\n",
@@ -1326,7 +1326,7 @@ SetSymbolsField(KeyInfo * key,
     else if ((uStrCaseCmp(field, "groupsclamp") == 0) ||
              (uStrCaseCmp(field, "clampgroups") == 0))
     {
-        ok = ExprResolveBoolean(value, &tmp, NULL, NULL);
+        ok = ExprResolveBoolean(value, &tmp);
         if (!ok)
         {
             ERROR("Illegal groupsClamp setting for %s\n",
@@ -1434,7 +1434,7 @@ HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
              && ((uStrCaseCmp(field.str, "groupswrap") == 0)
                  || (uStrCaseCmp(field.str, "wrapgroups") == 0)))
     {
-        if (!ExprResolveBoolean(stmt->value, &tmp, NULL, NULL))
+        if (!ExprResolveBoolean(stmt->value, &tmp))
         {
             ERROR("Illegal setting for global groupsWrap\n");
             ACTION("Non-boolean value ignored\n");
@@ -1452,7 +1452,7 @@ HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
              && ((uStrCaseCmp(field.str, "groupsclamp") == 0)
                  || (uStrCaseCmp(field.str, "clampgroups") == 0)))
     {
-        if (!ExprResolveBoolean(stmt->value, &tmp, NULL, NULL))
+        if (!ExprResolveBoolean(stmt->value, &tmp))
         {
             ERROR("Illegal setting for global groupsClamp\n");
             ACTION("Non-boolean value ignored\n");