xkbcomp: Remove duplicated macros
parent
05daf09f18
commit
a27e56b6fb
|
@ -299,15 +299,15 @@ fieldText(unsigned field)
|
|||
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;
|
||||
|
@ -316,7 +316,7 @@ ReportIllegal(unsigned action, unsigned field)
|
|||
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;
|
||||
|
@ -325,8 +325,8 @@ ReportActionNotArray(unsigned action, unsigned field)
|
|||
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;
|
||||
}
|
||||
|
@ -497,9 +497,9 @@ CheckGroupField(unsigned action,
|
|||
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)
|
||||
|
@ -667,7 +667,7 @@ HandlePtrBtn(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
@ -693,7 +693,7 @@ HandlePtrBtn(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
@ -750,7 +750,7 @@ HandleSetPtrDflt(XkbcDescPtr xkb,
|
|||
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)
|
||||
|
@ -860,7 +860,7 @@ HandleSwitchScreen(XkbcDescPtr xkb,
|
|||
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)
|
||||
|
@ -995,7 +995,7 @@ HandleActionMessage(XkbcDescPtr xkb,
|
|||
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);
|
||||
}
|
||||
|
@ -1014,7 +1014,7 @@ HandleActionMessage(XkbcDescPtr xkb,
|
|||
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))
|
||||
|
@ -1022,7 +1022,7 @@ HandleActionMessage(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
@ -1106,7 +1106,7 @@ HandleDeviceBtn(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
@ -1132,7 +1132,7 @@ HandleDeviceBtn(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
@ -1148,7 +1148,7 @@ HandleDeviceBtn(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
@ -1187,7 +1187,7 @@ HandlePrivate(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
@ -1203,7 +1203,7 @@ HandlePrivate(XkbcDescPtr xkb,
|
|||
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);
|
||||
|
@ -1223,7 +1223,7 @@ HandlePrivate(XkbcDescPtr xkb,
|
|||
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))
|
||||
|
@ -1231,7 +1231,7 @@ HandlePrivate(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
@ -1306,7 +1306,7 @@ HandleActionDef(ExprDef * def,
|
|||
|
||||
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;
|
||||
}
|
||||
|
@ -1318,7 +1318,7 @@ HandleActionDef(ExprDef * def,
|
|||
}
|
||||
if (!stringToAction(str, &tmp))
|
||||
{
|
||||
ERROR1("Unknown action %s\n", str);
|
||||
ERROR("Unknown action %s\n", str);
|
||||
return False;
|
||||
}
|
||||
action->type = hndlrType = tmp;
|
||||
|
@ -1372,13 +1372,13 @@ HandleActionDef(ExprDef * def,
|
|||
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])
|
||||
|
@ -1417,14 +1417,14 @@ SetActionField(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
|
|
@ -39,7 +39,7 @@ HandleCollision(AliasInfo * old, AliasInfo * new)
|
|||
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");
|
||||
}
|
||||
|
@ -60,9 +60,9 @@ HandleCollision(AliasInfo * old, AliasInfo * new)
|
|||
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)
|
||||
|
@ -185,7 +185,7 @@ ApplyAliases(XkbcDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
|
|||
{
|
||||
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");
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ ApplyAliases(XkbcDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
|
|||
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));
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ ApplyAliases(XkbcDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
|
|||
#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
|
||||
|
|
|
@ -210,7 +210,7 @@ AddInterp(CompatInfo * info, SymInterpInfo * new)
|
|||
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;
|
||||
|
@ -247,8 +247,8 @@ AddInterp(CompatInfo * info, SymInterpInfo * 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;
|
||||
|
@ -276,8 +276,8 @@ AddGroupCompat(CompatInfo * info, unsigned group, GroupCompatInfo * newGC)
|
|||
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)
|
||||
|
@ -317,7 +317,7 @@ ResolveStateAndPredicate(ExprDef * expr,
|
|||
*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;
|
||||
}
|
||||
|
@ -690,9 +690,9 @@ HandleGroupCompatDef(GroupCompatDef * def,
|
|||
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;
|
||||
}
|
||||
|
@ -701,7 +701,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
|
|||
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;
|
||||
}
|
||||
|
@ -763,7 +763,7 @@ HandleCompatMapFile(XkbFile * file,
|
|||
info->errorCount++;
|
||||
break;
|
||||
default:
|
||||
WSGO1("Unexpected statement type %d in HandleCompatMapFile\n",
|
||||
WSGO("Unexpected statement type %d in HandleCompatMapFile\n",
|
||||
stmt->stmtType);
|
||||
break;
|
||||
}
|
||||
|
@ -773,7 +773,7 @@ HandleCompatMapFile(XkbFile * file,
|
|||
#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;
|
||||
}
|
||||
}
|
||||
|
@ -834,7 +834,7 @@ CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ ExprResolveLhs(ExprDef * expr,
|
|||
*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;
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ ExprResolveModIndex(ExprDef * expr,
|
|||
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;
|
||||
|
@ -307,7 +307,7 @@ ExprResolveModIndex(ExprDef * expr,
|
|||
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;
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ ExprResolveModIndex(ExprDef * expr,
|
|||
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:
|
||||
|
@ -351,12 +351,12 @@ ExprResolveModIndex(ExprDef * expr,
|
|||
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;
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ ExprResolveBoolean(ExprDef * expr,
|
|||
case ExprValue:
|
||||
if (expr->type != TypeBoolean)
|
||||
{
|
||||
ERROR1
|
||||
ERROR
|
||||
("Found constant of type %s where boolean was expected\n",
|
||||
exprTypeText(expr->type));
|
||||
return False;
|
||||
|
@ -421,7 +421,7 @@ ExprResolveBoolean(ExprDef * expr,
|
|||
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:
|
||||
|
@ -432,7 +432,7 @@ ExprResolveBoolean(ExprDef * expr,
|
|||
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;
|
||||
|
@ -460,13 +460,13 @@ ExprResolveBoolean(ExprDef * expr,
|
|||
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;
|
||||
|
@ -496,7 +496,7 @@ ExprResolveFloat(ExprDef * expr,
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
@ -511,7 +511,7 @@ ExprResolveFloat(ExprDef * expr,
|
|||
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:
|
||||
|
@ -522,7 +522,7 @@ ExprResolveFloat(ExprDef * expr,
|
|||
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;
|
||||
|
@ -579,7 +579,7 @@ ExprResolveFloat(ExprDef * expr,
|
|||
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;
|
||||
|
@ -616,7 +616,7 @@ ExprResolveInteger(ExprDef * expr,
|
|||
}
|
||||
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;
|
||||
|
@ -632,7 +632,7 @@ ExprResolveInteger(ExprDef * expr,
|
|||
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:
|
||||
|
@ -643,7 +643,7 @@ ExprResolveInteger(ExprDef * expr,
|
|||
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;
|
||||
|
@ -700,7 +700,7 @@ ExprResolveInteger(ExprDef * expr,
|
|||
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;
|
||||
|
@ -722,7 +722,7 @@ ExprResolveString(ExprDef * expr,
|
|||
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;
|
||||
}
|
||||
|
@ -740,7 +740,7 @@ ExprResolveString(ExprDef * expr,
|
|||
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:
|
||||
|
@ -751,7 +751,7 @@ ExprResolveString(ExprDef * expr,
|
|||
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;
|
||||
|
@ -791,7 +791,7 @@ ExprResolveString(ExprDef * expr,
|
|||
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;
|
||||
|
@ -808,7 +808,7 @@ ExprResolveString(ExprDef * expr,
|
|||
}
|
||||
return False;
|
||||
default:
|
||||
WSGO1("Unknown operator %d in ResolveString\n", expr->op);
|
||||
WSGO("Unknown operator %d in ResolveString\n", expr->op);
|
||||
break;
|
||||
}
|
||||
return False;
|
||||
|
@ -829,7 +829,7 @@ ExprResolveKeyName(ExprDef * expr,
|
|||
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;
|
||||
}
|
||||
|
@ -842,7 +842,7 @@ ExprResolveKeyName(ExprDef * expr,
|
|||
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:
|
||||
|
@ -853,7 +853,7 @@ ExprResolveKeyName(ExprDef * expr,
|
|||
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;
|
||||
|
@ -878,7 +878,7 @@ ExprResolveKeyName(ExprDef * expr,
|
|||
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;
|
||||
|
@ -895,7 +895,7 @@ ExprResolveKeyName(ExprDef * expr,
|
|||
}
|
||||
return False;
|
||||
default:
|
||||
WSGO1("Unknown operator %d in ResolveKeyName\n", expr->op);
|
||||
WSGO("Unknown operator %d in ResolveKeyName\n", expr->op);
|
||||
break;
|
||||
}
|
||||
return False;
|
||||
|
@ -908,7 +908,7 @@ ExprResolveEnum(ExprDef * expr, ExprResult * val_rtrn, LookupEntry * values)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -916,14 +916,14 @@ ExprResolveEnum(ExprDef * expr, ExprResult * val_rtrn, LookupEntry * values)
|
|||
(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++;
|
||||
}
|
||||
|
@ -948,7 +948,7 @@ ExprResolveMask(ExprDef * expr,
|
|||
case ExprValue:
|
||||
if (expr->type != TypeInt)
|
||||
{
|
||||
ERROR1
|
||||
ERROR
|
||||
("Found constant of type %s where a mask was expected\n",
|
||||
exprTypeText(expr->type));
|
||||
return False;
|
||||
|
@ -962,7 +962,7 @@ ExprResolveMask(ExprDef * expr,
|
|||
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:
|
||||
|
@ -973,7 +973,7 @@ ExprResolveMask(ExprDef * expr,
|
|||
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;
|
||||
|
@ -982,7 +982,7 @@ ExprResolveMask(ExprDef * expr,
|
|||
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:
|
||||
|
@ -1004,7 +1004,7 @@ ExprResolveMask(ExprDef * expr,
|
|||
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;
|
||||
|
@ -1029,12 +1029,12 @@ ExprResolveMask(ExprDef * expr,
|
|||
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;
|
||||
|
|
|
@ -745,9 +745,9 @@ AddProperty(GeometryInfo * info, PropertyInfo * new)
|
|||
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)
|
||||
|
@ -758,8 +758,8 @@ AddProperty(GeometryInfo * info, PropertyInfo * new)
|
|||
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;
|
||||
|
@ -805,11 +805,11 @@ FindShape(GeometryInfo * info, Atom name, const char *type, const char *which)
|
|||
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");
|
||||
|
@ -833,7 +833,7 @@ AddShape(GeometryInfo * info, ShapeInfo * new)
|
|||
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;
|
||||
|
@ -843,7 +843,7 @@ AddShape(GeometryInfo * info, ShapeInfo * 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;
|
||||
|
@ -939,7 +939,7 @@ AddDoodad(SectionInfo * si, GeometryInfo * info, DoodadInfo * new)
|
|||
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");
|
||||
}
|
||||
|
@ -950,7 +950,7 @@ AddDoodad(SectionInfo * si, GeometryInfo * info, DoodadInfo * new)
|
|||
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");
|
||||
}
|
||||
|
@ -1022,7 +1022,7 @@ AddOverlay(SectionInfo * si, GeometryInfo * info, OverlayInfo * new)
|
|||
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");
|
||||
|
@ -1037,7 +1037,7 @@ AddOverlay(SectionInfo * si, GeometryInfo * info, OverlayInfo * new)
|
|||
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");
|
||||
}
|
||||
|
@ -1050,7 +1050,7 @@ AddOverlay(SectionInfo * si, GeometryInfo * info, OverlayInfo * new)
|
|||
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));
|
||||
}
|
||||
|
@ -1118,7 +1118,7 @@ AddSection(GeometryInfo * info, SectionInfo * new)
|
|||
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;
|
||||
|
@ -1128,7 +1128,7 @@ AddSection(GeometryInfo * info, SectionInfo * 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;
|
||||
|
@ -1790,9 +1790,9 @@ SetDoodadField(DoodadInfo * di,
|
|||
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;
|
||||
|
@ -1859,9 +1859,9 @@ SetDoodadField(DoodadInfo * di,
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -1892,9 +1892,9 @@ SetSectionField(SectionInfo * si,
|
|||
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;
|
||||
|
@ -2100,7 +2100,7 @@ SetGeometryProperty(GeometryInfo * info, char *property, ExprDef * value)
|
|||
{
|
||||
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;
|
||||
|
@ -2135,7 +2135,7 @@ HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
|
|||
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;
|
||||
}
|
||||
|
@ -2189,7 +2189,7 @@ HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -2209,15 +2209,15 @@ HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
|
|||
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;
|
||||
|
@ -2238,15 +2238,15 @@ HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
|
|||
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;
|
||||
|
@ -2295,7 +2295,7 @@ HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
|
|||
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;
|
||||
}
|
||||
|
@ -2365,7 +2365,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
|
||||
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;
|
||||
}
|
||||
|
@ -2373,7 +2373,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
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;
|
||||
|
@ -2394,7 +2394,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
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;
|
||||
|
@ -2416,7 +2416,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
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");
|
||||
}
|
||||
|
@ -2427,14 +2427,14 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
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");
|
||||
}
|
||||
|
@ -2442,7 +2442,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
@ -2495,9 +2495,9 @@ HandleDoodadDef(DoodadDef * def,
|
|||
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;
|
||||
|
@ -2520,7 +2520,7 @@ HandleOverlayDef(OverlayDef * def,
|
|||
|
||||
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;
|
||||
|
@ -2535,7 +2535,7 @@ HandleOverlayDef(OverlayDef * def,
|
|||
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;
|
||||
}
|
||||
|
@ -2579,7 +2579,7 @@ HandleComplexKey(KeyDef * def, KeyInfo * key, GeometryInfo * info)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
@ -2602,7 +2602,7 @@ HandleComplexKey(KeyDef * def, KeyInfo * key, GeometryInfo * info)
|
|||
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;
|
||||
|
@ -2620,7 +2620,7 @@ HandleRowBody(RowDef * def, RowInfo * row, unsigned merge,
|
|||
|
||||
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;
|
||||
}
|
||||
|
@ -2648,7 +2648,7 @@ HandleRowBody(RowDef * def, RowInfo * row, unsigned merge,
|
|||
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)
|
||||
|
@ -2660,7 +2660,7 @@ HandleRowBody(RowDef * def, RowInfo * row, unsigned merge,
|
|||
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;
|
||||
|
@ -2676,7 +2676,7 @@ HandleRowBody(RowDef * def, RowInfo * row, unsigned merge,
|
|||
}
|
||||
else
|
||||
{
|
||||
WSGO1("Unexpected statement (type %d) in row body\n",
|
||||
WSGO("Unexpected statement (type %d) in row body\n",
|
||||
keyDef->common.stmtType);
|
||||
return False;
|
||||
}
|
||||
|
@ -2727,7 +2727,7 @@ HandleSectionBody(SectionDef * def,
|
|||
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)
|
||||
|
@ -2753,16 +2753,16 @@ HandleSectionBody(SectionDef * def,
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
@ -2854,11 +2854,11 @@ HandleGeometryFile(XkbFile * file,
|
|||
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;
|
||||
}
|
||||
|
@ -2868,7 +2868,7 @@ HandleGeometryFile(XkbFile * file,
|
|||
#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;
|
||||
}
|
||||
}
|
||||
|
@ -2891,7 +2891,7 @@ CopyShapeDef(XkbGeometryPtr geom, ShapeInfo * si)
|
|||
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;
|
||||
|
@ -2901,7 +2901,7 @@ CopyShapeDef(XkbGeometryPtr geom, ShapeInfo * si)
|
|||
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;
|
||||
|
@ -2930,7 +2930,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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;
|
||||
|
@ -2946,7 +2946,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
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");
|
||||
|
@ -2963,7 +2963,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
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;
|
||||
}
|
||||
|
@ -2972,7 +2972,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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);
|
||||
|
@ -2981,7 +2981,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
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;
|
||||
}
|
||||
|
@ -2991,7 +2991,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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);
|
||||
|
@ -3002,7 +3002,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
return True;
|
||||
if (warningLevel < 9)
|
||||
{
|
||||
WARN1
|
||||
WARN
|
||||
("Text doodad %s has full and partial font definition\n",
|
||||
ddText(di));
|
||||
ACTION("Full specification ignored\n");
|
||||
|
@ -3014,8 +3014,8 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
@ -3023,8 +3023,8 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
@ -3032,8 +3032,8 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
@ -3041,8 +3041,8 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
@ -3050,8 +3050,8 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
@ -3059,8 +3059,8 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
@ -3068,8 +3068,8 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -3088,8 +3088,8 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
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;
|
||||
|
@ -3115,8 +3115,8 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
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;
|
||||
|
@ -3125,7 +3125,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
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;
|
||||
}
|
||||
|
@ -3137,7 +3137,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
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;
|
||||
}
|
||||
|
@ -3146,7 +3146,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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");
|
||||
}
|
||||
|
@ -3156,7 +3156,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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");
|
||||
}
|
||||
|
@ -3166,13 +3166,13 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
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;
|
||||
}
|
||||
|
@ -3185,7 +3185,7 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
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;
|
||||
}
|
||||
|
@ -3194,14 +3194,14 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -3263,9 +3263,9 @@ CopyDoodadDef(XkbGeometryPtr geom,
|
|||
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;
|
||||
|
@ -3368,7 +3368,7 @@ VerifyOverlayInfo(XkbGeometryPtr geom,
|
|||
{
|
||||
if (warningLevel > 0)
|
||||
{
|
||||
WARN3
|
||||
WARN
|
||||
("Key %s in section \"%s\" and overlay \"%s\"\n",
|
||||
XkbcKeyNameText(key->name.name),
|
||||
XkbcAtomText(section->name),
|
||||
|
@ -3386,7 +3386,7 @@ VerifyOverlayInfo(XkbGeometryPtr geom,
|
|||
}
|
||||
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),
|
||||
|
@ -3415,7 +3415,7 @@ VerifyOverlayInfo(XkbGeometryPtr geom,
|
|||
}
|
||||
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;
|
||||
|
@ -3455,7 +3455,7 @@ CopyOverlayDef(XkbGeometryPtr geom,
|
|||
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;
|
||||
}
|
||||
|
@ -3470,7 +3470,7 @@ CopyOverlayDef(XkbGeometryPtr geom,
|
|||
}
|
||||
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;
|
||||
|
@ -3505,7 +3505,7 @@ CopySectionDef(XkbGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
|
|||
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;
|
||||
|
@ -3520,7 +3520,7 @@ CopySectionDef(XkbGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
|
|||
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;
|
||||
|
@ -3531,16 +3531,16 @@ CopySectionDef(XkbGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
|
|||
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);
|
||||
|
|
|
@ -81,7 +81,7 @@ AddIndicatorMap(LEDInfo * oldLEDs, LEDInfo * new)
|
|||
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");
|
||||
}
|
||||
|
@ -133,9 +133,9 @@ AddIndicatorMap(LEDInfo * oldLEDs, LEDInfo * new)
|
|||
}
|
||||
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;
|
||||
|
@ -148,7 +148,7 @@ AddIndicatorMap(LEDInfo * oldLEDs, LEDInfo * new)
|
|||
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;
|
||||
}
|
||||
|
@ -300,9 +300,9 @@ SetIndicatorMapField(LEDInfo * led,
|
|||
"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;
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ SetIndicatorMapField(LEDInfo * led,
|
|||
}
|
||||
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;
|
||||
|
@ -347,10 +347,10 @@ HandleIndicatorMapDef(IndicatorMapDef * def,
|
|||
}
|
||||
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
|
||||
|
@ -476,7 +476,7 @@ BindIndicators(XkbcDescPtr xkb, Bool force, LEDInfo *unbound,
|
|||
if (led->indicator == _LED_NotBound)
|
||||
{
|
||||
ERROR("No unnamed indicators found\n");
|
||||
ACTION1
|
||||
ACTION
|
||||
("Virtual indicator map \"%s\" not bound\n",
|
||||
XkbcAtomGetString(led->name));
|
||||
continue;
|
||||
|
@ -510,9 +510,9 @@ BindIndicators(XkbcDescPtr xkb, Bool force, LEDInfo *unbound,
|
|||
(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;
|
||||
|
|
|
@ -168,7 +168,7 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
|
|||
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)
|
||||
|
@ -181,7 +181,7 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
|
|||
{
|
||||
action = "Identical definitions ignored\n";
|
||||
}
|
||||
ACTION2(action, (old->virtual ? "virtual" : "real"),
|
||||
ACTION(action, (old->virtual ? "virtual" : "real"),
|
||||
(old->virtual ? "real" : "virtual"));
|
||||
return True;
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
|
|||
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)
|
||||
{
|
||||
|
@ -221,7 +221,7 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
|
|||
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
|
||||
|
@ -246,7 +246,7 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
|
|||
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));
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
|
|||
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;
|
||||
}
|
||||
|
@ -331,8 +331,8 @@ AddKeyName(KeyNamesInfo * info,
|
|||
|
||||
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;
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ AddKeyName(KeyNamesInfo * info,
|
|||
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;
|
||||
|
@ -373,8 +373,8 @@ AddKeyName(KeyNamesInfo * info,
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -382,8 +382,8 @@ AddKeyName(KeyNamesInfo * info,
|
|||
{
|
||||
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;
|
||||
|
@ -399,16 +399,16 @@ AddKeyName(KeyNamesInfo * info,
|
|||
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");
|
||||
}
|
||||
|
@ -584,14 +584,14 @@ HandleKeycodeDef(KeycodeDef * stmt, unsigned merge, KeyNamesInfo * info)
|
|||
|
||||
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;
|
||||
}
|
||||
|
@ -626,8 +626,8 @@ HandleKeyNameVar(VarDef * stmt, KeyNamesInfo * info)
|
|||
|
||||
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)
|
||||
|
@ -637,34 +637,34 @@ HandleKeyNameVar(VarDef * stmt, KeyNamesInfo * info)
|
|||
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");
|
||||
|
@ -672,7 +672,7 @@ HandleKeyNameVar(VarDef * stmt, KeyNamesInfo * info)
|
|||
}
|
||||
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");
|
||||
|
@ -685,14 +685,14 @@ HandleKeyNameVar(VarDef * stmt, KeyNamesInfo * info)
|
|||
{
|
||||
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");
|
||||
|
@ -714,7 +714,7 @@ HandleIndicatorNameDef(IndicatorNameDef * def,
|
|||
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;
|
||||
}
|
||||
|
@ -786,14 +786,14 @@ HandleKeycodesFile(XkbFile * file,
|
|||
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;
|
||||
}
|
||||
|
@ -803,7 +803,7 @@ HandleKeycodesFile(XkbFile * file,
|
|||
#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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
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;
|
||||
}
|
||||
|
@ -87,14 +87,14 @@ CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
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;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
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;
|
||||
|
@ -127,11 +127,11 @@ CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
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)
|
||||
|
@ -165,12 +165,12 @@ CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -269,7 +269,7 @@ FindMatchingKeyType(KeyTypesInfo * info, KeyTypeInfo * new)
|
|||
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;
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ AddKeyType(XkbcDescPtr xkb, KeyTypesInfo * info, KeyTypeInfo * new)
|
|||
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");
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ AddKeyType(XkbcDescPtr xkb, KeyTypesInfo * info, KeyTypeInfo * new)
|
|||
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");
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ NextMapEntry(KeyTypeInfo * type)
|
|||
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;
|
||||
}
|
||||
|
@ -530,7 +530,7 @@ NextMapEntry(KeyTypeInfo * type)
|
|||
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;
|
||||
}
|
||||
|
@ -558,7 +558,7 @@ AddPreserve(XkbcDescPtr xkb,
|
|||
{
|
||||
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");
|
||||
}
|
||||
|
@ -567,19 +567,19 @@ AddPreserve(XkbcDescPtr xkb,
|
|||
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)
|
||||
{
|
||||
|
@ -591,8 +591,8 @@ AddPreserve(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
@ -633,13 +633,13 @@ AddMapEntry(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
@ -693,12 +693,12 @@ SetMapEntry(KeyTypeInfo * type,
|
|||
{
|
||||
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;
|
||||
|
@ -711,9 +711,9 @@ SetMapEntry(KeyTypeInfo * type,
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
@ -740,19 +740,19 @@ SetPreserve(KeyTypeInfo * type,
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -763,15 +763,15 @@ SetPreserve(KeyTypeInfo * type,
|
|||
{
|
||||
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);
|
||||
|
@ -789,7 +789,7 @@ AddLevelName(KeyTypeInfo * type,
|
|||
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;
|
||||
|
@ -801,7 +801,7 @@ AddLevelName(KeyTypeInfo * type,
|
|||
{
|
||||
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");
|
||||
}
|
||||
|
@ -814,12 +814,12 @@ AddLevelName(KeyTypeInfo * type,
|
|||
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;
|
||||
|
@ -842,7 +842,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
|
|||
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));
|
||||
|
@ -852,7 +852,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
|
|||
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;
|
||||
|
@ -896,10 +896,10 @@ SetKeyTypeField(KeyTypeInfo * type,
|
|||
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;
|
||||
|
@ -923,7 +923,7 @@ SetKeyTypeField(KeyTypeInfo * type,
|
|||
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;
|
||||
}
|
||||
|
@ -941,12 +941,12 @@ HandleKeyTypeVar(VarDef * stmt, XkbcDescPtr xkb, KeyTypesInfo * info)
|
|||
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");
|
||||
}
|
||||
|
@ -1105,7 +1105,7 @@ HandleKeyTypesFile(XkbFile * file,
|
|||
info->errorCount++;
|
||||
break;
|
||||
default:
|
||||
WSGO1("Unexpected statement type %d in HandleKeyTypesFile\n",
|
||||
WSGO("Unexpected statement type %d in HandleKeyTypesFile\n",
|
||||
stmt->stmtType);
|
||||
break;
|
||||
}
|
||||
|
@ -1115,7 +1115,7 @@ HandleKeyTypesFile(XkbFile * file,
|
|||
#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;
|
||||
}
|
||||
}
|
||||
|
@ -1157,7 +1157,7 @@ CopyDefToKeyType(XkbcDescPtr xkb, XkbKeyTypePtr type, KeyTypeInfo * def)
|
|||
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
|
||||
|
@ -1217,7 +1217,7 @@ CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ ProcessIncludeFile(IncludeStmt * stmt,
|
|||
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;
|
||||
|
@ -75,12 +75,12 @@ ProcessIncludeFile(IncludeStmt * stmt,
|
|||
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;
|
||||
|
@ -98,7 +98,7 @@ ProcessIncludeFile(IncludeStmt * stmt,
|
|||
}
|
||||
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;
|
||||
|
@ -106,16 +106,16 @@ ProcessIncludeFile(IncludeStmt * stmt,
|
|||
}
|
||||
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) */
|
||||
|
@ -131,16 +131,16 @@ ProcessIncludeFile(IncludeStmt * stmt,
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -148,31 +148,31 @@ int
|
|||
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;
|
||||
}
|
||||
|
@ -422,10 +422,10 @@ ComputeKbdDefaults(XkbcDescPtr xkb)
|
|||
{
|
||||
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",
|
||||
|
@ -438,8 +438,8 @@ ComputeKbdDefaults(XkbcDescPtr xkb)
|
|||
{
|
||||
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++);
|
||||
}
|
||||
}
|
||||
|
@ -511,7 +511,7 @@ FindNamedKey(XkbcDescPtr xkb,
|
|||
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;
|
||||
|
|
|
@ -709,7 +709,7 @@ IncludeCreate(char *str, unsigned merge)
|
|||
uFree(stmt);
|
||||
return first;
|
||||
BAIL:
|
||||
ERROR1("Illegal include statement \"%s\"\n", stmt);
|
||||
ERROR("Illegal include statement \"%s\"\n", stmt);
|
||||
ACTION("Ignored\n");
|
||||
while (first)
|
||||
{
|
||||
|
@ -766,9 +766,9 @@ CheckDefaultMap(XkbFile * maps)
|
|||
{
|
||||
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)"));
|
||||
}
|
||||
|
|
|
@ -359,7 +359,7 @@ MergeKeyGroups(SymbolsInfo * info,
|
|||
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;
|
||||
}
|
||||
|
@ -370,7 +370,7 @@ MergeKeyGroups(SymbolsInfo * info,
|
|||
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;
|
||||
}
|
||||
|
@ -405,10 +405,10 @@ MergeKeyGroups(SymbolsInfo * info,
|
|||
}
|
||||
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;
|
||||
|
@ -443,10 +443,10 @@ MergeKeyGroups(SymbolsInfo * info,
|
|||
}
|
||||
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));
|
||||
}
|
||||
|
@ -548,10 +548,10 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
|
|||
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));
|
||||
}
|
||||
|
@ -590,9 +590,9 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
|
|||
}
|
||||
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;
|
||||
|
@ -657,10 +657,10 @@ AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
|
|||
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;
|
||||
|
@ -683,9 +683,9 @@ AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
|
|||
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;
|
||||
|
@ -697,7 +697,7 @@ AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
|
|||
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;
|
||||
}
|
||||
|
@ -902,24 +902,24 @@ GetGroupIndex(KeyInfo * key,
|
|||
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;
|
||||
|
@ -944,15 +944,15 @@ AddSymbolsToKey(KeyInfo * key,
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
@ -960,7 +960,7 @@ AddSymbolsToKey(KeyInfo * key,
|
|||
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;
|
||||
|
@ -997,14 +997,14 @@ AddActionsToKey(KeyInfo * key,
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
@ -1020,7 +1020,7 @@ AddActionsToKey(KeyInfo * key,
|
|||
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;
|
||||
|
@ -1033,9 +1033,9 @@ AddActionsToKey(KeyInfo * key,
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
@ -1062,9 +1062,9 @@ SetAllowNone(KeyInfo * key, ExprDef * arrayNdx, ExprDef * value)
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
@ -1072,7 +1072,7 @@ SetAllowNone(KeyInfo * key, ExprDef * arrayNdx, ExprDef * value)
|
|||
}
|
||||
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;
|
||||
|
@ -1138,17 +1138,17 @@ SetSymbolsField(KeyInfo * key,
|
|||
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
|
||||
|
@ -1173,9 +1173,9 @@ SetSymbolsField(KeyInfo * key,
|
|||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
@ -1198,7 +1198,7 @@ SetSymbolsField(KeyInfo * key,
|
|||
(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;
|
||||
|
@ -1211,10 +1211,10 @@ SetSymbolsField(KeyInfo * key,
|
|||
}
|
||||
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 =
|
||||
|
@ -1247,7 +1247,7 @@ SetSymbolsField(KeyInfo * key,
|
|||
{
|
||||
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;
|
||||
|
@ -1257,7 +1257,7 @@ SetSymbolsField(KeyInfo * key,
|
|||
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;
|
||||
|
@ -1265,7 +1265,7 @@ SetSymbolsField(KeyInfo * key,
|
|||
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;
|
||||
|
@ -1288,7 +1288,7 @@ SetSymbolsField(KeyInfo * key,
|
|||
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;
|
||||
|
@ -1302,7 +1302,7 @@ SetSymbolsField(KeyInfo * key,
|
|||
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;
|
||||
|
@ -1319,7 +1319,7 @@ SetSymbolsField(KeyInfo * key,
|
|||
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;
|
||||
|
@ -1336,16 +1336,16 @@ SetSymbolsField(KeyInfo * key,
|
|||
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 =
|
||||
|
@ -1354,7 +1354,7 @@ SetSymbolsField(KeyInfo * key,
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
@ -1381,16 +1381,16 @@ SetGroupName(SymbolsInfo * info, ExprDef * arrayNdx, ExprDef * value)
|
|||
}
|
||||
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] =
|
||||
|
@ -1463,10 +1463,10 @@ HandleSymbolsVar(VarDef * stmt, XkbcDescPtr xkb, SymbolsInfo * info)
|
|||
}
|
||||
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);
|
||||
|
@ -1529,8 +1529,8 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
|
|||
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++)
|
||||
|
@ -1600,7 +1600,7 @@ HandleModMapDef(ModMapDef * def,
|
|||
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;
|
||||
}
|
||||
|
@ -1621,7 +1621,7 @@ HandleModMapDef(ModMapDef * def,
|
|||
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;
|
||||
}
|
||||
|
@ -1675,7 +1675,7 @@ HandleSymbolsFile(XkbFile * file,
|
|||
info->errorCount++;
|
||||
break;
|
||||
default:
|
||||
WSGO1("Unexpected statement type %d in HandleSymbolsFile\n",
|
||||
WSGO("Unexpected statement type %d in HandleSymbolsFile\n",
|
||||
stmt->stmtType);
|
||||
break;
|
||||
}
|
||||
|
@ -1685,7 +1685,7 @@ HandleSymbolsFile(XkbFile * file,
|
|||
#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;
|
||||
}
|
||||
}
|
||||
|
@ -1942,7 +1942,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
|
|||
{
|
||||
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");
|
||||
|
@ -1973,9 +1973,9 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
@ -1990,9 +1990,9 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
|
|||
{
|
||||
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;
|
||||
|
@ -2003,7 +2003,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
|
|||
{
|
||||
if (warningLevel > 0)
|
||||
{
|
||||
WARN4
|
||||
WARN
|
||||
("Type \"%s\" has %d levels, but %s has %d symbols\n",
|
||||
XkbcAtomText(type->name),
|
||||
(unsigned int) type->num_levels,
|
||||
|
@ -2025,7 +2025,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
|
|||
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;
|
||||
}
|
||||
|
@ -2034,7 +2034,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
|
|||
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;
|
||||
}
|
||||
|
@ -2094,10 +2094,10 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
|
|||
{
|
||||
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;
|
||||
|
@ -2139,10 +2139,10 @@ CopyModMapDef(XkbcDescPtr xkb, ModMapEntry *entry)
|
|||
{
|
||||
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;
|
||||
|
@ -2152,10 +2152,10 @@ CopyModMapDef(XkbcDescPtr xkb, ModMapEntry *entry)
|
|||
{
|
||||
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;
|
||||
|
@ -2247,7 +2247,7 @@ CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -105,12 +105,6 @@ extern void uFree(Opaque /* ptr */
|
|||
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
|
||||
|
@ -122,12 +116,6 @@ uInformation(const char * /* s */ , ...
|
|||
#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 */ , ...
|
||||
|
@ -138,12 +126,6 @@ uInformation(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 */ , ...
|
||||
|
@ -154,12 +136,6 @@ uInformation(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 */ , ...
|
||||
|
@ -170,12 +146,6 @@ uInformation(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 */ , ...
|
||||
|
@ -186,13 +156,7 @@ uInformation(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 */ , ...
|
||||
|
|
|
@ -105,21 +105,21 @@ HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
|
|||
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;
|
||||
|
@ -131,7 +131,7 @@ HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
|
|||
}
|
||||
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;
|
||||
|
@ -147,7 +147,7 @@ HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
|
|||
srv->vmods[nextFree] = mod.uval;
|
||||
return True;
|
||||
}
|
||||
ACTION1("Declaration of %s ignored\n",
|
||||
ACTION("Declaration of %s ignored\n",
|
||||
XkbcAtomText(stmt->name));
|
||||
return False;
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ ResolveVirtualModifier(ExprDef * def, ExprResult * val_rtrn, VModInfo * info)
|
|||
{
|
||||
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;
|
||||
|
|
|
@ -217,7 +217,7 @@ XkbAddDirectoryToPath(const char *dir)
|
|||
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;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ XkbAddDirectoryToPath(const char *dir)
|
|||
(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);
|
||||
|
@ -322,7 +322,7 @@ XkbAddFileToCache(char *name, unsigned type, char *path, void *data)
|
|||
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;
|
||||
|
@ -397,7 +397,7 @@ XkbFindFileInPath(char *name, unsigned type, char **pathRtrn)
|
|||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue