Remove priv arguments from ExprResolveBoolean 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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
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");