static Bool
ReportMismatch(unsigned action, unsigned field, const char *type)
{
- ERROR2("Value of %s field must be of type %s\n", fieldText(field), type);
- ACTION1("Action %s definition ignored\n", XkbcActionTypeText(action));
+ ERROR("Value of %s field must be of type %s\n", fieldText(field), type);
+ ACTION("Action %s definition ignored\n", XkbcActionTypeText(action));
return False;
}
static Bool
ReportIllegal(unsigned action, unsigned field)
{
- ERROR2("Field %s is not defined for an action of type %s\n",
+ ERROR("Field %s is not defined for an action of type %s\n",
fieldText(field), XkbcActionTypeText(action));
ACTION("Action definition ignored\n");
return False;
static Bool
ReportActionNotArray(unsigned action, unsigned field)
{
- ERROR2("The %s field in the %s action is not an array\n",
+ ERROR("The %s field in the %s action is not an array\n",
fieldText(field), XkbcActionTypeText(action));
ACTION("Action definition ignored\n");
return False;
static Bool
ReportNotFound(unsigned action, unsigned field, const char *what, char *bad)
{
- ERROR2("%s named %s not found\n", what, bad);
- ACTION2("Ignoring the %s field of an %s action\n", fieldText(field),
+ ERROR("%s named %s not found\n", what, bad);
+ ACTION("Ignoring the %s field of an %s action\n", fieldText(field),
XkbcActionTypeText(action));
return False;
}
return ReportMismatch(action, F_Group, "integer (range 1..8)");
if ((rtrn.ival < 1) || (rtrn.ival > XkbNumKbdGroups))
{
- ERROR2("Illegal group %d (must be in the range 1..%d)\n", rtrn.ival,
+ ERROR("Illegal group %d (must be in the range 1..%d)\n", rtrn.ival,
XkbNumKbdGroups);
- ACTION1("Action %s definition ignored\n", XkbcActionTypeText(action));
+ ACTION("Action %s definition ignored\n", XkbcActionTypeText(action));
return False;
}
if (value->op == OpNegate)
if ((rtrn.ival < 0) || (rtrn.ival > 5))
{
ERROR("Button must specify default or be in the range 1..5\n");
- ACTION1("Illegal button value %d ignored\n", rtrn.ival);
+ ACTION("Illegal button value %d ignored\n", rtrn.ival);
return False;
}
act->button = rtrn.ival;
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("The count field must have a value in the range 0..255\n");
- ACTION1("Illegal count %d ignored\n", rtrn.ival);
+ ACTION("Illegal count %d ignored\n", rtrn.ival);
return False;
}
act->count = rtrn.ival;
if ((rtrn.ival < 0) || (rtrn.ival > 5))
{
ERROR("New default button value must be in the range 1..5\n");
- ACTION1("Illegal default button value %d ignored\n", rtrn.ival);
+ ACTION("Illegal default button value %d ignored\n", rtrn.ival);
return False;
}
if (rtrn.ival == 0)
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("Screen index must be in the range 1..255\n");
- ACTION1("Illegal screen value %d ignored\n", rtrn.ival);
+ ACTION("Illegal screen value %d ignored\n", rtrn.ival);
return False;
}
if (value->op == OpNegate)
if ((len < 1) || (len > 6))
{
WARN("An action message can hold only 6 bytes\n");
- ACTION1("Extra %d bytes ignored\n", len - 6);
+ ACTION("Extra %d bytes ignored\n", len - 6);
}
strncpy((char *) act->message, rtrn.str, 6);
}
if (ndx > 5)
{
ERROR("An action message is at most 6 bytes long\n");
- ACTION1("Attempt to use data[%d] ignored\n", ndx);
+ ACTION("Attempt to use data[%d] ignored\n", ndx);
return False;
}
if (!ExprResolveInteger(value, &rtrn, NULL, NULL))
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("Message data must be in the range 0..255\n");
- ACTION1("Illegal datum %d ignored\n", rtrn.ival);
+ ACTION("Illegal datum %d ignored\n", rtrn.ival);
return False;
}
act->message[ndx] = rtrn.uval;
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("Button must specify default or be in the range 1..255\n");
- ACTION1("Illegal button value %d ignored\n", rtrn.ival);
+ ACTION("Illegal button value %d ignored\n", rtrn.ival);
return False;
}
act->button = rtrn.ival;
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("The count field must have a value in the range 0..255\n");
- ACTION1("Illegal count %d ignored\n", rtrn.ival);
+ ACTION("Illegal count %d ignored\n", rtrn.ival);
return False;
}
act->count = rtrn.ival;
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("Device must specify default or be in the range 1..255\n");
- ACTION1("Illegal device value %d ignored\n", rtrn.ival);
+ ACTION("Illegal device value %d ignored\n", rtrn.ival);
return False;
}
act->device = rtrn.ival;
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("Private action type must be in the range 0..255\n");
- ACTION1("Illegal type %d ignored\n", rtrn.ival);
+ ACTION("Illegal type %d ignored\n", rtrn.ival);
return False;
}
action->type = rtrn.uval;
if ((len < 1) || (len > 7))
{
WARN("A private action has 7 data bytes\n");
- ACTION1("Extra %d bytes ignored\n", len - 6);
+ ACTION("Extra %d bytes ignored\n", len - 6);
return False;
}
strncpy((char *) action->data, rtrn.str, 7);
if (ndx > 6)
{
ERROR("The data for a private action is 7 bytes long\n");
- ACTION1("Attempt to use data[%d] ignored\n", ndx);
+ ACTION("Attempt to use data[%d] ignored\n", ndx);
return False;
}
if (!ExprResolveInteger(value, &rtrn, NULL, NULL))
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("All data for a private action must be 0..255\n");
- ACTION1("Illegal datum %d ignored\n", rtrn.ival);
+ ACTION("Illegal datum %d ignored\n", rtrn.ival);
return False;
}
action->data[ndx] = rtrn.uval;
if (def->op != ExprActionDecl)
{
- ERROR1("Expected an action definition, found %s\n",
+ ERROR("Expected an action definition, found %s\n",
exprOpText(def->op));
return False;
}
}
if (!stringToAction(str, &tmp))
{
- ERROR1("Unknown action %s\n", str);
+ ERROR("Unknown action %s\n", str);
return False;
}
action->type = hndlrType = tmp;
if (elemRtrn.str != NULL)
{
ERROR("Cannot change defaults in an action definition\n");
- ACTION2("Ignoring attempt to change %s.%s\n", elemRtrn.str,
+ ACTION("Ignoring attempt to change %s.%s\n", elemRtrn.str,
fieldRtrn.str);
return False;
}
if (!stringToField(fieldRtrn.str, &fieldNdx))
{
- ERROR1("Unknown field name %s\n", uStringText(fieldRtrn.str));
+ ERROR("Unknown field name %s\n", uStringText(fieldRtrn.str));
return False;
}
if (!(*handleAction[hndlrType])
return False;
if (new->action == XkbSA_NoAction)
{
- ERROR1("\"%s\" is not a valid field in a NoAction action\n",
+ ERROR("\"%s\" is not a valid field in a NoAction action\n",
field);
return False;
}
}
if (!stringToField(field, &new->field))
{
- ERROR1("\"%s\" is not a legal field name\n", field);
+ ERROR("\"%s\" is not a legal field name\n", field);
return False;
}
new->array_ndx = array_ndx;
if (((new->def.fileID == old->def.fileID) && (warningLevel > 0)) ||
(warningLevel > 9))
{
- WARN2("Alias of %s for %s declared more than once\n",
+ WARN("Alias of %s for %s declared more than once\n",
XkbcKeyNameText(new->alias), XkbcKeyNameText(new->real));
ACTION("First definition ignored\n");
}
if (((old->def.fileID == new->def.fileID) && (warningLevel > 0)) ||
(warningLevel > 9))
{
- WARN1("Multiple definitions for alias %s\n",
+ WARN("Multiple definitions for alias %s\n",
XkbcKeyNameText(old->alias));
- ACTION2("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
XkbcKeyNameText(use), XkbcKeyNameText(ignore));
}
if (use != old->real)
{
if (warningLevel > 4)
{
- WARN2("Attempt to alias %s to non-existent key %s\n",
+ WARN("Attempt to alias %s to non-existent key %s\n",
XkbcKeyNameText(info->alias), XkbcKeyNameText(info->real));
ACTION("Ignored\n");
}
if (warningLevel > 4)
{
WARN("Attempt to create alias with the name of a real key\n");
- ACTION2("Alias \"%s = %s\" ignored\n",
+ ACTION("Alias \"%s = %s\" ignored\n",
XkbcKeyNameText(info->alias),
XkbcKeyNameText(info->real));
}
#ifdef DEBUG
if ((a - old) != (nOld + nNew))
{
- WSGO2("Expected %d aliases total but created %d\n", nOld + nNew,
+ WSGO("Expected %d aliases total but created %d\n", nOld + nNew,
a - old);
}
#endif
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN1("Multiple definitions for \"%s\"\n", siText(new, info));
+ WARN("Multiple definitions for \"%s\"\n", siText(new, info));
ACTION("Earlier interpretation ignored\n");
}
*old = *new;
}
if (collide)
{
- WARN1("Multiple interpretations of \"%s\"\n", siText(new, info));
- ACTION1("Using %s definition for duplicate fields\n",
+ WARN("Multiple interpretations of \"%s\"\n", siText(new, info));
+ ACTION("Using %s definition for duplicate fields\n",
(new->defs.merge != MergeAugment ? "last" : "first"));
}
return True;
if (((gc->fileID == newGC->fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN1("Compat map for group %d redefined\n", group + 1);
- ACTION1("Using %s definition\n",
+ WARN("Compat map for group %d redefined\n", group + 1);
+ ACTION("Using %s definition\n",
(merge == MergeAugment ? "old" : "new"));
}
if (merge != MergeAugment)
*pred_rtrn = XkbSI_Exactly;
else
{
- ERROR1("Illegal modifier predicate \"%s\"\n", pred_txt);
+ ERROR("Illegal modifier predicate \"%s\"\n", pred_txt);
ACTION("Ignored\n");
return False;
}
merge = def->merge;
if (!XkbIsLegalGroup(def->group - 1))
{
- ERROR1("Keyboard group must be in the range 1..%d\n",
+ ERROR("Keyboard group must be in the range 1..%d\n",
XkbNumKbdGroups + 1);
- ACTION1("Compatibility map for illegal group %d ignored\n",
+ ACTION("Compatibility map for illegal group %d ignored\n",
def->group);
return False;
}
if (!ExprResolveModMask(def->def, &val, LookupVModMask, (char *) xkb))
{
ERROR("Expected a modifier mask in group compatibility definition\n");
- ACTION1("Ignoring illegal compatibility map for group %d\n",
+ ACTION("Ignoring illegal compatibility map for group %d\n",
def->group);
return False;
}
info->errorCount++;
break;
default:
- WSGO1("Unexpected statement type %d in HandleCompatMapFile\n",
+ WSGO("Unexpected statement type %d in HandleCompatMapFile\n",
stmt->stmtType);
break;
}
#ifdef NOISY
ERROR("Too many errors\n");
#endif
- ACTION1("Abandoning compatibility map \"%s\"\n", file->topName);
+ ACTION("Abandoning compatibility map \"%s\"\n", file->topName);
break;
}
}
else
{
WSGO("Couldn't allocate space for compat name\n");
- ACTION2("Name \"%s\" (from %s) NOT assigned\n",
+ ACTION("Name \"%s\" (from %s) NOT assigned\n",
scanFile, info.name);
}
}
*index_rtrn = expr->value.array.entry;
return True;
}
- WSGO1("Unexpected operator %d in ResolveLhs\n", expr->op);
+ WSGO("Unexpected operator %d in ResolveLhs\n", expr->op);
return False;
}
case ExprValue:
if (expr->type != TypeInt)
{
- ERROR1
+ ERROR
("Found constant of type %s where a modifier mask was expected\n",
exprTypeText(expr->type));
return False;
else if ((expr->value.ival >= XkbNumModifiers)
|| (expr->value.ival < 0))
{
- ERROR2("Illegal modifier index (%d, must be 0..%d)\n",
+ ERROR("Illegal modifier index (%d, must be 0..%d)\n",
expr->value.ival, XkbNumModifiers - 1);
return False;
}
None, expr->value.str, TypeInt, val_rtrn);
}
if (!ok)
- ERROR1("Cannot determine modifier index for \"%s\"\n",
+ ERROR("Cannot determine modifier index for \"%s\"\n",
XkbcAtomText(expr->value.str));
break;
case ExprFieldRef:
bogus = "assignment";
break;
default:
- WSGO1("Unknown operator %d in ResolveModIndex\n", expr->op);
+ WSGO("Unknown operator %d in ResolveModIndex\n", expr->op);
return False;
}
if (bogus)
{
- ERROR1("Modifier index must be a name or number, %s ignored\n",
+ ERROR("Modifier index must be a name or number, %s ignored\n",
bogus);
return False;
}
case ExprValue:
if (expr->type != TypeBoolean)
{
- ERROR1
+ ERROR
("Found constant of type %s where boolean was expected\n",
exprTypeText(expr->type));
return False;
None, expr->value.str, TypeBoolean, val_rtrn);
}
if (!ok)
- ERROR1("Identifier \"%s\" of type int is unknown\n",
+ ERROR("Identifier \"%s\" of type int is unknown\n",
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
expr->value.field.field, TypeBoolean, val_rtrn);
}
if (!ok)
- ERROR2("Default \"%s.%s\" of type boolean is unknown\n",
+ ERROR("Default \"%s.%s\" of type boolean is unknown\n",
XkbcAtomText(expr->value.field.element),
XkbcAtomText(expr->value.field.field));
return ok;
case OpNegate:
if (bogus == NULL)
bogus = "Negation";
- ERROR1("%s of boolean values not permitted\n", bogus);
+ ERROR("%s of boolean values not permitted\n", bogus);
break;
case OpUnaryPlus:
ERROR("Unary \"+\" operator not permitted for boolean values\n");
break;
default:
- WSGO1("Unknown operator %d in ResolveBoolean\n", expr->op);
+ WSGO("Unknown operator %d in ResolveBoolean\n", expr->op);
break;
}
return False;
}
if ((expr->type != TypeInt) && (expr->type != TypeFloat))
{
- ERROR1("Found constant of type %s, expected a number\n",
+ ERROR("Found constant of type %s, expected a number\n",
exprTypeText(expr->type));
return False;
}
None, expr->value.str, TypeFloat, val_rtrn);
}
if (!ok)
- ERROR1("Numeric identifier \"%s\" unknown\n",
+ ERROR("Numeric identifier \"%s\" unknown\n",
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
expr->value.field.field, TypeFloat, val_rtrn);
}
if (!ok)
- ERROR2("Numeric default \"%s.%s\" unknown\n",
+ ERROR("Numeric default \"%s.%s\" unknown\n",
XkbcAtomText(expr->value.field.element),
XkbcAtomText(expr->value.field.field));
return ok;
left = expr->value.child;
return ExprResolveFloat(left, val_rtrn, lookup, lookupPriv);
default:
- WSGO1("Unknown operator %d in ResolveFloat\n", expr->op);
+ WSGO("Unknown operator %d in ResolveFloat\n", expr->op);
break;
}
return False;
}
if ((expr->type != TypeInt) && (expr->type != TypeFloat))
{
- ERROR1
+ ERROR
("Found constant of type %s where an int was expected\n",
exprTypeText(expr->type));
return False;
None, expr->value.str, TypeInt, val_rtrn);
}
if (!ok)
- ERROR1("Identifier \"%s\" of type int is unknown\n",
+ ERROR("Identifier \"%s\" of type int is unknown\n",
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
expr->value.field.field, TypeInt, val_rtrn);
}
if (!ok)
- ERROR2("Default \"%s.%s\" of type int is unknown\n",
+ ERROR("Default \"%s.%s\" of type int is unknown\n",
XkbcAtomText(expr->value.field.element),
XkbcAtomText(expr->value.field.field));
return ok;
left = expr->value.child;
return ExprResolveInteger(left, val_rtrn, lookup, lookupPriv);
default:
- WSGO1("Unknown operator %d in ResolveInteger\n", expr->op);
+ WSGO("Unknown operator %d in ResolveInteger\n", expr->op);
break;
}
return False;
case ExprValue:
if (expr->type != TypeString)
{
- ERROR1("Found constant of type %s, expected a string\n",
+ ERROR("Found constant of type %s, expected a string\n",
exprTypeText(expr->type));
return False;
}
None, expr->value.str, TypeString, val_rtrn);
}
if (!ok)
- ERROR1("Identifier \"%s\" of type string not found\n",
+ ERROR("Identifier \"%s\" of type string not found\n",
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
expr->value.field.field, TypeString, val_rtrn);
}
if (!ok)
- ERROR2("Default \"%s.%s\" of type string not found\n",
+ ERROR("Default \"%s.%s\" of type string not found\n",
XkbcAtomText(expr->value.field.element),
XkbcAtomText(expr->value.field.field));
return ok;
case OpInvert:
if (bogus == NULL)
bogus = "Bitwise complement";
- ERROR1("%s of string values not permitted\n", bogus);
+ ERROR("%s of string values not permitted\n", bogus);
return False;
case OpNot:
left = expr->value.child;
}
return False;
default:
- WSGO1("Unknown operator %d in ResolveString\n", expr->op);
+ WSGO("Unknown operator %d in ResolveString\n", expr->op);
break;
}
return False;
case ExprValue:
if (expr->type != TypeKeyName)
{
- ERROR1("Found constant of type %s, expected a key name\n",
+ ERROR("Found constant of type %s, expected a key name\n",
exprTypeText(expr->type));
return False;
}
None, expr->value.str, TypeString, val_rtrn);
}
if (!ok)
- ERROR1("Identifier \"%s\" of type string not found\n",
+ ERROR("Identifier \"%s\" of type string not found\n",
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
expr->value.field.field, TypeString, val_rtrn);
}
if (!ok)
- ERROR2("Default \"%s.%s\" of type key name not found\n",
+ ERROR("Default \"%s.%s\" of type key name not found\n",
XkbcAtomText(expr->value.field.element),
XkbcAtomText(expr->value.field.field));
return ok;
case OpInvert:
if (bogus == NULL)
bogus = "Bitwise complement";
- ERROR1("%s of key name values not permitted\n", bogus);
+ ERROR("%s of key name values not permitted\n", bogus);
return False;
case OpNot:
left = expr->value.binary.left;
}
return False;
default:
- WSGO1("Unknown operator %d in ResolveKeyName\n", expr->op);
+ WSGO("Unknown operator %d in ResolveKeyName\n", expr->op);
break;
}
return False;
{
if (expr->op != ExprIdent)
{
- ERROR1("Found a %s where an enumerated value was expected\n",
+ ERROR("Found a %s where an enumerated value was expected\n",
exprOpText(expr->op));
return False;
}
(unsigned) TypeInt, val_rtrn))
{
int nOut = 0;
- ERROR1("Illegal identifier %s (expected one of: ",
+ ERROR("Illegal identifier %s (expected one of: ",
XkbcAtomText(expr->value.str));
while (values && values->name)
{
if (nOut != 0)
- INFO1(", %s", values->name);
+ INFO(", %s", values->name);
else
- INFO1("%s", values->name);
+ INFO("%s", values->name);
values++;
nOut++;
}
case ExprValue:
if (expr->type != TypeInt)
{
- ERROR1
+ ERROR
("Found constant of type %s where a mask was expected\n",
exprTypeText(expr->type));
return False;
None, expr->value.str, TypeInt, val_rtrn);
}
if (!ok)
- ERROR1("Identifier \"%s\" of type int is unknown\n",
+ ERROR("Identifier \"%s\" of type int is unknown\n",
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
expr->value.field.field, TypeInt, val_rtrn);
}
if (!ok)
- ERROR2("Default \"%s.%s\" of type int is unknown\n",
+ ERROR("Default \"%s.%s\" of type int is unknown\n",
XkbcAtomText(expr->value.field.element),
XkbcAtomText(expr->value.field.field));
return ok;
case ExprActionDecl:
if (bogus == NULL)
bogus = "function use";
- ERROR1("Unexpected %s in mask expression\n", bogus);
+ ERROR("Unexpected %s in mask expression\n", bogus);
ACTION("Expression ignored\n");
return False;
case OpAdd:
break;
case OpMultiply:
case OpDivide:
- ERROR1("Cannot %s masks\n",
+ ERROR("Cannot %s masks\n",
expr->op == OpDivide ? "divide" : "multiply");
ACTION("Illegal operation ignored\n");
return False;
left = expr->value.child;
if (ExprResolveInteger(left, &leftRtrn, lookup, lookupPriv))
{
- ERROR1("The %s operator cannot be used with a mask\n",
+ ERROR("The %s operator cannot be used with a mask\n",
(expr->op == OpNegate ? "-" : "!"));
}
return False;
default:
- WSGO1("Unknown operator %d in ResolveMask\n", expr->op);
+ WSGO("Unknown operator %d in ResolveMask\n", expr->op);
break;
}
return False;
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN1("Multiple definitions for the \"%s\" property\n",
+ WARN("Multiple definitions for the \"%s\" property\n",
new->name);
- ACTION2("Ignoring \"%s\", using \"%s\"\n", old->value,
+ ACTION("Ignoring \"%s\", using \"%s\"\n", old->value,
new->value);
}
if (old->value)
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN1("Multiple definitions for \"%s\" property\n", new->name);
- ACTION2("Using \"%s\", ignoring \"%s\" \n", old->value,
+ WARN("Multiple definitions for \"%s\" property\n", new->name);
+ ACTION("Using \"%s\", ignoring \"%s\" \n", old->value,
new->value);
}
return True;
if (type != NULL)
{
old = info->shapes;
- WARN3("Unknown shape \"%s\" for %s %s\n",
+ WARN("Unknown shape \"%s\" for %s %s\n",
XkbcAtomText(name), type, which);
if (old)
{
- ACTION1("Using default shape %s instead\n", shText(old));
+ ACTION("Using default shape %s instead\n", shText(old));
return old;
}
ACTION("No default shape; definition ignored\n");
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN1("Duplicate shape name \"%s\"\n", shText(old));
+ WARN("Duplicate shape name \"%s\"\n", shText(old));
ACTION("Using last definition\n");
}
*old = *new;
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN1("Multiple shapes named \"%s\"\n", shText(old));
+ WARN("Multiple shapes named \"%s\"\n", shText(old));
ACTION("Using first definition\n");
}
return True;
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN1("Multiple doodads named \"%s\"\n",
+ WARN("Multiple doodads named \"%s\"\n",
XkbcAtomText(old->name));
ACTION("Using last definition\n");
}
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN1("Multiple doodads named \"%s\"\n",
+ WARN("Multiple doodads named \"%s\"\n",
XkbcAtomText(old->name));
ACTION("Using first definition\n");
}
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN2
+ WARN
("Multiple overlays named \"%s\" for section \"%s\"\n",
XkbcAtomText(old->name), XkbcAtomText(si->name));
ACTION("Using last definition\n");
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN2("Multiple doodads named \"%s\" in section \"%s\"\n",
+ WARN("Multiple doodads named \"%s\" in section \"%s\"\n",
XkbcAtomText(old->name), XkbcAtomText(si->name));
ACTION("Using first definition\n");
}
if (warningLevel > 0)
{
WSGO("Couldn't allocate a new OverlayInfo\n");
- ACTION2
+ ACTION
("Overlay \"%s\" in section \"%s\" will be incomplete\n",
XkbcAtomText(old->name), XkbcAtomText(si->name));
}
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN1("Duplicate shape name \"%s\"\n", shText(old));
+ WARN("Duplicate shape name \"%s\"\n", shText(old));
ACTION("Using last definition\n");
}
*old = *new;
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN1("Multiple shapes named \"%s\"\n", shText(old));
+ WARN("Multiple shapes named \"%s\"\n", shText(old));
ACTION("Using first definition\n");
}
return True;
if ((tmp.ival < 0) || (tmp.ival > XkbGeomMaxPriority))
{
info->errorCount++;
- ERROR2("Doodad priority %d out of range (must be 0..%d)\n",
+ ERROR("Doodad priority %d out of range (must be 0..%d)\n",
tmp.ival, XkbGeomMaxPriority);
- ACTION1("Priority for doodad %s not changed", ddText(di));
+ ACTION("Priority for doodad %s not changed", ddText(di));
return False;
}
di->defs.defined |= _GD_Priority;
case XkbLogoDoodad:
return SetLogoDoodadField(di, field, arrayNdx, value, si, info);
}
- WSGO1("Unknown doodad type %d in SetDoodadField\n",
+ WSGO("Unknown doodad type %d in SetDoodadField\n",
(unsigned int) di->type);
- ACTION2("Definition of %s in %s ignored\n", field, ddText(di));
+ ACTION("Definition of %s in %s ignored\n", field, ddText(di));
return False;
}
if ((tmp.ival < 0) || (tmp.ival > XkbGeomMaxPriority))
{
info->errorCount++;
- ERROR2("Section priority %d out of range (must be 0..%d)\n",
+ ERROR("Section priority %d out of range (must be 0..%d)\n",
tmp.ival, XkbGeomMaxPriority);
- ACTION1("Priority for section %s not changed", scText(si));
+ ACTION("Priority for section %s not changed", scText(si));
return False;
}
si->priority = tmp.ival;
{
info->errorCount++;
ERROR("Property values must be type string\n");
- ACTION1("Ignoring illegal definition of \"%s\" property\n", property);
+ ACTION("Ignoring illegal definition of \"%s\" property\n", property);
return False;
}
pi.value = result.str;
if (ndx != NULL)
{
info->errorCount++;
- ERROR1("The %s geometry property is not an array\n", field.str);
+ ERROR("The %s geometry property is not an array\n", field.str);
ACTION("Ignoring illegal property definition\n");
return False;
}
if (elem.str)
{
WARN("Assignment to field of unknown element\n");
- ACTION2("No value assigned to %s.%s\n", elem.str, field.str);
+ ACTION("No value assigned to %s.%s\n", elem.str, field.str);
return False;
}
if (tmp.ival < 1)
{
WARN("Keyboard width must be positive\n");
- ACTION1("Ignoring illegal keyboard width %s\n",
+ ACTION("Ignoring illegal keyboard width %s\n",
XkbcGeomFPText(tmp.ival));
return True;
}
if (info->widthMM != 0)
{
WARN("Keyboard width multiply defined\n");
- ACTION1("Using last definition (%s),", XkbcGeomFPText(tmp.ival));
- INFO1(" ignoring first (%s)\n", XkbcGeomFPText(info->widthMM));
+ ACTION("Using last definition (%s),", XkbcGeomFPText(tmp.ival));
+ INFO(" ignoring first (%s)\n", XkbcGeomFPText(info->widthMM));
}
info->widthMM = tmp.ival;
return True;
if (tmp.ival < 1)
{
WARN("Keyboard height must be positive\n");
- ACTION1("Ignoring illegal keyboard height %s\n",
+ ACTION("Ignoring illegal keyboard height %s\n",
XkbcGeomFPText(tmp.ival));
return True;
}
if (info->heightMM != 0)
{
WARN("Keyboard height multiply defined\n");
- ACTION1("Using last definition (%s),", XkbcGeomFPText(tmp.ival));
- INFO1(" ignoring first (%s)\n", XkbcGeomFPText(info->heightMM));
+ ACTION("Using last definition (%s),", XkbcGeomFPText(tmp.ival));
+ INFO(" ignoring first (%s)\n", XkbcGeomFPText(info->heightMM));
}
info->heightMM = tmp.ival;
return True;
if ((tmp.ival < 40) || (tmp.ival > 2550))
{
info->errorCount++;
- ERROR1("Illegal font size %d (must be 4..255)\n", tmp.ival);
+ ERROR("Illegal font size %d (must be 4..255)\n", tmp.ival);
ACTION("Ignoring font size in keyboard geometry\n");
return False;
}
if (def->nOutlines < 1)
{
- WARN1("Shape \"%s\" has no outlines\n", shText(si));
+ WARN("Shape \"%s\" has no outlines\n", shText(si));
ACTION("Definition ignored\n");
return True;
}
si->outlines = uTypedCalloc(def->nOutlines, XkbOutlineRec);
if (!si->outlines)
{
- ERROR1("Couldn't allocate outlines for \"%s\"\n", shText(si));
+ ERROR("Couldn't allocate outlines for \"%s\"\n", shText(si));
ACTION("Definition ignored\n");
info->errorCount++;
return False;
outline->points = uTypedCalloc(ol->nPoints, XkbPointRec);
if (!outline->points)
{
- ERROR1("Can't allocate points for \"%s\"\n", shText(si));
+ ERROR("Can't allocate points for \"%s\"\n", shText(si));
ACTION("Definition ignored\n");
info->errorCount++;
return False;
si->approx = outline;
else
{
- WARN1("Multiple approximations for \"%s\"\n",
+ WARN("Multiple approximations for \"%s\"\n",
shText(si));
ACTION("Treating all but the first as normal outlines\n");
}
si->primary = outline;
else
{
- WARN1("Multiple primary outlines for \"%s\"\n",
+ WARN("Multiple primary outlines for \"%s\"\n",
shText(si));
ACTION("Treating all but the first as normal outlines\n");
}
}
else
{
- WARN2("Unknown outline type %s for \"%s\"\n", str,
+ WARN("Unknown outline type %s for \"%s\"\n", str,
shText(si));
ACTION("Treated as a normal outline\n");
}
}
if (nOut != si->nOutlines)
{
- WSGO2("Expected %d outlines, got %d\n",
+ WSGO("Expected %d outlines, got %d\n",
(unsigned int) si->nOutlines, nOut);
si->nOutlines = nOut;
}
return 0; /* internal error, already reported */
if (elem.str != NULL)
{
- WARN1("Assignment to field of unknown element in doodad %s\n",
+ WARN("Assignment to field of unknown element in doodad %s\n",
ddText(&new));
- ACTION2("No value assigned to %s.%s\n", elem.str, field.str);
+ ACTION("No value assigned to %s.%s\n", elem.str, field.str);
}
else if (!SetDoodadField(&new, field.str, ndx, var->value, si, info))
return False;
if ((def->nKeys < 1) && (warningLevel > 3))
{
- WARN2("Overlay \"%s\" in section \"%s\" has no keys\n",
+ WARN("Overlay \"%s\" in section \"%s\" has no keys\n",
XkbcAtomText(def->name), scText(si));
ACTION("Overlay ignored\n");
return True;
if ((!key) && warningLevel > 0)
{
WSGO("Couldn't allocate OverlayKeyInfo\n");
- ACTION2("Overlay %s for section %s will be incomplete\n",
+ ACTION("Overlay %s for section %s will be incomplete\n",
XkbcAtomText(ol.name), scText(si));
return False;
}
else
{
ERROR("Illegal element used in a key definition\n");
- ACTION2("Assignment to %s.%s ignored\n", elem.str, f.str);
+ ACTION("Assignment to %s.%s ignored\n", elem.str, f.str);
return False;
}
}
break;
default:
ERROR("Cannot determine field for unnamed expression\n");
- ACTION3("Ignoring key %d in row %d of section %s\n",
+ ACTION("Ignoring key %d in row %d of section %s\n",
row->nKeys + 1, row->section->nRows + 1,
rowText(row));
return False;
if ((def->nKeys < 1) && (warningLevel > 3))
{
- ERROR1("Row in section %s has no keys\n", rowText(row));
+ ERROR("Row in section %s has no keys\n", rowText(row));
ACTION("Section ignored\n");
return True;
}
else
{
WARN("Assignment to field of unknown element in row\n");
- ACTION2("No value assigned to %s.%s\n", elem.str, field.str);
+ ACTION("No value assigned to %s.%s\n", elem.str, field.str);
}
}
else if (keyDef->common.stmtType == StmtKeyDef)
int len = strlen(keyDef->name);
if ((len < 1) || (len > XkbKeyNameLength))
{
- ERROR2("Illegal name %s for key in section %s\n",
+ ERROR("Illegal name %s for key in section %s\n",
keyDef->name, rowText(row));
ACTION("Section not compiled\n");
return False;
}
else
{
- WSGO1("Unexpected statement (type %d) in row body\n",
+ WSGO("Unexpected statement (type %d) in row body\n",
keyDef->common.stmtType);
return False;
}
else
{
WARN("Assignment to field of unknown element in section\n");
- ACTION2("No value assigned to %s.%s\n", elem.str, field.str);
+ ACTION("No value assigned to %s.%s\n", elem.str, field.str);
}
}
else if (rowDef->common.stmtType == StmtRowDef)
}
else
{
- WSGO1("Unexpected statement (type %d) in section body\n",
+ WSGO("Unexpected statement (type %d) in section body\n",
rowDef->common.stmtType);
return False;
}
}
if (si->nRows != def->nRows)
{
- WSGO2("Expected %d rows, found %d\n", (unsigned int) def->nRows,
+ WSGO("Expected %d rows, found %d\n", (unsigned int) def->nRows,
(unsigned int) si->nRows);
- ACTION1("Definition of section %s might be incorrect\n", scText(si));
+ ACTION("Definition of section %s might be incorrect\n", scText(si));
}
return True;
}
if (!failWhat)
failWhat = "key name";
ERROR("Interpretation files may not include other types\n");
- ACTION1("Ignoring %s definition.\n", failWhat);
+ ACTION("Ignoring %s definition.\n", failWhat);
info->errorCount++;
break;
default:
- WSGO1("Unexpected statement type %d in HandleGeometryFile\n",
+ WSGO("Unexpected statement type %d in HandleGeometryFile\n",
stmt->stmtType);
break;
}
#ifdef NOISY
ERROR("Too many errors\n");
#endif
- ACTION1("Abandoning geometry file \"%s\"\n", file->topName);
+ ACTION("Abandoning geometry file \"%s\"\n", file->topName);
break;
}
}
if (!shape)
{
WSGO("Couldn't allocate shape in geometry\n");
- ACTION1("Shape %s not compiled\n", shText(si));
+ ACTION("Shape %s not compiled\n", shText(si));
return False;
}
old_outline = si->outlines;
if (!outline)
{
WSGO("Couldn't allocate outline in shape\n");
- ACTION1("Shape %s is incomplete\n", shText(si));
+ ACTION("Shape %s is incomplete\n", shText(si));
return False;
}
n = old_outline->num_points;
{
if (warningLevel < 9)
{
- ERROR1("No position defined for doodad %s\n",
+ ERROR("No position defined for doodad %s\n",
ddText(di));
ACTION("Illegal doodad ignored\n");
return False;
case XkbSolidDoodad:
if ((di->defs.defined & _GD_Shape) == 0)
{
- ERROR2("No shape defined for %s doodad %s\n",
+ ERROR("No shape defined for %s doodad %s\n",
(di->type == XkbOutlineDoodad ? "outline" : "filled"),
ddText(di));
ACTION("Incomplete definition ignored\n");
di->shape = si->name;
else
{
- ERROR1("No legal shape for %s\n", ddText(di));
+ ERROR("No legal shape for %s\n", ddText(di));
ACTION("Incomplete definition ignored\n");
return False;
}
{
if (warningLevel > 5)
{
- WARN1("No color for doodad %s\n", ddText(di));
+ WARN("No color for doodad %s\n", ddText(di));
ACTION("Using black\n");
}
di->color = XkbcInternAtom("black", False);
case XkbTextDoodad:
if ((di->defs.defined & _GD_Text) == 0)
{
- ERROR1("No text specified for text doodad %s\n", ddText(di));
+ ERROR("No text specified for text doodad %s\n", ddText(di));
ACTION("Illegal doodad definition ignored\n");
return False;
}
{
if (warningLevel > 5)
{
- WARN1("No color specified for doodad %s\n", ddText(di));
+ WARN("No color specified for doodad %s\n", ddText(di));
ACTION("Using black\n");
}
di->color = XkbcInternAtom("black", False);
return True;
if (warningLevel < 9)
{
- WARN1
+ WARN
("Text doodad %s has full and partial font definition\n",
ddText(di));
ACTION("Full specification ignored\n");
{
if (warningLevel > 5)
{
- WARN1("No font specified for doodad %s\n", ddText(di));
- ACTION1("Using \"%s\"\n", DFLT_FONT);
+ WARN("No font specified for doodad %s\n", ddText(di));
+ ACTION("Using \"%s\"\n", DFLT_FONT);
}
di->font = XkbcInternAtom(DFLT_FONT, False);
}
{
if (warningLevel > 7)
{
- WARN1("No font slant for text doodad %s\n", ddText(di));
- ACTION1("Using \"%s\"\n", DFLT_SLANT);
+ WARN("No font slant for text doodad %s\n", ddText(di));
+ ACTION("Using \"%s\"\n", DFLT_SLANT);
}
di->fontSlant = XkbcInternAtom(DFLT_SLANT, False);
}
{
if (warningLevel > 7)
{
- WARN1("No font weight for text doodad %s\n", ddText(di));
- ACTION1("Using \"%s\"\n", DFLT_WEIGHT);
+ WARN("No font weight for text doodad %s\n", ddText(di));
+ ACTION("Using \"%s\"\n", DFLT_WEIGHT);
}
di->fontWeight = XkbcInternAtom(DFLT_WEIGHT, False);
}
{
if (warningLevel > 9)
{
- WARN1("No font set width for text doodad %s\n", ddText(di));
- ACTION1("Using \"%s\"\n", DFLT_SET_WIDTH);
+ WARN("No font set width for text doodad %s\n", ddText(di));
+ ACTION("Using \"%s\"\n", DFLT_SET_WIDTH);
}
di->fontSetWidth = XkbcInternAtom(DFLT_SET_WIDTH, False);
}
{
if (warningLevel > 9)
{
- WARN1("No font variant for text doodad %s\n", ddText(di));
- ACTION1("Using \"%s\"\n", DFLT_VARIANT);
+ WARN("No font variant for text doodad %s\n", ddText(di));
+ ACTION("Using \"%s\"\n", DFLT_VARIANT);
}
di->fontVariant = XkbcInternAtom(DFLT_VARIANT, False);
}
{
if (warningLevel > 7)
{
- WARN1("No font encoding for doodad %s\n", ddText(di));
- ACTION1("Using \"%s\"\n", DFLT_ENCODING);
+ WARN("No font encoding for doodad %s\n", ddText(di));
+ ACTION("Using \"%s\"\n", DFLT_ENCODING);
}
di->fontEncoding = XkbcInternAtom(DFLT_ENCODING, False);
}
{
if (warningLevel > 7)
{
- WARN1("No font size for text doodad %s\n", ddText(di));
- ACTION1("Using %s point text\n", XkbcGeomFPText(DFLT_SIZE));
+ WARN("No font size for text doodad %s\n", ddText(di));
+ ACTION("Using %s point text\n", XkbcGeomFPText(DFLT_SIZE));
}
di->fontSize = DFLT_SIZE;
}
size *= nLines;
if (warningLevel > 5)
{
- WARN1("No height for text doodad %s\n", ddText(di));
- ACTION1("Using calculated height %s millimeters\n",
+ WARN("No height for text doodad %s\n", ddText(di));
+ ACTION("Using calculated height %s millimeters\n",
XkbcGeomFPText(size));
}
di->height = size;
width *= (di->height * 2) / 3;
if (warningLevel > 5)
{
- WARN1("No width for text doodad %s\n", ddText(di));
- ACTION1("Using calculated width %s millimeters\n",
+ WARN("No width for text doodad %s\n", ddText(di));
+ ACTION("Using calculated width %s millimeters\n",
XkbcGeomFPText(width));
}
di->width = width;
case XkbIndicatorDoodad:
if ((di->defs.defined & _GD_Shape) == 0)
{
- ERROR1("No shape defined for indicator doodad %s\n", ddText(di));
+ ERROR("No shape defined for indicator doodad %s\n", ddText(di));
ACTION("Incomplete definition ignored\n");
return False;
}
di->shape = si->name;
else
{
- ERROR1("No legal shape for doodad %s\n", ddText(di));
+ ERROR("No legal shape for doodad %s\n", ddText(di));
ACTION("Incomplete definition ignored\n");
return False;
}
{
if (warningLevel > 5)
{
- WARN1("No \"on\" color for indicator doodad %s\n",
+ WARN("No \"on\" color for indicator doodad %s\n",
ddText(di));
ACTION("Using green\n");
}
{
if (warningLevel > 5)
{
- WARN1("No \"off\" color for indicator doodad %s\n",
+ WARN("No \"off\" color for indicator doodad %s\n",
ddText(di));
ACTION("Using black\n");
}
case XkbLogoDoodad:
if (di->logoName == NULL)
{
- ERROR1("No logo name defined for logo doodad %s\n", ddText(di));
+ ERROR("No logo name defined for logo doodad %s\n", ddText(di));
ACTION("Incomplete definition ignored\n");
return False;
}
if ((di->defs.defined & _GD_Shape) == 0)
{
- ERROR1("No shape defined for logo doodad %s\n", ddText(di));
+ ERROR("No shape defined for logo doodad %s\n", ddText(di));
ACTION("Incomplete definition ignored\n");
return False;
}
di->shape = si->name;
else
{
- ERROR1("No legal shape for %s\n", ddText(di));
+ ERROR("No legal shape for %s\n", ddText(di));
ACTION("Incomplete definition ignored\n");
return False;
}
{
if (warningLevel > 5)
{
- WARN1("No color for doodad %s\n", ddText(di));
+ WARN("No color for doodad %s\n", ddText(di));
ACTION("Using black\n");
}
di->color = XkbcInternAtom("black", False);
}
break;
default:
- WSGO1("Uknown doodad type %d in VerifyDoodad\n",
+ WSGO("Uknown doodad type %d in VerifyDoodad\n",
(unsigned int) di->type);
return False;
}
doodad = XkbcAddGeomDoodad(geom, section, name);
if (!doodad)
{
- WSGO1("Couldn't allocate doodad in %s\n",
+ WSGO("Couldn't allocate doodad in %s\n",
(section ? "section" : "geometry"));
- ACTION1("Cannot copy doodad %s\n", ddText(di));
+ ACTION("Cannot copy doodad %s\n", ddText(di));
return False;
}
doodad->any.type = di->type;
{
if (warningLevel > 0)
{
- WARN3
+ WARN
("Key %s in section \"%s\" and overlay \"%s\"\n",
XkbcKeyNameText(key->name.name),
XkbcAtomText(section->name),
}
if ((ki->sectionRow == _GOK_UnknownRow) && (warningLevel > 0))
{
- WARN3
+ WARN
("Key %s not in \"%s\", but has an overlay key in \"%s\"\n",
XkbcKeyNameText(ki->under),
XkbcAtomText(section->name),
}
if (oi->nKeys < 1)
{
- ERROR2("Overlay \"%s\" for section \"%s\" has no legal keys\n",
+ ERROR("Overlay \"%s\" for section \"%s\" has no legal keys\n",
XkbcAtomText(oi->name), XkbcAtomText(section->name));
ACTION("Overlay definition ignored\n");
return False;
ol = XkbcAddGeomOverlay(section, name, oi->nRows);
if (!ol)
{
- WSGO2("Couldn't add overlay \"%s\" to section \"%s\"\n",
+ WSGO("Couldn't add overlay \"%s\" to section \"%s\"\n",
XkbcAtomText(name), XkbcAtomText(section->name));
return False;
}
}
if (!XkbcAddGeomOverlayRow(ol, row_under, rowSize[i]))
{
- WSGO3
+ WSGO
("Can't add row %d to overlay \"%s\" of section \"%s\"\n",
i, XkbcAtomText(name), XkbcAtomText(section->name));
return False;
if (section == NULL)
{
WSGO("Couldn't allocate section in geometry\n");
- ACTION1("Section %s not compiled\n", scText(si));
+ ACTION("Section %s not compiled\n", scText(si));
return False;
}
section->top = si->top;
if (row == NULL)
{
WSGO("Couldn't allocate row in section\n");
- ACTION1("Section %s is incomplete\n", scText(si));
+ ACTION("Section %s is incomplete\n", scText(si));
return False;
}
row->top = ri->top;
XkbColorPtr color;
if ((ki->defs.defined & _GK_Name) == 0)
{
- ERROR3("Key %d of row %d in section %s has no name\n",
+ ERROR("Key %d of row %d in section %s has no name\n",
(int) ki->index, (int) ri->index, scText(si));
- ACTION1("Section %s ignored\n", scText(si));
+ ACTION("Section %s ignored\n", scText(si));
return False;
}
key = XkbcAddGeomKey(row);
if (key == NULL)
{
WSGO("Couldn't allocate key in row\n");
- ACTION1("Section %s is incomplete\n", scText(si));
+ ACTION("Section %s is incomplete\n", scText(si));
return False;
}
memcpy(key->name.name, ki->name, XkbKeyNameLength);
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN1("Map for indicator %s redefined\n",
+ WARN("Map for indicator %s redefined\n",
XkbcAtomText(old->name));
ACTION("Earlier definition ignored\n");
}
}
if (collide)
{
- WARN1("Map for indicator %s redefined\n",
+ WARN("Map for indicator %s redefined\n",
XkbcAtomText(old->name));
- ACTION1("Using %s definition for duplicate fields\n",
+ ACTION("Using %s definition for duplicate fields\n",
(new->defs.merge == MergeAugment ? "first" : "last"));
}
return oldLEDs;
if (!old)
{
WSGO("Couldn't allocate indicator map\n");
- ACTION1("Map for indicator %s not compiled\n",
+ ACTION("Map for indicator %s not compiled\n",
XkbcAtomText(new->name));
return NULL;
}
"indicator index");
if ((rtrn.uval < 1) || (rtrn.uval > 32))
{
- ERROR2("Illegal indicator index %d (range 1..%d)\n",
+ ERROR("Illegal indicator index %d (range 1..%d)\n",
rtrn.uval, XkbNumIndicators);
- ACTION1("Index definition for %s indicator ignored\n",
+ ACTION("Index definition for %s indicator ignored\n",
XkbcAtomText(led->name));
return False;
}
}
else
{
- ERROR2("Unknown field %s in map for %s indicator\n", field,
+ ERROR("Unknown field %s in map for %s indicator\n", field,
XkbcAtomText(led->name));
ACTION("Definition ignored\n");
ok = False;
}
if (elem.str != NULL)
{
- ERROR1
+ ERROR
("Cannot set defaults for \"%s\" element in indicator map\n",
elem.str);
- ACTION2("Assignment to %s.%s ignored\n", elem.str, field.str);
+ ACTION("Assignment to %s.%s ignored\n", elem.str, field.str);
ok = False;
}
else
if (led->indicator == _LED_NotBound)
{
ERROR("No unnamed indicators found\n");
- ACTION1
+ ACTION
("Virtual indicator map \"%s\" not bound\n",
XkbcAtomGetString(led->name));
continue;
(xkb->names->indicators[led->indicator - 1] != led->name))
{
Atom old = xkb->names->indicators[led->indicator - 1];
- ERROR1("Multiple names bound to indicator %d\n",
+ ERROR("Multiple names bound to indicator %d\n",
(unsigned int) led->indicator);
- ACTION2("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
XkbcAtomGetString(old),
XkbcAtomGetString(led->name));
led->indicator = _LED_NotBound;
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN1("Multiple indicators named %s\n", XkbcAtomText(new->name));
+ WARN("Multiple indicators named %s\n", XkbcAtomText(new->name));
if (old->ndx == new->ndx)
{
if (old->virtual != new->virtual)
{
action = "Identical definitions ignored\n";
}
- ACTION2(action, (old->virtual ? "virtual" : "real"),
+ ACTION(action, (old->virtual ? "virtual" : "real"),
(old->virtual ? "real" : "virtual"));
return True;
}
action = "Ignoring %d, using %d\n";
else
action = "Using %d, ignoring %d\n";
- ACTION2(action, old->ndx, new->ndx);
+ ACTION(action, old->ndx, new->ndx);
}
if (replace)
{
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN1("Multiple names for indicator %d\n", new->ndx);
+ WARN("Multiple names for indicator %d\n", new->ndx);
if ((old->name == new->name) && (old->virtual == new->virtual))
action = "Identical definitions ignored\n";
else
using = old->name;
ignoring = new->name;
}
- ACTION4("Using %s %s, ignoring %s %s\n",
+ ACTION("Using %s %s, ignoring %s %s\n",
oldType, XkbcAtomText(using),
newType, XkbcAtomText(ignoring));
}
new = NextIndicatorName(info);
if (!new)
{
- WSGO1("Couldn't allocate name for indicator %d\n", new->ndx);
+ WSGO("Couldn't allocate name for indicator %d\n", new->ndx);
ACTION("Ignored\n");
return False;
}
if ((kc < info->effectiveMin) || (kc > info->effectiveMax))
{
- ERROR2("Illegal keycode %d for name <%s>\n", kc, name);
- ACTION2("Must be in the range %d-%d inclusive\n",
+ ERROR("Illegal keycode %d for name <%s>\n", kc, name);
+ ACTION("Must be in the range %d-%d inclusive\n",
info->effectiveMin, info->effectiveMax);
return False;
}
else if (reportCollisions)
{
WARN("Multiple identical key name definitions\n");
- ACTION2("Later occurences of \"<%s> = %d\" ignored\n",
+ ACTION("Later occurences of \"<%s> = %d\" ignored\n",
buf, kc);
}
return True;
{
if (reportCollisions)
{
- WARN1("Multiple names for keycode %d\n", kc);
- ACTION2("Using <%s>, ignoring <%s>\n", buf, name);
+ WARN("Multiple names for keycode %d\n", kc);
+ ACTION("Using <%s>, ignoring <%s>\n", buf, name);
}
return True;
}
{
if (reportCollisions)
{
- WARN1("Multiple names for keycode %d\n", kc);
- ACTION2("Using <%s>, ignoring <%s>\n", name, buf);
+ WARN("Multiple names for keycode %d\n", kc);
+ ACTION("Using <%s>, ignoring <%s>\n", name, buf);
}
info->names[kc] = 0;
info->files[kc] = 0;
info->has_alt_forms[old] = True;
if (reportCollisions)
{
- WARN1("Key name <%s> assigned to multiple keys\n", name);
- ACTION2("Using %d, ignoring %d\n", kc, old);
+ WARN("Key name <%s> assigned to multiple keys\n", name);
+ ACTION("Using %d, ignoring %d\n", kc, old);
}
}
else if (merge != MergeAltForm)
{
if ((reportCollisions) && (warningLevel > 3))
{
- WARN1("Key name <%s> assigned to multiple keys\n", name);
- ACTION2("Using %d, ignoring %d\n", old, kc);
+ WARN("Key name <%s> assigned to multiple keys\n", name);
+ ACTION("Using %d, ignoring %d\n", old, kc);
ACTION
("Use 'alternate' keyword to assign the same name to multiple keys\n");
}
if (!ExprResolveInteger(stmt->value, &result, NULL, NULL))
{
- ACTION1("No value keycode assigned to name <%s>\n", stmt->name);
+ ACTION("No value keycode assigned to name <%s>\n", stmt->name);
return 0;
}
code = result.ival;
if ((code < info->effectiveMin) || (code > info->effectiveMax))
{
- ERROR2("Illegal keycode %d for name <%s>\n", code, stmt->name);
- ACTION2("Must be in the range %d-%d inclusive\n",
+ ERROR("Illegal keycode %d for name <%s>\n", code, stmt->name);
+ ACTION("Must be in the range %d-%d inclusive\n",
info->effectiveMin, info->effectiveMax);
return 0;
}
if (tmp.str != NULL)
{
- ERROR1("Unknown element %s encountered\n", tmp.str);
- ACTION1("Default for field %s ignored\n", field.str);
+ ERROR("Unknown element %s encountered\n", tmp.str);
+ ACTION("Default for field %s ignored\n", field.str);
return 0;
}
if (uStrCaseCmp(field.str, "minimum") == 0)
else
{
ERROR("Unknown field encountered\n");
- ACTION1("Assigment to field %s ignored\n", field.str);
+ ACTION("Assigment to field %s ignored\n", field.str);
return 0;
}
if (arrayNdx != NULL)
{
- ERROR1("The %s setting is not an array\n", field.str);
+ ERROR("The %s setting is not an array\n", field.str);
ACTION("Illegal array reference ignored\n");
return 0;
}
if (ExprResolveInteger(stmt->value, &tmp, NULL, NULL) == 0)
{
- ACTION1("Assignment to field %s ignored\n", field.str);
+ ACTION("Assignment to field %s ignored\n", field.str);
return 0;
}
if ((tmp.ival < XkbMinLegalKeyCode) || (tmp.ival > XkbMaxLegalKeyCode))
{
- ERROR3
+ ERROR
("Illegal keycode %d (must be in the range %d-%d inclusive)\n",
tmp.ival, XkbMinLegalKeyCode, XkbMaxLegalKeyCode);
- ACTION1("Value of \"%s\" not changed\n", field.str);
+ ACTION("Value of \"%s\" not changed\n", field.str);
return 0;
}
if (which == MIN_KEYCODE_DEF)
{
if ((info->explicitMax > 0) && (info->explicitMax < tmp.ival))
{
- ERROR2
+ ERROR
("Minimum key code (%d) must be <= maximum key code (%d)\n",
tmp.ival, info->explicitMax);
ACTION("Minimum key code value not changed\n");
}
if ((info->computedMax > 0) && (info->computedMin < tmp.ival))
{
- ERROR2
+ ERROR
("Minimum key code (%d) must be <= lowest defined key (%d)\n",
tmp.ival, info->computedMin);
ACTION("Minimum key code value not changed\n");
{
if ((info->explicitMin > 0) && (info->explicitMin > tmp.ival))
{
- ERROR2("Maximum code (%d) must be >= minimum key code (%d)\n",
+ ERROR("Maximum code (%d) must be >= minimum key code (%d)\n",
tmp.ival, info->explicitMin);
ACTION("Maximum code value not changed\n");
return 0;
}
if ((info->computedMax > 0) && (info->computedMax > tmp.ival))
{
- ERROR2
+ ERROR
("Maximum code (%d) must be >= highest defined key (%d)\n",
tmp.ival, info->computedMax);
ACTION("Maximum code value not changed\n");
if ((def->ndx < 1) || (def->ndx > XkbNumIndicators))
{
info->errorCount++;
- ERROR1("Name specified for illegal indicator index %d\n", def->ndx);
+ ERROR("Name specified for illegal indicator index %d\n", def->ndx);
ACTION("Ignored\n");
return False;
}
case StmtInterpDef:
case StmtVModDef:
ERROR("Keycode files may define key and indicator names only\n");
- ACTION1("Ignoring definition of %s\n",
+ ACTION("Ignoring definition of %s\n",
((stmt->stmtType ==
StmtInterpDef) ? "a symbol interpretation" :
"virtual modifiers"));
info->errorCount++;
break;
default:
- WSGO1("Unexpected statement type %d in HandleKeycodesFile\n",
+ WSGO("Unexpected statement type %d in HandleKeycodesFile\n",
stmt->stmtType);
break;
}
#ifdef NOISY
ERROR("Too many errors\n");
#endif
- ACTION1("Abandoning keycodes file \"%s\"\n", file->topName);
+ ACTION("Abandoning keycodes file \"%s\"\n", file->topName);
break;
}
}
legal = XkmKeymapLegal;
break;
default:
- ERROR1("Cannot compile %s alone into an XKM file\n",
+ ERROR("Cannot compile %s alone into an XKM file\n",
XkbcConfigText(mainType));
return False;
}
file->topName = mainName;
if ((have & (1 << file->type)) != 0)
{
- ERROR2("More than one %s section in a %s file\n",
+ ERROR("More than one %s section in a %s file\n",
XkbcConfigText(file->type), XkbcConfigText(mainType));
ACTION("All sections after the first ignored\n");
ok = False;
}
else if ((1 << file->type) & (~legal))
{
- ERROR2("Cannot define %s in a %s file\n",
+ ERROR("Cannot define %s in a %s file\n",
XkbcConfigText(file->type), XkbcConfigText(mainType));
ok = False;
}
case XkmSemanticsFile:
case XkmLayoutFile:
case XkmKeymapFile:
- WSGO2("Illegal %s configuration in a %s file\n",
+ WSGO("Illegal %s configuration in a %s file\n",
XkbcConfigText(file->type), XkbcConfigText(mainType));
ACTION("Ignored\n");
ok = False;
break;
case XkmVirtualModsIndex:
case XkmIndicatorsIndex:
- WSGO1("Found an isolated %s section\n",
+ WSGO("Found an isolated %s section\n",
XkbcConfigText(file->type));
break;
default:
- WSGO1("Unknown file type %d\n", file->type);
+ WSGO("Unknown file type %d\n", file->type);
break;
}
if (ok)
{
if (missing & bit)
{
- ERROR2("Missing %s section in a %s file\n",
+ ERROR("Missing %s section in a %s file\n",
XkbcConfigText(i), XkbcConfigText(mainType));
missing &= ~bit;
}
}
- ACTION1("Description of %s not compiled\n",
+ ACTION("Description of %s not compiled\n",
XkbcConfigText(mainType));
ok = False;
}
static Bool
ReportTypeBadWidth(const char *type, int has, int needs)
{
- ERROR3("Key type \"%s\" has %d levels, must have %d\n", type, has, needs);
+ ERROR("Key type \"%s\" has %d levels, must have %d\n", type, has, needs);
ACTION("Illegal type definition ignored\n");
return False;
}
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN1("Multiple definitions of the %s key type\n",
+ WARN("Multiple definitions of the %s key type\n",
XkbcAtomGetString(new->name));
ACTION("Earlier definition ignored\n");
}
report = (old->defs.fileID == new->defs.fileID) && (warningLevel > 0);
if (report)
{
- WARN1("Multiple definitions of the %s key type\n",
+ WARN("Multiple definitions of the %s key type\n",
XkbcAtomGetString(new->name));
ACTION("Later definition ignored\n");
}
type->entries = uTypedCalloc(2, XkbKTMapEntryRec);
if (type->entries == NULL)
{
- ERROR1("Couldn't allocate map entries for %s\n", TypeTxt(type));
+ ERROR("Couldn't allocate map entries for %s\n", TypeTxt(type));
ACTION("Map entries lost\n");
return NULL;
}
XkbKTMapEntryRec);
if (type->entries == NULL)
{
- ERROR1("Couldn't reallocate map entries for %s\n", TypeTxt(type));
+ ERROR("Couldn't reallocate map entries for %s\n", TypeTxt(type));
ACTION("Map entries lost\n");
return NULL;
}
{
if (warningLevel > 9)
{
- WARN2("Identical definitions for preserve[%s] in %s\n",
+ WARN("Identical definitions for preserve[%s] in %s\n",
PreserveIndexTxt(xkb, old), TypeTxt(type));
ACTION("Ignored\n");
}
if (report && (warningLevel > 0))
{
char *str;
- WARN2("Multiple definitions for preserve[%s] in %s\n",
+ WARN("Multiple definitions for preserve[%s] in %s\n",
PreserveIndexTxt(xkb, old), TypeTxt(type));
if (clobber)
str = PreserveTxt(xkb, new);
else
str = PreserveTxt(xkb, old);
- ACTION1("Using %s, ", str);
+ ACTION("Using %s, ", str);
if (clobber)
str = PreserveTxt(xkb, old);
else
str = PreserveTxt(xkb, new);
- INFO1("ignoring %s\n", str);
+ INFO("ignoring %s\n", str);
}
if (clobber)
{
old = uTypedAlloc(PreserveInfo);
if (!old)
{
- WSGO1("Couldn't allocate preserve in %s\n", TypeTxt(type));
- ACTION1("Preserve[%s] lost\n", PreserveIndexTxt(xkb, old));
+ WSGO("Couldn't allocate preserve in %s\n", TypeTxt(type));
+ ACTION("Preserve[%s] lost\n", PreserveIndexTxt(xkb, old));
return False;
}
*old = *new;
use = old->level + 1;
ignore = new->level + 1;
}
- WARN2("Multiple map entries for %s in %s\n",
+ WARN("Multiple map entries for %s in %s\n",
MapEntryTxt(xkb, new), TypeTxt(type));
- ACTION2("Using %d, ignoring %d\n", use, ignore);
+ ACTION("Using %d, ignoring %d\n", use, ignore);
}
else if (warningLevel > 9)
{
- WARN3("Multiple occurences of map[%s]= %d in %s\n",
+ WARN("Multiple occurences of map[%s]= %d in %s\n",
MapEntryTxt(xkb, new), new->level + 1, TypeTxt(type));
ACTION("Ignored\n");
return True;
{
if (warningLevel > 0)
{
- WARN1("Map entry for unused modifiers in %s\n", TypeTxt(type));
- ACTION1("Using %s instead of ",
+ WARN("Map entry for unused modifiers in %s\n", TypeTxt(type));
+ ACTION("Using %s instead of ",
XkbcVModMaskText(xkb,
entry.mods.real_mods & type->mask,
entry.mods.vmods & type->vmask));
- INFO1("%s\n", MapEntryTxt(xkb, &entry));
+ INFO("%s\n", MapEntryTxt(xkb, &entry));
}
entry.mods.real_mods &= type->mask;
entry.mods.vmods &= type->vmask;
}
if ((rtrn.ival < 1) || (rtrn.ival > XkbMaxShiftLevel + 1))
{
- ERROR3("Shift level %d out of range (1..%d) in key type %s\n",
+ ERROR("Shift level %d out of range (1..%d) in key type %s\n",
XkbMaxShiftLevel + 1, rtrn.ival, TypeTxt(type));
- ACTION1("Ignoring illegal definition of map[%s]\n",
+ ACTION("Ignoring illegal definition of map[%s]\n",
MapEntryTxt(xkb, &entry));
return False;
}
{
if (warningLevel > 0)
{
- WARN1("Preserve for modifiers not used by the %s type\n",
+ WARN("Preserve for modifiers not used by the %s type\n",
TypeTxt(type));
- ACTION1("Index %s converted to ", PreserveIndexTxt(xkb, &new));
+ ACTION("Index %s converted to ", PreserveIndexTxt(xkb, &new));
}
new.indexMods &= type->mask;
new.indexVMods &= type->vmask;
if (warningLevel > 0)
- INFO1("%s\n", PreserveIndexTxt(xkb, &new));
+ INFO("%s\n", PreserveIndexTxt(xkb, &new));
}
if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (char *) xkb))
{
ERROR("Preserve value in a key type is not a modifier mask\n");
- ACTION2("Ignoring preserve[%s] in type %s\n",
+ ACTION("Ignoring preserve[%s] in type %s\n",
PreserveIndexTxt(xkb, &new), TypeTxt(type));
return False;
}
{
if (warningLevel > 0)
{
- WARN2("Illegal value for preserve[%s] in type %s\n",
+ WARN("Illegal value for preserve[%s] in type %s\n",
PreserveTxt(xkb, &new), TypeTxt(type));
- ACTION1("Converted %s to ", PreserveIndexTxt(xkb, &new));
+ ACTION("Converted %s to ", PreserveIndexTxt(xkb, &new));
}
new.preMods &= new.indexMods;
new.preVMods &= new.indexVMods;
if (warningLevel > 0)
{
- INFO1("%s\n", PreserveIndexTxt(xkb, &new));
+ INFO("%s\n", PreserveIndexTxt(xkb, &new));
}
}
return AddPreserve(xkb, type, &new, True, True);
uTypedRecalloc(type->lvlNames, type->szNames, level + 1, Atom);
if (type->lvlNames == NULL)
{
- ERROR1("Couldn't allocate level names for type %s\n",
+ ERROR("Couldn't allocate level names for type %s\n",
TypeTxt(type));
ACTION("Level names lost\n");
type->szNames = 0;
{
if (warningLevel > 9)
{
- WARN2("Duplicate names for level %d of key type %s\n",
+ WARN("Duplicate names for level %d of key type %s\n",
level + 1, TypeTxt(type));
ACTION("Ignored\n");
}
char *old, *new;
old = XkbcAtomText(type->lvlNames[level]);
new = XkbcAtomText(name);
- WARN2("Multiple names for level %d of key type %s\n",
+ WARN("Multiple names for level %d of key type %s\n",
level + 1, TypeTxt(type));
if (clobber)
- ACTION2("Using %s, ignoring %s\n", new, old);
+ ACTION("Using %s, ignoring %s\n", new, old);
else
- ACTION2("Using %s, ignoring %s\n", old, new);
+ ACTION("Using %s, ignoring %s\n", old, new);
}
if (!clobber)
return True;
return ReportTypeBadType(type, "level name", "integer");
if ((rtrn.ival < 1) || (rtrn.ival > XkbMaxShiftLevel + 1))
{
- ERROR3("Level name %d out of range (1..%d) in key type %s\n",
+ ERROR("Level name %d out of range (1..%d) in key type %s\n",
rtrn.ival,
XkbMaxShiftLevel + 1,
XkbcAtomText(type->name));
level = rtrn.ival - 1;
if (!ExprResolveString(value, &rtrn, NULL, NULL))
{
- ERROR2("Non-string name for level %d in key type %s\n", level + 1,
+ ERROR("Non-string name for level %d in key type %s\n", level + 1,
XkbcAtomText(type->name));
ACTION("Ignoring illegal level name definition\n");
return False;
vmods = (tmp.uval >> 8) & 0xffff; /* xkb virtual mods */
if (type->defs.defined & _KT_Mask)
{
- WARN1("Multiple modifier mask definitions for key type %s\n",
+ WARN("Multiple modifier mask definitions for key type %s\n",
XkbcAtomText(type->name));
- ACTION1("Using %s, ", TypeMaskTxt(type, xkb));
- INFO1("ignoring %s\n", XkbcVModMaskText(xkb, mods, vmods));
+ ACTION("Using %s, ", TypeMaskTxt(type, xkb));
+ INFO("ignoring %s\n", XkbcVModMaskText(xkb, mods, vmods));
return False;
}
type->mask = mods;
type->defs.defined |= _KT_LevelNames;
return SetLevelName(type, arrayNdx, value);
}
- ERROR2("Unknown field %s in key type %s\n", field, TypeTxt(type));
+ ERROR("Unknown field %s in key type %s\n", field, TypeTxt(type));
ACTION("Definition ignored\n");
return False;
}
stmt->value, info);
if (elem.str != NULL)
{
- ERROR1("Default for unknown element %s\n", uStringText(elem.str));
- ACTION1("Value for field %s ignored\n", uStringText(field.str));
+ ERROR("Default for unknown element %s\n", uStringText(elem.str));
+ ACTION("Value for field %s ignored\n", uStringText(field.str));
}
else if (field.str != NULL)
{
- ERROR1("Default defined for unknown field %s\n",
+ ERROR("Default defined for unknown field %s\n",
uStringText(field.str));
ACTION("Ignored\n");
}
info->errorCount++;
break;
default:
- WSGO1("Unexpected statement type %d in HandleKeyTypesFile\n",
+ WSGO("Unexpected statement type %d in HandleKeyTypesFile\n",
stmt->stmtType);
break;
}
#ifdef NOISY
ERROR("Too many errors\n");
#endif
- ACTION1("Abandoning keytypes file \"%s\"\n", file->topName);
+ ACTION("Abandoning keytypes file \"%s\"\n", file->topName);
break;
}
}
if (!type->preserve)
{
WARN("Couldn't allocate preserve array in CopyDefToKeyType\n");
- ACTION1("Preserve setting for type %s lost\n",
+ ACTION("Preserve setting for type %s lost\n",
XkbcAtomText(def->name));
}
else
else
{
WSGO("Couldn't allocate space for types name\n");
- ACTION2("Name \"%s\" (from %s) NOT assigned\n",
+ ACTION("Name \"%s\" (from %s) NOT assigned\n",
scanFile, info.name);
}
}
file = XkbFindFileInPath(stmt->file, file_type, &stmt->path);
if (file == NULL)
{
- ERROR2("Can't find file \"%s\" for %s include\n", stmt->file,
+ ERROR("Can't find file \"%s\" for %s include\n", stmt->file,
XkbDirectoryForInclude(file_type));
ACTION("Exiting\n");
return False;
oldLine = lineNum;
setScanState(stmt->file, 1);
if (debugFlags & 2)
- INFO1("About to parse include file %s\n", stmt->file);
+ INFO("About to parse include file %s\n", stmt->file);
/* parse the file */
if ((XKBParseFile(file, &rtrn) == 0) || (rtrn == NULL))
{
setScanState(oldFile, oldLine);
- ERROR1("Error interpreting include file \"%s\"\n", stmt->file);
+ ERROR("Error interpreting include file \"%s\"\n", stmt->file);
ACTION("Exiting\n");
fclose(file);
return False;
}
if (!mapToUse)
{
- ERROR3("No %s named \"%s\" in the include file \"%s\"\n",
+ ERROR("No %s named \"%s\" in the include file \"%s\"\n",
XkbcConfigText(file_type), stmt->map, stmt->file);
ACTION("Exiting\n");
return False;
}
else if ((rtrn->common.next != NULL) && (warningLevel > 5))
{
- WARN1("No map in include statement, but \"%s\" contains several\n",
+ WARN("No map in include statement, but \"%s\" contains several\n",
stmt->file);
- ACTION1("Using first defined map, \"%s\"\n", rtrn->name);
+ ACTION("Using first defined map, \"%s\"\n", rtrn->name);
}
setScanState(oldFile, oldLine);
if (mapToUse->type != file_type)
{
- ERROR2("Include file wrong type (expected %s, got %s)\n",
+ ERROR("Include file wrong type (expected %s, got %s)\n",
XkbcConfigText(file_type), XkbcConfigText(mapToUse->type));
- ACTION1("Include file \"%s\" ignored\n", stmt->file);
+ ACTION("Include file \"%s\" ignored\n", stmt->file);
return False;
}
/* FIXME: we have to check recursive includes here (or somewhere) */
int
ReportNotArray(const char *type, const char *field, const char *name)
{
- ERROR2("The %s %s field is not an array\n", type, field);
- ACTION1("Ignoring illegal assignment in %s\n", name);
+ ERROR("The %s %s field is not an array\n", type, field);
+ ACTION("Ignoring illegal assignment in %s\n", name);
return False;
}
int
ReportShouldBeArray(const char *type, const char *field, char *name)
{
- ERROR2("Missing subscript for %s %s\n", type, field);
- ACTION1("Ignoring illegal assignment in %s\n", name);
+ ERROR("Missing subscript for %s %s\n", type, field);
+ ACTION("Ignoring illegal assignment in %s\n", name);
return False;
}
ReportBadType(const char *type, const char *field,
const char *name, const char *wanted)
{
- ERROR3("The %s %s field must be a %s\n", type, field, wanted);
- ACTION1("Ignoring illegal assignment in %s\n", name);
+ ERROR("The %s %s field must be a %s\n", type, field, wanted);
+ ACTION("Ignoring illegal assignment in %s\n", name);
return False;
}
int
ReportBadIndexType(char *type, char *field, char *name, char *wanted)
{
- ERROR3("Index for the %s %s field must be a %s\n", type, field, wanted);
- ACTION1("Ignoring assignment to illegal field in %s\n", name);
+ ERROR("Index for the %s %s field must be a %s\n", type, field, wanted);
+ ACTION("Ignoring assignment to illegal field in %s\n", name);
return False;
}
int
ReportBadField(const char *type, const char *field, const char *name)
{
- ERROR3("Unknown %s field %s in %s\n", type, field, name);
- ACTION1("Ignoring assignment to unknown field in %s\n", name);
+ ERROR("Unknown %s field %s in %s\n", type, field, name);
+ ACTION("Ignoring assignment to unknown field in %s\n", name);
return False;
}
int
ReportMultipleDefs(char *type, char *field, char *name)
{
- WARN3("Multiple definitions of %s in %s \"%s\"\n", field, type, name);
+ WARN("Multiple definitions of %s in %s \"%s\"\n", field, type, name);
ACTION("Using last definition\n");
return False;
}
{
if (warningLevel > 2)
{
- WARN1
+ WARN
("Several keys match pattern for %s\n",
XkbcKeyNameText(name->name));
- ACTION2("Using <U%03d> for key %d\n",
+ ACTION("Using <U%03d> for key %d\n",
nUnknown, i);
}
sprintf(xkb->names->keys[i].name, "U%03d",
{
if (warningLevel > 2)
{
- WARN1("Key %d does not match any defaults\n", i);
- ACTION1("Using name <U%03d>\n", nUnknown);
+ WARN("Key %d does not match any defaults\n", i);
+ ACTION("Using name <U%03d>\n", nUnknown);
sprintf(xkb->names->keys[i].name, "U%03d", nUnknown++);
}
}
if (warningLevel > 0)
{
WARN("Couldn't allocate key names in FindNamedKey\n");
- ACTION1("Key \"%s\" not automatically created\n",
+ ACTION("Key \"%s\" not automatically created\n",
longText(name));
}
return False;
uFree(stmt);
return first;
BAIL:
- ERROR1("Illegal include statement \"%s\"\n", stmt);
+ ERROR("Illegal include statement \"%s\"\n", stmt);
ACTION("Ignored\n");
while (first)
{
{
if (warningLevel > 2)
{
- WARN1("Multiple default components in %s\n",
+ WARN("Multiple default components in %s\n",
(scanFile ? scanFile : "(unknown)"));
- ACTION2("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
(dflt->name ? dflt->name : "(first)"),
(tmp->name ? tmp->name : "(subsequent)"));
}
if (!resultSyms)
{
WSGO("Could not allocate symbols for group merge\n");
- ACTION2("Group %d of key %s not merged\n", group,
+ ACTION("Group %d of key %s not merged\n", group,
longText(into->name));
return False;
}
if (!resultActs)
{
WSGO("Could not allocate actions for group merge\n");
- ACTION2("Group %d of key %s not merged\n", group,
+ ACTION("Group %d of key %s not merged\n", group,
longText(into->name));
return False;
}
}
if (report)
{
- WARN3
+ WARN
("Multiple symbols for level %d/group %d on key %s\n",
i + 1, group + 1, longText(into->name));
- ACTION2("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
XkbcKeysymText(use), XkbcKeysymText(ignore));
}
resultSyms[i] = use;
}
if (report)
{
- WARN3
+ WARN
("Multiple actions for level %d/group %d on key %s\n",
i + 1, group + 1, longText(into->name));
- ACTION2("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
XkbcActionTypeText(use->type),
XkbcActionTypeText(ignore->type));
}
use = into->types[i];
ignore = from->types[i];
}
- WARN2
+ WARN
("Multiple definitions for group %d type of key %s\n",
i, longText(into->name));
- ACTION2("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
XkbcAtomText(use),
XkbcAtomText(ignore));
}
}
if (collide)
{
- WARN1("Symbol map for key %s redefined\n",
+ WARN("Symbol map for key %s redefined\n",
longText(into->name));
- ACTION1("Using %s definition for conflicting fields\n",
+ ACTION("Using %s definition for conflicting fields\n",
(from->defs.merge == MergeAugment ? "first" : "last"));
}
return True;
use = mm->modifier;
ignore = new->modifier;
}
- ERROR1
+ ERROR
("%s added to symbol map for multiple modifiers\n",
XkbcKeysymText(new->u.keySym));
- ACTION2("Using %s, ignoring %s.\n",
+ ACTION("Using %s, ignoring %s.\n",
XkbcModIndexText(use),
XkbcModIndexText(ignore));
mm->modifier = use;
use = mm->modifier;
ignore = new->modifier;
}
- ERROR1("Key %s added to map for multiple modifiers\n",
+ ERROR("Key %s added to map for multiple modifiers\n",
longText(new->u.keyName));
- ACTION2("Using %s, ignoring %s.\n",
+ ACTION("Using %s, ignoring %s.\n",
XkbcModIndexText(use),
XkbcModIndexText(ignore));
mm->modifier = use;
if (mm == NULL)
{
WSGO("Could not allocate modifier map entry\n");
- ACTION1("Modifier map for %s will be incomplete\n",
+ ACTION("Modifier map for %s will be incomplete\n",
XkbcModIndexText(new->modifier));
return False;
}
return True;
}
}
- ERROR3("Too many groups of %s for key %s (max %d)\n", name,
+ ERROR("Too many groups of %s for key %s (max %d)\n", name,
longText(key->name), XkbNumKbdGroups + 1);
- ACTION1("Ignoring %s defined for extra groups\n", name);
+ ACTION("Ignoring %s defined for extra groups\n", name);
return False;
}
if (!ExprResolveInteger
(arrayNdx, &tmp, SimpleLookup, (char *) groupNames))
{
- ERROR2("Illegal group index for %s of key %s\n", name,
+ ERROR("Illegal group index for %s of key %s\n", name,
longText(key->name));
ACTION("Definition with non-integer array index ignored\n");
return False;
}
if ((tmp.uval < 1) || (tmp.uval > XkbNumKbdGroups))
{
- ERROR3("Group index for %s of key %s is out of range (1..%d)\n",
+ ERROR("Group index for %s of key %s is out of range (1..%d)\n",
name, longText(key->name), XkbNumKbdGroups + 1);
- ACTION2("Ignoring %s for group %d\n", name, tmp.uval);
+ ACTION("Ignoring %s for group %d\n", name, tmp.uval);
return False;
}
*ndx_rtrn = tmp.uval - 1;
}
if (value->op != ExprKeysymList)
{
- ERROR1("Expected a list of symbols, found %s\n",
+ ERROR("Expected a list of symbols, found %s\n",
exprOpText(value->op));
- ACTION2("Ignoring symbols for group %d of %s\n", ndx,
+ ACTION("Ignoring symbols for group %d of %s\n", ndx,
longText(key->name));
return False;
}
if (key->syms[ndx] != NULL)
{
- WSGO2("Symbols for key %s, group %d already defined\n",
+ WSGO("Symbols for key %s, group %d already defined\n",
longText(key->name), ndx);
return False;
}
if (((key->numLevels[ndx] < nSyms) || (key->syms[ndx] == NULL)) &&
(!ResizeKeyGroup(key, ndx, nSyms, False)))
{
- WSGO2("Could not resize group %d of key %s\n", ndx,
+ WSGO("Could not resize group %d of key %s\n", ndx,
longText(key->name));
ACTION("Symbols lost\n");
return False;
}
if (value->op != ExprActionList)
{
- WSGO1("Bad expression type (%d) for action list value\n", value->op);
- ACTION2("Ignoring actions for group %d of %s\n", ndx,
+ WSGO("Bad expression type (%d) for action list value\n", value->op);
+ ACTION("Ignoring actions for group %d of %s\n", ndx,
longText(key->name));
return False;
}
if (key->acts[ndx] != NULL)
{
- WSGO2("Actions for key %s, group %d already defined\n",
+ WSGO("Actions for key %s, group %d already defined\n",
longText(key->name), ndx);
return False;
}
if (((key->numLevels[ndx] < nActs) || (key->acts[ndx] == NULL)) &&
(!ResizeKeyGroup(key, ndx, nActs, True)))
{
- WSGO2("Could not resize group %d of key %s\n", ndx,
+ WSGO("Could not resize group %d of key %s\n", ndx,
longText(key->name));
ACTION("Actions lost\n");
return False;
{
if (!HandleActionDef(act, xkb, toAct, MergeOverride, info->action))
{
- ERROR1("Illegal action definition for %s\n",
+ ERROR("Illegal action definition for %s\n",
longText(key->name));
- ACTION2("Action for group %d/level %d ignored\n", ndx + 1, i + 1);
+ ACTION("Action for group %d/level %d ignored\n", ndx + 1, i + 1);
}
act = (ExprDef *) act->common.next;
}
}
if ((tmp.uval < 1) || (tmp.uval > XkbMaxRadioGroups))
{
- ERROR1("Illegal radio group specified (must be 1..%d)\n",
+ ERROR("Illegal radio group specified (must be 1..%d)\n",
XkbMaxRadioGroups + 1);
- ACTION1("Value of \"allow none\" for group %d ignored\n",
+ ACTION("Value of \"allow none\" for group %d ignored\n",
tmp.uval);
return False;
}
}
if (!ExprResolveBoolean(value, &tmp, NULL, NULL))
{
- ERROR1("Illegal \"allow none\" value for %s\n",
+ ERROR("Illegal \"allow none\" value for %s\n",
longText(key->name));
ACTION("Non-boolean value ignored\n");
return False;
else if (!ExprResolveInteger(arrayNdx, &ndx, SimpleLookup,
(char *) groupNames))
{
- ERROR1("Illegal group index for type of key %s\n",
+ ERROR("Illegal group index for type of key %s\n",
longText(key->name));
ACTION("Definition with non-integer array index ignored\n");
return False;
}
else if ((ndx.uval < 1) || (ndx.uval > XkbNumKbdGroups))
{
- ERROR2
+ ERROR
("Group index for type of key %s is out of range (1..%d)\n",
longText(key->name), XkbNumKbdGroups + 1);
- ACTION1("Ignoring type for group %d\n", ndx.uval);
+ ACTION("Ignoring type for group %d\n", ndx.uval);
return False;
}
else
}
else
{
- ERROR1("Expected a virtual modifier mask, found %s\n",
+ ERROR("Expected a virtual modifier mask, found %s\n",
exprOpText(value->op));
- ACTION1("Ignoring virtual modifiers definition for key %s\n",
+ ACTION("Ignoring virtual modifiers definition for key %s\n",
longText(key->name));
}
}
(char *) rgEntries);
if (!ok)
{
- ERROR1("Illegal radio group specification for %s\n",
+ ERROR("Illegal radio group specification for %s\n",
longText(key->name));
ACTION("Non-integer radio group ignored\n");
return False;
}
if ((tmp.uval < 1) || (tmp.uval > XkbMaxRadioGroups))
{
- ERROR1
+ ERROR
("Radio group specification for %s out of range (1..32)\n",
longText(key->name));
- ACTION1("Illegal radio group %d ignored\n", tmp.uval);
+ ACTION("Illegal radio group %d ignored\n", tmp.uval);
return False;
}
key->behavior.type =
{
if (((overlayNdx < 1) || (overlayNdx > 2)) && (warningLevel > 0))
{
- ERROR2("Illegal overlay %d specified for %s\n",
+ ERROR("Illegal overlay %d specified for %s\n",
overlayNdx, longText(key->name));
ACTION("Ignored\n");
return False;
overlayNdx = 1;
else if (warningLevel > 0)
{
- ERROR2("Illegal overlay \"%s\" specified for %s\n",
+ ERROR("Illegal overlay \"%s\" specified for %s\n",
which, longText(key->name));
ACTION("Ignored\n");
return False;
ok = ExprResolveKeyName(value, &tmp, NULL, NULL);
if (!ok)
{
- ERROR1("Illegal overlay key specification for %s\n",
+ ERROR("Illegal overlay key specification for %s\n",
longText(key->name));
ACTION("Overlay key must be specified by name\n");
return False;
ok = ExprResolveEnum(value, &tmp, repeatEntries);
if (!ok)
{
- ERROR1("Illegal repeat setting for %s\n",
+ ERROR("Illegal repeat setting for %s\n",
longText(key->name));
ACTION("Non-boolean repeat setting ignored\n");
return False;
ok = ExprResolveBoolean(value, &tmp, NULL, NULL);
if (!ok)
{
- ERROR1("Illegal groupsWrap setting for %s\n",
+ ERROR("Illegal groupsWrap setting for %s\n",
longText(key->name));
ACTION("Non-boolean value ignored\n");
return False;
ok = ExprResolveBoolean(value, &tmp, NULL, NULL);
if (!ok)
{
- ERROR1("Illegal groupsClamp setting for %s\n",
+ ERROR("Illegal groupsClamp setting for %s\n",
longText(key->name));
ACTION("Non-boolean value ignored\n");
return False;
if (!ExprResolveInteger
(value, &tmp, SimpleLookup, (char *) groupNames))
{
- ERROR1("Illegal group index for redirect of key %s\n",
+ ERROR("Illegal group index for redirect of key %s\n",
longText(key->name));
ACTION("Definition with non-integer group ignored\n");
return False;
}
if ((tmp.uval < 1) || (tmp.uval > XkbNumKbdGroups))
{
- ERROR2("Out-of-range (1..%d) group for redirect of key %s\n",
+ ERROR("Out-of-range (1..%d) group for redirect of key %s\n",
XkbNumKbdGroups, longText(key->name));
- ERROR1("Ignoring illegal group %d\n", tmp.uval);
+ ERROR("Ignoring illegal group %d\n", tmp.uval);
return False;
}
key->groupInfo =
}
else
{
- ERROR1("Unknown field %s in a symbol interpretation\n", field);
+ ERROR("Unknown field %s in a symbol interpretation\n", field);
ACTION("Definition ignored\n");
ok = False;
}
}
if ((tmp.uval < 1) || (tmp.uval > XkbNumKbdGroups))
{
- ERROR1
+ ERROR
("Attempt to specify name for illegal group (must be 1..%d)\n",
XkbNumKbdGroups + 1);
- ACTION1("Name for group %d ignored\n", tmp.uval);
+ ACTION("Name for group %d ignored\n", tmp.uval);
return False;
}
if (!ExprResolveString(value, &name, NULL, NULL))
{
ERROR("Group name must be a string\n");
- ACTION1("Illegal name for group %d ignored\n", tmp.uval);
+ ACTION("Illegal name for group %d ignored\n", tmp.uval);
return False;
}
info->groupNames[tmp.uval - 1 + info->explicit_group] =
}
if ((tmp.uval < 1) || (tmp.uval > XkbNumKbdGroups))
{
- ERROR1
+ ERROR
("Out-of-range (1..%d) group for global groupsRedirect\n",
XkbNumKbdGroups);
- ACTION1("Ignoring illegal group %d\n", tmp.uval);
+ ACTION("Ignoring illegal group %d\n", tmp.uval);
return False;
}
info->groupInfo = XkbSetGroupInfo(0, XkbRedirectIntoRange, tmp.uval);
if ((key->typesDefined | key->symsDefined | key->actsDefined) & ~1)
{
int i;
- WARN1("For the map %s an explicit group specified\n", info->name);
- WARN1("but key %s has more than one group defined\n",
+ WARN("For the map %s an explicit group specified\n", info->name);
+ WARN("but key %s has more than one group defined\n",
longText(key->name));
ACTION("All groups except first one will be ignored\n");
for (i = 1; i < XkbNumKbdGroups; i++)
if (!LookupModIndex(NULL, None, def->modifier, TypeInt, &rtrn))
{
ERROR("Illegal modifier map definition\n");
- ACTION1("Ignoring map for non-modifier \"%s\"\n",
+ ACTION("Ignoring map for non-modifier \"%s\"\n",
XkbcAtomText(def->modifier));
return False;
}
else
{
ERROR("Modmap entries may contain only key names or keysyms\n");
- ACTION1("Illegal definition for %s modifier ignored\n",
+ ACTION("Illegal definition for %s modifier ignored\n",
XkbcModIndexText(tmp.modifier));
continue;
}
info->errorCount++;
break;
default:
- WSGO1("Unexpected statement type %d in HandleSymbolsFile\n",
+ WSGO("Unexpected statement type %d in HandleSymbolsFile\n",
stmt->stmtType);
break;
}
#ifdef NOISY
ERROR("Too many errors\n");
#endif
- ACTION1("Abandoning symbols file \"%s\"\n", file->topName);
+ ACTION("Abandoning symbols file \"%s\"\n", file->topName);
break;
}
}
{
if ((start_from == 0) && (warningLevel >= 5))
{
- WARN2("Key %s not found in %s keycodes\n",
+ WARN("Key %s not found in %s keycodes\n",
longText(key->name),
XkbcAtomText(xkb->names->keycodes));
ACTION("Symbols ignored\n");
{
if (warningLevel >= 5)
{
- WARN1("No automatic type for %d symbols\n",
+ WARN("No automatic type for %d symbols\n",
(unsigned int) key->numLevels[i]);
- ACTION3("Using %s for the %s key (keycode %d)\n",
+ ACTION("Using %s for the %s key (keycode %d)\n",
XkbcAtomText(key->types[i]),
longText(key->name), kc);
}
{
if (warningLevel >= 3)
{
- WARN1("Type \"%s\" is not defined\n",
+ WARN("Type \"%s\" is not defined\n",
XkbcAtomText(key->types[i]));
- ACTION2("Using TWO_LEVEL for the %s key (keycode %d)\n",
+ ACTION("Using TWO_LEVEL for the %s key (keycode %d)\n",
longText(key->name), kc);
}
types[i] = XkbTwoLevelIndex;
{
if (warningLevel > 0)
{
- WARN4
+ WARN
("Type \"%s\" has %d levels, but %s has %d symbols\n",
XkbcAtomText(type->name),
(unsigned int) type->num_levels,
outSyms = XkbcResizeKeySyms(xkb, kc, i);
if (outSyms == NULL)
{
- WSGO2("Could not enlarge symbols for %s (keycode %d)\n",
+ WSGO("Could not enlarge symbols for %s (keycode %d)\n",
longText(key->name), kc);
return False;
}
outActs = XkbcResizeKeyActions(xkb, kc, i);
if (outActs == NULL)
{
- WSGO2("Could not enlarge actions for %s (key %d)\n",
+ WSGO("Could not enlarge actions for %s (key %d)\n",
longText(key->name), kc);
return False;
}
{
if (warningLevel >= 1)
{
- WARN2("Key %s not found in %s keycodes\n",
+ WARN("Key %s not found in %s keycodes\n",
longText(key->nameForOverlayKey),
XkbcAtomText(xkb->names->keycodes));
- ACTION1("Not treating %s as an overlay key \n",
+ ACTION("Not treating %s as an overlay key \n",
longText(key->name));
}
break;
{
if (warningLevel >= 5)
{
- WARN2("Key %s not found in %s keycodes\n",
+ WARN("Key %s not found in %s keycodes\n",
longText(entry->u.keyName),
XkbcAtomText(xkb->names->keycodes));
- ACTION1("Modifier map entry for %s not updated\n",
+ ACTION("Modifier map entry for %s not updated\n",
XkbcModIndexText(entry->modifier));
}
return False;
{
if (warningLevel > 5)
{
- WARN2("Key \"%s\" not found in %s symbol map\n",
+ WARN("Key \"%s\" not found in %s symbol map\n",
XkbcKeysymText(entry->u.keySym),
XkbcAtomText(xkb->names->symbols));
- ACTION1("Modifier map entry for %s not updated\n",
+ ACTION("Modifier map entry for %s not updated\n",
XkbcModIndexText(entry->modifier));
}
return False;
char buf[5];
memcpy(buf, xkb->names->keys[i].name, 4);
buf[4] = '\0';
- WARN2
+ WARN
("No symbols defined for <%s> (keycode %d)\n",
buf, i);
}
extern Boolean uSetErrorFile(char * /* name */
);
-#define INFO6 uInformation
-#define INFO5 uInformation
-#define INFO4 uInformation
-#define INFO3 uInformation
-#define INFO2 uInformation
-#define INFO1 uInformation
#define INFO uInformation
extern void
#endif
;
-#define ACTION6 uAction
-#define ACTION5 uAction
-#define ACTION4 uAction
-#define ACTION3 uAction
-#define ACTION2 uAction
-#define ACTION1 uAction
#define ACTION uAction
extern void uAction(const char * /* s */ , ...
#endif
;
-#define WARN6 uWarning
-#define WARN5 uWarning
-#define WARN4 uWarning
-#define WARN3 uWarning
-#define WARN2 uWarning
-#define WARN1 uWarning
#define WARN uWarning
extern void uWarning(const char * /* s */ , ...
#endif
;
-#define ERROR6 uError
-#define ERROR5 uError
-#define ERROR4 uError
-#define ERROR3 uError
-#define ERROR2 uError
-#define ERROR1 uError
#define ERROR uError
extern void uError(const char * /* s */ , ...
#endif
;
-#define FATAL6 uFatalError
-#define FATAL5 uFatalError
-#define FATAL4 uFatalError
-#define FATAL3 uFatalError
-#define FATAL2 uFatalError
-#define FATAL1 uFatalError
#define FATAL uFatalError
extern void uFatalError(const char * /* s */ , ...
#endif
;
-/* WSGO stands for "Weird Stuff Going On" */
-#define WSGO6 uInternalError
-#define WSGO5 uInternalError
-#define WSGO4 uInternalError
-#define WSGO3 uInternalError
-#define WSGO2 uInternalError
-#define WSGO1 uInternalError
+/* WSGO stands for "Weird Stuff Going On" (wtf???) */
#define WSGO uInternalError
extern void uInternalError(const char * /* s */ , ...
if (!ExprResolveModMask(stmt->value, &mod, NULL, NULL))
{
str1 = XkbcAtomText(stmt->name);
- ACTION1("Declaration of %s ignored\n", str1);
+ ACTION("Declaration of %s ignored\n", str1);
return False;
}
if (mod.uval == srv->vmods[i])
return True;
str1 = XkbcAtomText(stmt->name);
- WARN1("Virtual modifier %s multiply defined\n", str1);
+ WARN("Virtual modifier %s multiply defined\n", str1);
str1 = XkbcModMaskText(srv->vmods[i], True);
if (mergeMode == MergeOverride)
{
str2 = str1;
str1 = XkbcModMaskText(mod.uval, True);
}
- ACTION2("Using %s, ignoring %s\n", str1, str2);
+ ACTION("Using %s, ignoring %s\n", str1, str2);
if (mergeMode == MergeOverride)
srv->vmods[i] = mod.uval;
return True;
}
if (nextFree < 0)
{
- ERROR1("Too many virtual modifiers defined (maximum %d)\n",
+ ERROR("Too many virtual modifiers defined (maximum %d)\n",
XkbNumVirtualMods);
ACTION("Exiting\n");
return False;
srv->vmods[nextFree] = mod.uval;
return True;
}
- ACTION1("Declaration of %s ignored\n",
+ ACTION("Declaration of %s ignored\n",
XkbcAtomText(stmt->name));
return False;
}
{
if (val_rtrn->uval < XkbNumVirtualMods)
return True;
- ERROR2("Illegal virtual modifier %d (must be 0..%d inclusive)\n",
+ ERROR("Illegal virtual modifier %d (must be 0..%d inclusive)\n",
val_rtrn->uval, XkbNumVirtualMods - 1);
}
return False;
len = strlen(dir);
if (len + 2 >= PATH_MAX)
{ /* allow for '/' and at least one character */
- ERROR2("Path entry (%s) too long (maxiumum length is %d)\n",
+ ERROR("Path entry (%s) too long (maxiumum length is %d)\n",
dir, PATH_MAX - 3);
return False;
}
(char *) calloc(strlen(dir) + 1, sizeof(char));
if (includePath[nPathEntries] == NULL)
{
- WSGO1("Allocation failed (includePath[%d])\n", nPathEntries);
+ WSGO("Allocation failed (includePath[%d])\n", nPathEntries);
return False;
}
strcpy(includePath[nPathEntries++], dir);
if ((type == entry->type) && (uStringEqual(name, entry->name)))
{
void *old = entry->data;
- WSGO2("Replacing file cache entry (%s/%d)\n", name, type);
+ WSGO("Replacing file cache entry (%s/%d)\n", name, type);
entry->path = path;
entry->data = data;
return old;
if ((nameLen + typeLen + pathLen + 2) >= PATH_MAX)
{
- ERROR3("File name (%s/%s/%s) too long\n", includePath[i],
+ ERROR("File name (%s/%s/%s) too long\n", includePath[i],
typeDir, name);
ACTION("Ignored\n");
continue;