int
ExprResolveFloat(ExprDef * expr,
- ExprResult * val_rtrn,
- IdentLookupFunc lookup, char * lookupPriv)
+ ExprResult * val_rtrn)
{
int ok = 0;
ExprResult leftRtrn, rightRtrn;
val_rtrn->ival *= XkbGeomPtsPerMM;
return True;
case ExprIdent:
- if (lookup)
- {
- ok = (*lookup) (lookupPriv,
- None, expr->value.str, TypeFloat, val_rtrn);
- }
- if (!ok)
- ERROR("Numeric identifier \"%s\" unknown\n",
- XkbcAtomText(expr->value.str));
+ ERROR("Numeric identifier \"%s\" unknown\n",
+ XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
- if (lookup)
- {
- ok = (*lookup) (lookupPriv,
- expr->value.field.element,
- expr->value.field.field, TypeFloat, val_rtrn);
- }
- if (!ok)
- ERROR("Numeric default \"%s.%s\" unknown\n",
- XkbcAtomText(expr->value.field.element),
- XkbcAtomText(expr->value.field.field));
+ ERROR("Numeric default \"%s.%s\" unknown\n",
+ XkbcAtomText(expr->value.field.element),
+ XkbcAtomText(expr->value.field.field));
return ok;
case OpAdd:
case OpSubtract:
case OpDivide:
left = expr->value.binary.left;
right = expr->value.binary.right;
- if (ExprResolveFloat(left, &leftRtrn, lookup, lookupPriv) &&
- ExprResolveFloat(right, &rightRtrn, lookup, lookupPriv))
+ if (ExprResolveFloat(left, &leftRtrn) &&
+ ExprResolveFloat(right, &rightRtrn))
{
switch (expr->op)
{
WSGO("Assignment operator not implemented yet\n");
break;
case OpNot:
- left = expr->value.child;
- if (ExprResolveFloat(left, &leftRtrn, lookup, lookupPriv))
- {
- ERROR("The ! operator cannot be applied to a number\n");
- }
+ ERROR("The ! operator cannot be applied to a number\n");
return False;
case OpInvert:
case OpNegate:
left = expr->value.child;
- if (ExprResolveFloat(left, &leftRtrn, lookup, lookupPriv))
+ if (ExprResolveFloat(left, &leftRtrn))
{
if (expr->op == OpNegate)
val_rtrn->ival = -leftRtrn.ival;
return False;
case OpUnaryPlus:
left = expr->value.child;
- return ExprResolveFloat(left, val_rtrn, lookup, lookupPriv);
+ return ExprResolveFloat(left, val_rtrn);
default:
WSGO("Unknown operator %d in ResolveFloat\n", expr->op);
break;
info->errorCount++;
return ReportNotArray("key shape", field, shText(si));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType("key shape", field, shText(si), "number");
info->errorCount++;
return ReportNotArray(typeName, field, ddText(di));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType(typeName, field, ddText(di), "number");
info->errorCount++;
return ReportNotArray(typeName, field, ddText(di));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType(typeName, field, ddText(di), "number");
info->errorCount++;
return ReportNotArray(typeName, field, ddText(di));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType(typeName, field, ddText(di), "number");
}
else
{
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType(typeName, field, ddText(di), "number");
info->errorCount++;
return ReportNotArray(typeName, field, ddText(di));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType(typeName, field, ddText(di), "number");
info->errorCount++;
return ReportNotArray(typeName, field, ddText(di));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType(typeName, field, ddText(di), "number");
info->errorCount++;
return ReportNotArray("doodad", field, ddText(di));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType("doodad", field, ddText(di), "number");
info->errorCount++;
return ReportNotArray("doodad", field, ddText(di));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType("doodad", field, ddText(di), "number");
info->errorCount++;
return ReportNotArray("keyboard section", field, scText(si));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
ReportBadType("keyboard section", field, scText(si), "number");
info->errorCount++;
return ReportNotArray("keyboard row", field, rowText(row));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType("keyboard row", field, rowText(row),
info->errorCount++;
return ReportNotArray("keyboard row", field, rowText(row));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType("keyboard row", field, rowText(row),
info->errorCount++;
return ReportNotArray("key", field, keyText(key));
}
- if (!ExprResolveFloat(value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(value, &tmp))
{
info->errorCount++;
return ReportBadType("key", field, keyText(key), "number");
info->errorCount++;
ret = ReportNotArray("keyboard", field.str, "geometry");
}
- else if (!ExprResolveFloat(stmt->value, &tmp, NULL, NULL))
+ else if (!ExprResolveFloat(stmt->value, &tmp))
{
info->errorCount++;
ret = ReportBadType("keyboard", field.str, "geometry", "number");
info->errorCount++;
ret = ReportNotArray("keyboard", field.str, "geometry");
}
- if (!ExprResolveFloat(stmt->value, &tmp, NULL, NULL))
+ if (!ExprResolveFloat(stmt->value, &tmp))
{
info->errorCount++;
ret = ReportBadType("keyboard", field.str, "geometry", "number");
info->errorCount++;
ret = ReportNotArray("keyboard", field.str, "geometry");
}
- else if (!ExprResolveFloat(stmt->value, &tmp, NULL, NULL))
+ else if (!ExprResolveFloat(stmt->value, &tmp))
{
info->errorCount++;
ret = ReportBadType("keyboard", field.str, "geometry", "number");