projects
/
platform
/
upstream
/
libxkbcommon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
05daf09
)
xkbcomp: Remove duplicated macros
author
Dan Nicholson
<dbn.lists@gmail.com>
Tue, 31 Mar 2009 14:21:20 +0000
(07:21 -0700)
committer
Dan Nicholson
<dbn.lists@gmail.com>
Tue, 31 Mar 2009 14:21:20 +0000
(07:21 -0700)
15 files changed:
src/xkbcomp/action.c
patch
|
blob
|
history
src/xkbcomp/alias.c
patch
|
blob
|
history
src/xkbcomp/compat.c
patch
|
blob
|
history
src/xkbcomp/expr.c
patch
|
blob
|
history
src/xkbcomp/geometry.c
patch
|
blob
|
history
src/xkbcomp/indicators.c
patch
|
blob
|
history
src/xkbcomp/keycodes.c
patch
|
blob
|
history
src/xkbcomp/keymap.c
patch
|
blob
|
history
src/xkbcomp/keytypes.c
patch
|
blob
|
history
src/xkbcomp/misc.c
patch
|
blob
|
history
src/xkbcomp/parseutils.c
patch
|
blob
|
history
src/xkbcomp/symbols.c
patch
|
blob
|
history
src/xkbcomp/utils.h
patch
|
blob
|
history
src/xkbcomp/vmod.c
patch
|
blob
|
history
src/xkbcomp/xkbpath.c
patch
|
blob
|
history
diff --git
a/src/xkbcomp/action.c
b/src/xkbcomp/action.c
index
b18b08c
..
8880299
100644
(file)
--- a/
src/xkbcomp/action.c
+++ b/
src/xkbcomp/action.c
@@
-299,15
+299,15
@@
fieldText(unsigned field)
static Bool
ReportMismatch(unsigned action, unsigned field, const char *type)
{
static Bool
ReportMismatch(unsigned action, unsigned field, const char *type)
{
- ERROR
2
("Value of %s field must be of type %s\n", fieldText(field), type);
- ACTION
1
("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)
{
return False;
}
static Bool
ReportIllegal(unsigned action, unsigned field)
{
- ERROR
2
("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;
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)
{
static Bool
ReportActionNotArray(unsigned action, unsigned field)
{
- ERROR
2
("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;
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)
{
static Bool
ReportNotFound(unsigned action, unsigned field, const char *what, char *bad)
{
- ERROR
2
("%s named %s not found\n", what, bad);
- ACTION
2
("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;
}
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))
{
return ReportMismatch(action, F_Group, "integer (range 1..8)");
if ((rtrn.ival < 1) || (rtrn.ival > XkbNumKbdGroups))
{
- ERROR
2
("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);
XkbNumKbdGroups);
- ACTION
1
("Action %s definition ignored\n", XkbcActionTypeText(action));
+ ACTION("Action %s definition ignored\n", XkbcActionTypeText(action));
return False;
}
if (value->op == OpNegate)
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");
if ((rtrn.ival < 0) || (rtrn.ival > 5))
{
ERROR("Button must specify default or be in the range 1..5\n");
- ACTION
1
("Illegal button value %d ignored\n", rtrn.ival);
+ ACTION("Illegal button value %d ignored\n", rtrn.ival);
return False;
}
act->button = 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");
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("The count field must have a value in the range 0..255\n");
- ACTION
1
("Illegal count %d ignored\n", rtrn.ival);
+ ACTION("Illegal count %d ignored\n", rtrn.ival);
return False;
}
act->count = 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");
if ((rtrn.ival < 0) || (rtrn.ival > 5))
{
ERROR("New default button value must be in the range 1..5\n");
- ACTION
1
("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)
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");
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("Screen index must be in the range 1..255\n");
- ACTION
1
("Illegal screen value %d ignored\n", rtrn.ival);
+ ACTION("Illegal screen value %d ignored\n", rtrn.ival);
return False;
}
if (value->op == OpNegate)
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");
if ((len < 1) || (len > 6))
{
WARN("An action message can hold only 6 bytes\n");
- ACTION
1
("Extra %d bytes ignored\n", len - 6);
+ ACTION("Extra %d bytes ignored\n", len - 6);
}
strncpy((char *) act->message, rtrn.str, 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");
if (ndx > 5)
{
ERROR("An action message is at most 6 bytes long\n");
- ACTION
1
("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))
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");
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("Message data must be in the range 0..255\n");
- ACTION
1
("Illegal datum %d ignored\n", rtrn.ival);
+ ACTION("Illegal datum %d ignored\n", rtrn.ival);
return False;
}
act->message[ndx] = rtrn.uval;
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");
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("Button must specify default or be in the range 1..255\n");
- ACTION
1
("Illegal button value %d ignored\n", rtrn.ival);
+ ACTION("Illegal button value %d ignored\n", rtrn.ival);
return False;
}
act->button = 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");
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("The count field must have a value in the range 0..255\n");
- ACTION
1
("Illegal count %d ignored\n", rtrn.ival);
+ ACTION("Illegal count %d ignored\n", rtrn.ival);
return False;
}
act->count = 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");
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("Device must specify default or be in the range 1..255\n");
- ACTION
1
("Illegal device value %d ignored\n", rtrn.ival);
+ ACTION("Illegal device value %d ignored\n", rtrn.ival);
return False;
}
act->device = 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");
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("Private action type must be in the range 0..255\n");
- ACTION
1
("Illegal type %d ignored\n", rtrn.ival);
+ ACTION("Illegal type %d ignored\n", rtrn.ival);
return False;
}
action->type = rtrn.uval;
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");
if ((len < 1) || (len > 7))
{
WARN("A private action has 7 data bytes\n");
- ACTION
1
("Extra %d bytes ignored\n", len - 6);
+ ACTION("Extra %d bytes ignored\n", len - 6);
return False;
}
strncpy((char *) action->data, rtrn.str, 7);
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");
if (ndx > 6)
{
ERROR("The data for a private action is 7 bytes long\n");
- ACTION
1
("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))
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");
if ((rtrn.ival < 0) || (rtrn.ival > 255))
{
ERROR("All data for a private action must be 0..255\n");
- ACTION
1
("Illegal datum %d ignored\n", rtrn.ival);
+ ACTION("Illegal datum %d ignored\n", rtrn.ival);
return False;
}
action->data[ndx] = rtrn.uval;
return False;
}
action->data[ndx] = rtrn.uval;
@@
-1306,7
+1306,7
@@
HandleActionDef(ExprDef * def,
if (def->op != ExprActionDecl)
{
if (def->op != ExprActionDecl)
{
- ERROR
1
("Expected an action definition, found %s\n",
+ ERROR("Expected an action definition, found %s\n",
exprOpText(def->op));
return False;
}
exprOpText(def->op));
return False;
}
@@
-1318,7
+1318,7
@@
HandleActionDef(ExprDef * def,
}
if (!stringToAction(str, &tmp))
{
}
if (!stringToAction(str, &tmp))
{
- ERROR
1
("Unknown action %s\n", str);
+ ERROR("Unknown action %s\n", str);
return False;
}
action->type = hndlrType = tmp;
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");
if (elemRtrn.str != NULL)
{
ERROR("Cannot change defaults in an action definition\n");
- ACTION
2
("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))
{
fieldRtrn.str);
return False;
}
if (!stringToField(fieldRtrn.str, &fieldNdx))
{
- ERROR
1
("Unknown field name %s\n", uStringText(fieldRtrn.str));
+ ERROR("Unknown field name %s\n", uStringText(fieldRtrn.str));
return False;
}
if (!(*handleAction[hndlrType])
return False;
}
if (!(*handleAction[hndlrType])
@@
-1417,14
+1417,14
@@
SetActionField(XkbcDescPtr xkb,
return False;
if (new->action == XkbSA_NoAction)
{
return False;
if (new->action == XkbSA_NoAction)
{
- ERROR
1
("\"%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))
{
field);
return False;
}
}
if (!stringToField(field, &new->field))
{
- ERROR
1
("\"%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;
return False;
}
new->array_ndx = array_ndx;
diff --git
a/src/xkbcomp/alias.c
b/src/xkbcomp/alias.c
index
9f41645
..
dc7f12b
100644
(file)
--- a/
src/xkbcomp/alias.c
+++ b/
src/xkbcomp/alias.c
@@
-39,7
+39,7
@@
HandleCollision(AliasInfo * old, AliasInfo * new)
if (((new->def.fileID == old->def.fileID) && (warningLevel > 0)) ||
(warningLevel > 9))
{
if (((new->def.fileID == old->def.fileID) && (warningLevel > 0)) ||
(warningLevel > 9))
{
- WARN
2
("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");
}
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))
{
if (((old->def.fileID == new->def.fileID) && (warningLevel > 0)) ||
(warningLevel > 9))
{
- WARN
1
("Multiple definitions for alias %s\n",
+ WARN("Multiple definitions for alias %s\n",
XkbcKeyNameText(old->alias));
XkbcKeyNameText(old->alias));
- ACTION
2
("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
XkbcKeyNameText(use), XkbcKeyNameText(ignore));
}
if (use != old->real)
XkbcKeyNameText(use), XkbcKeyNameText(ignore));
}
if (use != old->real)
@@
-185,7
+185,7
@@
ApplyAliases(XkbcDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
{
if (warningLevel > 4)
{
{
if (warningLevel > 4)
{
- WARN
2
("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");
}
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");
if (warningLevel > 4)
{
WARN("Attempt to create alias with the name of a real key\n");
- ACTION
2
("Alias \"%s = %s\" ignored\n",
+ ACTION("Alias \"%s = %s\" ignored\n",
XkbcKeyNameText(info->alias),
XkbcKeyNameText(info->real));
}
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))
{
#ifdef DEBUG
if ((a - old) != (nOld + nNew))
{
- WSGO
2
("Expected %d aliases total but created %d\n", nOld + nNew,
+ WSGO("Expected %d aliases total but created %d\n", nOld + nNew,
a - old);
}
#endif
a - old);
}
#endif
diff --git
a/src/xkbcomp/compat.c
b/src/xkbcomp/compat.c
index
427a033
..
991d28a
100644
(file)
--- a/
src/xkbcomp/compat.c
+++ b/
src/xkbcomp/compat.c
@@
-210,7
+210,7
@@
AddInterp(CompatInfo * info, SymInterpInfo * new)
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN
1
("Multiple definitions for \"%s\"\n", siText(new, info));
+ WARN("Multiple definitions for \"%s\"\n", siText(new, info));
ACTION("Earlier interpretation ignored\n");
}
*old = *new;
ACTION("Earlier interpretation ignored\n");
}
*old = *new;
@@
-247,8
+247,8
@@
AddInterp(CompatInfo * info, SymInterpInfo * new)
}
if (collide)
{
}
if (collide)
{
- WARN
1
("Multiple interpretations of \"%s\"\n", siText(new, info));
- ACTION
1
("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;
(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))
{
if (((gc->fileID == newGC->fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN
1
("Compat map for group %d redefined\n", group + 1);
- ACTION
1
("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)
(merge == MergeAugment ? "old" : "new"));
}
if (merge != MergeAugment)
@@
-317,7
+317,7
@@
ResolveStateAndPredicate(ExprDef * expr,
*pred_rtrn = XkbSI_Exactly;
else
{
*pred_rtrn = XkbSI_Exactly;
else
{
- ERROR
1
("Illegal modifier predicate \"%s\"\n", pred_txt);
+ ERROR("Illegal modifier predicate \"%s\"\n", pred_txt);
ACTION("Ignored\n");
return False;
}
ACTION("Ignored\n");
return False;
}
@@
-690,9
+690,9
@@
HandleGroupCompatDef(GroupCompatDef * def,
merge = def->merge;
if (!XkbIsLegalGroup(def->group - 1))
{
merge = def->merge;
if (!XkbIsLegalGroup(def->group - 1))
{
- ERROR
1
("Keyboard group must be in the range 1..%d\n",
+ ERROR("Keyboard group must be in the range 1..%d\n",
XkbNumKbdGroups + 1);
XkbNumKbdGroups + 1);
- ACTION
1
("Compatibility map for illegal group %d ignored\n",
+ ACTION("Compatibility map for illegal group %d ignored\n",
def->group);
return False;
}
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");
if (!ExprResolveModMask(def->def, &val, LookupVModMask, (char *) xkb))
{
ERROR("Expected a modifier mask in group compatibility definition\n");
- ACTION
1
("Ignoring illegal compatibility map for group %d\n",
+ ACTION("Ignoring illegal compatibility map for group %d\n",
def->group);
return False;
}
def->group);
return False;
}
@@
-763,7
+763,7
@@
HandleCompatMapFile(XkbFile * file,
info->errorCount++;
break;
default:
info->errorCount++;
break;
default:
- WSGO
1
("Unexpected statement type %d in HandleCompatMapFile\n",
+ WSGO("Unexpected statement type %d in HandleCompatMapFile\n",
stmt->stmtType);
break;
}
stmt->stmtType);
break;
}
@@
-773,7
+773,7
@@
HandleCompatMapFile(XkbFile * file,
#ifdef NOISY
ERROR("Too many errors\n");
#endif
#ifdef NOISY
ERROR("Too many errors\n");
#endif
- ACTION
1
("Abandoning compatibility map \"%s\"\n", file->topName);
+ ACTION("Abandoning compatibility map \"%s\"\n", file->topName);
break;
}
}
break;
}
}
@@
-834,7
+834,7
@@
CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
else
{
WSGO("Couldn't allocate space for compat name\n");
else
{
WSGO("Couldn't allocate space for compat name\n");
- ACTION
2
("Name \"%s\" (from %s) NOT assigned\n",
+ ACTION("Name \"%s\" (from %s) NOT assigned\n",
scanFile, info.name);
}
}
scanFile, info.name);
}
}
diff --git
a/src/xkbcomp/expr.c
b/src/xkbcomp/expr.c
index
38e15db
..
e0dc5e0
100644
(file)
--- a/
src/xkbcomp/expr.c
+++ b/
src/xkbcomp/expr.c
@@
-149,7
+149,7
@@
ExprResolveLhs(ExprDef * expr,
*index_rtrn = expr->value.array.entry;
return True;
}
*index_rtrn = expr->value.array.entry;
return True;
}
- WSGO
1
("Unexpected operator %d in ResolveLhs\n", expr->op);
+ WSGO("Unexpected operator %d in ResolveLhs\n", expr->op);
return False;
}
return False;
}
@@
-299,7
+299,7
@@
ExprResolveModIndex(ExprDef * expr,
case ExprValue:
if (expr->type != TypeInt)
{
case ExprValue:
if (expr->type != TypeInt)
{
- ERROR
1
+ ERROR
("Found constant of type %s where a modifier mask was expected\n",
exprTypeText(expr->type));
return False;
("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))
{
else if ((expr->value.ival >= XkbNumModifiers)
|| (expr->value.ival < 0))
{
- ERROR
2
("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;
}
expr->value.ival, XkbNumModifiers - 1);
return False;
}
@@
-325,7
+325,7
@@
ExprResolveModIndex(ExprDef * expr,
None, expr->value.str, TypeInt, val_rtrn);
}
if (!ok)
None, expr->value.str, TypeInt, val_rtrn);
}
if (!ok)
- ERROR
1
("Cannot determine modifier index for \"%s\"\n",
+ ERROR("Cannot determine modifier index for \"%s\"\n",
XkbcAtomText(expr->value.str));
break;
case ExprFieldRef:
XkbcAtomText(expr->value.str));
break;
case ExprFieldRef:
@@
-351,12
+351,12
@@
ExprResolveModIndex(ExprDef * expr,
bogus = "assignment";
break;
default:
bogus = "assignment";
break;
default:
- WSGO
1
("Unknown operator %d in ResolveModIndex\n", expr->op);
+ WSGO("Unknown operator %d in ResolveModIndex\n", expr->op);
return False;
}
if (bogus)
{
return False;
}
if (bogus)
{
- ERROR
1
("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;
}
bogus);
return False;
}
@@
-389,7
+389,7
@@
ExprResolveBoolean(ExprDef * expr,
case ExprValue:
if (expr->type != TypeBoolean)
{
case ExprValue:
if (expr->type != TypeBoolean)
{
- ERROR
1
+ ERROR
("Found constant of type %s where boolean was expected\n",
exprTypeText(expr->type));
return False;
("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)
None, expr->value.str, TypeBoolean, val_rtrn);
}
if (!ok)
- ERROR
1
("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:
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
@@
-432,7
+432,7
@@
ExprResolveBoolean(ExprDef * expr,
expr->value.field.field, TypeBoolean, val_rtrn);
}
if (!ok)
expr->value.field.field, TypeBoolean, val_rtrn);
}
if (!ok)
- ERROR
2
("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;
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";
case OpNegate:
if (bogus == NULL)
bogus = "Negation";
- ERROR
1
("%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:
break;
case OpUnaryPlus:
ERROR("Unary \"+\" operator not permitted for boolean values\n");
break;
default:
- WSGO
1
("Unknown operator %d in ResolveBoolean\n", expr->op);
+ WSGO("Unknown operator %d in ResolveBoolean\n", expr->op);
break;
}
return False;
break;
}
return False;
@@
-496,7
+496,7
@@
ExprResolveFloat(ExprDef * expr,
}
if ((expr->type != TypeInt) && (expr->type != TypeFloat))
{
}
if ((expr->type != TypeInt) && (expr->type != TypeFloat))
{
- ERROR
1
("Found constant of type %s, expected a number\n",
+ ERROR("Found constant of type %s, expected a number\n",
exprTypeText(expr->type));
return False;
}
exprTypeText(expr->type));
return False;
}
@@
-511,7
+511,7
@@
ExprResolveFloat(ExprDef * expr,
None, expr->value.str, TypeFloat, val_rtrn);
}
if (!ok)
None, expr->value.str, TypeFloat, val_rtrn);
}
if (!ok)
- ERROR
1
("Numeric identifier \"%s\" unknown\n",
+ ERROR("Numeric identifier \"%s\" unknown\n",
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
@@
-522,7
+522,7
@@
ExprResolveFloat(ExprDef * expr,
expr->value.field.field, TypeFloat, val_rtrn);
}
if (!ok)
expr->value.field.field, TypeFloat, val_rtrn);
}
if (!ok)
- ERROR
2
("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;
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:
left = expr->value.child;
return ExprResolveFloat(left, val_rtrn, lookup, lookupPriv);
default:
- WSGO
1
("Unknown operator %d in ResolveFloat\n", expr->op);
+ WSGO("Unknown operator %d in ResolveFloat\n", expr->op);
break;
}
return False;
break;
}
return False;
@@
-616,7
+616,7
@@
ExprResolveInteger(ExprDef * expr,
}
if ((expr->type != TypeInt) && (expr->type != TypeFloat))
{
}
if ((expr->type != TypeInt) && (expr->type != TypeFloat))
{
- ERROR
1
+ ERROR
("Found constant of type %s where an int was expected\n",
exprTypeText(expr->type));
return False;
("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)
None, expr->value.str, TypeInt, val_rtrn);
}
if (!ok)
- ERROR
1
("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:
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
@@
-643,7
+643,7
@@
ExprResolveInteger(ExprDef * expr,
expr->value.field.field, TypeInt, val_rtrn);
}
if (!ok)
expr->value.field.field, TypeInt, val_rtrn);
}
if (!ok)
- ERROR
2
("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;
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:
left = expr->value.child;
return ExprResolveInteger(left, val_rtrn, lookup, lookupPriv);
default:
- WSGO
1
("Unknown operator %d in ResolveInteger\n", expr->op);
+ WSGO("Unknown operator %d in ResolveInteger\n", expr->op);
break;
}
return False;
break;
}
return False;
@@
-722,7
+722,7
@@
ExprResolveString(ExprDef * expr,
case ExprValue:
if (expr->type != TypeString)
{
case ExprValue:
if (expr->type != TypeString)
{
- ERROR
1
("Found constant of type %s, expected a string\n",
+ ERROR("Found constant of type %s, expected a string\n",
exprTypeText(expr->type));
return False;
}
exprTypeText(expr->type));
return False;
}
@@
-740,7
+740,7
@@
ExprResolveString(ExprDef * expr,
None, expr->value.str, TypeString, val_rtrn);
}
if (!ok)
None, expr->value.str, TypeString, val_rtrn);
}
if (!ok)
- ERROR
1
("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:
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
@@
-751,7
+751,7
@@
ExprResolveString(ExprDef * expr,
expr->value.field.field, TypeString, val_rtrn);
}
if (!ok)
expr->value.field.field, TypeString, val_rtrn);
}
if (!ok)
- ERROR
2
("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;
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";
case OpInvert:
if (bogus == NULL)
bogus = "Bitwise complement";
- ERROR
1
("%s of string values not permitted\n", bogus);
+ ERROR("%s of string values not permitted\n", bogus);
return False;
case OpNot:
left = expr->value.child;
return False;
case OpNot:
left = expr->value.child;
@@
-808,7
+808,7
@@
ExprResolveString(ExprDef * expr,
}
return False;
default:
}
return False;
default:
- WSGO
1
("Unknown operator %d in ResolveString\n", expr->op);
+ WSGO("Unknown operator %d in ResolveString\n", expr->op);
break;
}
return False;
break;
}
return False;
@@
-829,7
+829,7
@@
ExprResolveKeyName(ExprDef * expr,
case ExprValue:
if (expr->type != TypeKeyName)
{
case ExprValue:
if (expr->type != TypeKeyName)
{
- ERROR
1
("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;
}
exprTypeText(expr->type));
return False;
}
@@
-842,7
+842,7
@@
ExprResolveKeyName(ExprDef * expr,
None, expr->value.str, TypeString, val_rtrn);
}
if (!ok)
None, expr->value.str, TypeString, val_rtrn);
}
if (!ok)
- ERROR
1
("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:
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
@@
-853,7
+853,7
@@
ExprResolveKeyName(ExprDef * expr,
expr->value.field.field, TypeString, val_rtrn);
}
if (!ok)
expr->value.field.field, TypeString, val_rtrn);
}
if (!ok)
- ERROR
2
("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;
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";
case OpInvert:
if (bogus == NULL)
bogus = "Bitwise complement";
- ERROR
1
("%s of key name values not permitted\n", bogus);
+ ERROR("%s of key name values not permitted\n", bogus);
return False;
case OpNot:
left = expr->value.binary.left;
return False;
case OpNot:
left = expr->value.binary.left;
@@
-895,7
+895,7
@@
ExprResolveKeyName(ExprDef * expr,
}
return False;
default:
}
return False;
default:
- WSGO
1
("Unknown operator %d in ResolveKeyName\n", expr->op);
+ WSGO("Unknown operator %d in ResolveKeyName\n", expr->op);
break;
}
return False;
break;
}
return False;
@@
-908,7
+908,7
@@
ExprResolveEnum(ExprDef * expr, ExprResult * val_rtrn, LookupEntry * values)
{
if (expr->op != ExprIdent)
{
{
if (expr->op != ExprIdent)
{
- ERROR
1
("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;
}
exprOpText(expr->op));
return False;
}
@@
-916,14
+916,14
@@
ExprResolveEnum(ExprDef * expr, ExprResult * val_rtrn, LookupEntry * values)
(unsigned) TypeInt, val_rtrn))
{
int nOut = 0;
(unsigned) TypeInt, val_rtrn))
{
int nOut = 0;
- ERROR
1
("Illegal identifier %s (expected one of: ",
+ ERROR("Illegal identifier %s (expected one of: ",
XkbcAtomText(expr->value.str));
while (values && values->name)
{
if (nOut != 0)
XkbcAtomText(expr->value.str));
while (values && values->name)
{
if (nOut != 0)
- INFO
1
(", %s", values->name);
+ INFO(", %s", values->name);
else
else
- INFO
1
("%s", values->name);
+ INFO("%s", values->name);
values++;
nOut++;
}
values++;
nOut++;
}
@@
-948,7
+948,7
@@
ExprResolveMask(ExprDef * expr,
case ExprValue:
if (expr->type != TypeInt)
{
case ExprValue:
if (expr->type != TypeInt)
{
- ERROR
1
+ ERROR
("Found constant of type %s where a mask was expected\n",
exprTypeText(expr->type));
return False;
("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)
None, expr->value.str, TypeInt, val_rtrn);
}
if (!ok)
- ERROR
1
("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:
XkbcAtomText(expr->value.str));
return ok;
case ExprFieldRef:
@@
-973,7
+973,7
@@
ExprResolveMask(ExprDef * expr,
expr->value.field.field, TypeInt, val_rtrn);
}
if (!ok)
expr->value.field.field, TypeInt, val_rtrn);
}
if (!ok)
- ERROR
2
("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;
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";
case ExprActionDecl:
if (bogus == NULL)
bogus = "function use";
- ERROR
1
("Unexpected %s in mask expression\n", bogus);
+ ERROR("Unexpected %s in mask expression\n", bogus);
ACTION("Expression ignored\n");
return False;
case OpAdd:
ACTION("Expression ignored\n");
return False;
case OpAdd:
@@
-1004,7
+1004,7
@@
ExprResolveMask(ExprDef * expr,
break;
case OpMultiply:
case OpDivide:
break;
case OpMultiply:
case OpDivide:
- ERROR
1
("Cannot %s masks\n",
+ ERROR("Cannot %s masks\n",
expr->op == OpDivide ? "divide" : "multiply");
ACTION("Illegal operation ignored\n");
return False;
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))
{
left = expr->value.child;
if (ExprResolveInteger(left, &leftRtrn, lookup, lookupPriv))
{
- ERROR
1
("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:
(expr->op == OpNegate ? "-" : "!"));
}
return False;
default:
- WSGO
1
("Unknown operator %d in ResolveMask\n", expr->op);
+ WSGO("Unknown operator %d in ResolveMask\n", expr->op);
break;
}
return False;
break;
}
return False;
diff --git
a/src/xkbcomp/geometry.c
b/src/xkbcomp/geometry.c
index
edde7c2
..
10bc9a7
100644
(file)
--- a/
src/xkbcomp/geometry.c
+++ b/
src/xkbcomp/geometry.c
@@
-745,9
+745,9
@@
AddProperty(GeometryInfo * info, PropertyInfo * new)
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN
1
("Multiple definitions for the \"%s\" property\n",
+ WARN("Multiple definitions for the \"%s\" property\n",
new->name);
new->name);
- ACTION
2
("Ignoring \"%s\", using \"%s\"\n", old->value,
+ ACTION("Ignoring \"%s\", using \"%s\"\n", old->value,
new->value);
}
if (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))
{
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN
1
("Multiple definitions for \"%s\" property\n", new->name);
- ACTION
2
("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;
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;
if (type != NULL)
{
old = info->shapes;
- WARN
3
("Unknown shape \"%s\" for %s %s\n",
+ WARN("Unknown shape \"%s\" for %s %s\n",
XkbcAtomText(name), type, which);
if (old)
{
XkbcAtomText(name), type, which);
if (old)
{
- ACTION
1
("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");
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))
{
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN
1
("Duplicate shape name \"%s\"\n", shText(old));
+ WARN("Duplicate shape name \"%s\"\n", shText(old));
ACTION("Using last definition\n");
}
*old = *new;
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))
{
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN
1
("Multiple shapes named \"%s\"\n", shText(old));
+ WARN("Multiple shapes named \"%s\"\n", shText(old));
ACTION("Using first definition\n");
}
return True;
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))
{
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN
1
("Multiple doodads named \"%s\"\n",
+ WARN("Multiple doodads named \"%s\"\n",
XkbcAtomText(old->name));
ACTION("Using last definition\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))
{
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN
1
("Multiple doodads named \"%s\"\n",
+ WARN("Multiple doodads named \"%s\"\n",
XkbcAtomText(old->name));
ACTION("Using first definition\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))
{
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN
2
+ WARN
("Multiple overlays named \"%s\" for section \"%s\"\n",
XkbcAtomText(old->name), XkbcAtomText(si->name));
ACTION("Using last definition\n");
("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))
{
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN
2
("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");
}
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");
if (warningLevel > 0)
{
WSGO("Couldn't allocate a new OverlayInfo\n");
- ACTION
2
+ ACTION
("Overlay \"%s\" in section \"%s\" will be incomplete\n",
XkbcAtomText(old->name), XkbcAtomText(si->name));
}
("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))
{
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN
1
("Duplicate shape name \"%s\"\n", shText(old));
+ WARN("Duplicate shape name \"%s\"\n", shText(old));
ACTION("Using last definition\n");
}
*old = *new;
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))
{
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN
1
("Multiple shapes named \"%s\"\n", shText(old));
+ WARN("Multiple shapes named \"%s\"\n", shText(old));
ACTION("Using first definition\n");
}
return True;
ACTION("Using first definition\n");
}
return True;
@@
-1790,9
+1790,9
@@
SetDoodadField(DoodadInfo * di,
if ((tmp.ival < 0) || (tmp.ival > XkbGeomMaxPriority))
{
info->errorCount++;
if ((tmp.ival < 0) || (tmp.ival > XkbGeomMaxPriority))
{
info->errorCount++;
- ERROR
2
("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);
tmp.ival, XkbGeomMaxPriority);
- ACTION
1
("Priority for doodad %s not changed", ddText(di));
+ ACTION("Priority for doodad %s not changed", ddText(di));
return False;
}
di->defs.defined |= _GD_Priority;
return False;
}
di->defs.defined |= _GD_Priority;
@@
-1859,9
+1859,9
@@
SetDoodadField(DoodadInfo * di,
case XkbLogoDoodad:
return SetLogoDoodadField(di, field, arrayNdx, value, si, info);
}
case XkbLogoDoodad:
return SetLogoDoodadField(di, field, arrayNdx, value, si, info);
}
- WSGO
1
("Unknown doodad type %d in SetDoodadField\n",
+ WSGO("Unknown doodad type %d in SetDoodadField\n",
(unsigned int) di->type);
(unsigned int) di->type);
- ACTION
2
("Definition of %s in %s ignored\n", field, ddText(di));
+ ACTION("Definition of %s in %s ignored\n", field, ddText(di));
return False;
}
return False;
}
@@
-1892,9
+1892,9
@@
SetSectionField(SectionInfo * si,
if ((tmp.ival < 0) || (tmp.ival > XkbGeomMaxPriority))
{
info->errorCount++;
if ((tmp.ival < 0) || (tmp.ival > XkbGeomMaxPriority))
{
info->errorCount++;
- ERROR
2
("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);
tmp.ival, XkbGeomMaxPriority);
- ACTION
1
("Priority for section %s not changed", scText(si));
+ ACTION("Priority for section %s not changed", scText(si));
return False;
}
si->priority = tmp.ival;
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");
{
info->errorCount++;
ERROR("Property values must be type string\n");
- ACTION
1
("Ignoring illegal definition of \"%s\" property\n", property);
+ ACTION("Ignoring illegal definition of \"%s\" property\n", property);
return False;
}
pi.value = result.str;
return False;
}
pi.value = result.str;
@@
-2135,7
+2135,7
@@
HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
if (ndx != NULL)
{
info->errorCount++;
if (ndx != NULL)
{
info->errorCount++;
- ERROR
1
("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;
}
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");
if (elem.str)
{
WARN("Assignment to field of unknown element\n");
- ACTION
2
("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;
}
return False;
}
@@
-2209,15
+2209,15
@@
HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
if (tmp.ival < 1)
{
WARN("Keyboard width must be positive\n");
if (tmp.ival < 1)
{
WARN("Keyboard width must be positive\n");
- ACTION
1
("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");
XkbcGeomFPText(tmp.ival));
return True;
}
if (info->widthMM != 0)
{
WARN("Keyboard width multiply defined\n");
- ACTION
1
("Using last definition (%s),", XkbcGeomFPText(tmp.ival));
- INFO
1
(" 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;
}
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");
if (tmp.ival < 1)
{
WARN("Keyboard height must be positive\n");
- ACTION
1
("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");
XkbcGeomFPText(tmp.ival));
return True;
}
if (info->heightMM != 0)
{
WARN("Keyboard height multiply defined\n");
- ACTION
1
("Using last definition (%s),", XkbcGeomFPText(tmp.ival));
- INFO
1
(" 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;
}
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++;
if ((tmp.ival < 40) || (tmp.ival > 2550))
{
info->errorCount++;
- ERROR
1
("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;
}
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)
{
if (def->nOutlines < 1)
{
- WARN
1
("Shape \"%s\" has no outlines\n", shText(si));
+ WARN("Shape \"%s\" has no outlines\n", shText(si));
ACTION("Definition ignored\n");
return True;
}
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)
{
si->outlines = uTypedCalloc(def->nOutlines, XkbOutlineRec);
if (!si->outlines)
{
- ERROR
1
("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;
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)
{
outline->points = uTypedCalloc(ol->nPoints, XkbPointRec);
if (!outline->points)
{
- ERROR
1
("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;
ACTION("Definition ignored\n");
info->errorCount++;
return False;
@@
-2416,7
+2416,7
@@
HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
si->approx = outline;
else
{
si->approx = outline;
else
{
- WARN
1
("Multiple approximations for \"%s\"\n",
+ WARN("Multiple approximations for \"%s\"\n",
shText(si));
ACTION("Treating all but the first as normal outlines\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
{
si->primary = outline;
else
{
- WARN
1
("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
{
shText(si));
ACTION("Treating all but the first as normal outlines\n");
}
}
else
{
- WARN
2
("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");
}
shText(si));
ACTION("Treated as a normal outline\n");
}
@@
-2442,7
+2442,7
@@
HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
}
if (nOut != si->nOutlines)
{
}
if (nOut != si->nOutlines)
{
- WSGO
2
("Expected %d outlines, got %d\n",
+ WSGO("Expected %d outlines, got %d\n",
(unsigned int) si->nOutlines, nOut);
si->nOutlines = nOut;
}
(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)
{
return 0; /* internal error, already reported */
if (elem.str != NULL)
{
- WARN
1
("Assignment to field of unknown element in doodad %s\n",
+ WARN("Assignment to field of unknown element in doodad %s\n",
ddText(&new));
ddText(&new));
- ACTION
2
("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;
}
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))
{
if ((def->nKeys < 1) && (warningLevel > 3))
{
- WARN
2
("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;
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");
if ((!key) && warningLevel > 0)
{
WSGO("Couldn't allocate OverlayKeyInfo\n");
- ACTION
2
("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;
}
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");
else
{
ERROR("Illegal element used in a key definition\n");
- ACTION
2
("Assignment to %s.%s ignored\n", elem.str, f.str);
+ ACTION("Assignment to %s.%s ignored\n", elem.str, f.str);
return False;
}
}
return False;
}
}
@@
-2602,7
+2602,7
@@
HandleComplexKey(KeyDef * def, KeyInfo * key, GeometryInfo * info)
break;
default:
ERROR("Cannot determine field for unnamed expression\n");
break;
default:
ERROR("Cannot determine field for unnamed expression\n");
- ACTION
3
("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;
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))
{
if ((def->nKeys < 1) && (warningLevel > 3))
{
- ERROR
1
("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;
}
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");
else
{
WARN("Assignment to field of unknown element in row\n");
- ACTION
2
("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)
}
}
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))
{
int len = strlen(keyDef->name);
if ((len < 1) || (len > XkbKeyNameLength))
{
- ERROR
2
("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;
keyDef->name, rowText(row));
ACTION("Section not compiled\n");
return False;
@@
-2676,7
+2676,7
@@
HandleRowBody(RowDef * def, RowInfo * row, unsigned merge,
}
else
{
}
else
{
- WSGO
1
("Unexpected statement (type %d) in row body\n",
+ WSGO("Unexpected statement (type %d) in row body\n",
keyDef->common.stmtType);
return False;
}
keyDef->common.stmtType);
return False;
}
@@
-2727,7
+2727,7
@@
HandleSectionBody(SectionDef * def,
else
{
WARN("Assignment to field of unknown element in section\n");
else
{
WARN("Assignment to field of unknown element in section\n");
- ACTION
2
("No value assigned to %s.%s\n", elem.str, field.str);
+ ACTION("No value assigned to %s.%s\n", elem.str, field.str);
}
}
else if (rowDef->common.stmtType == StmtRowDef)
}
}
else if (rowDef->common.stmtType == StmtRowDef)
@@
-2753,16
+2753,16
@@
HandleSectionBody(SectionDef * def,
}
else
{
}
else
{
- WSGO
1
("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)
{
rowDef->common.stmtType);
return False;
}
}
if (si->nRows != def->nRows)
{
- WSGO
2
("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);
(unsigned int) si->nRows);
- ACTION
1
("Definition of section %s might be incorrect\n", scText(si));
+ ACTION("Definition of section %s might be incorrect\n", scText(si));
}
return True;
}
}
return True;
}
@@
-2854,11
+2854,11
@@
HandleGeometryFile(XkbFile * file,
if (!failWhat)
failWhat = "key name";
ERROR("Interpretation files may not include other types\n");
if (!failWhat)
failWhat = "key name";
ERROR("Interpretation files may not include other types\n");
- ACTION
1
("Ignoring %s definition.\n", failWhat);
+ ACTION("Ignoring %s definition.\n", failWhat);
info->errorCount++;
break;
default:
info->errorCount++;
break;
default:
- WSGO
1
("Unexpected statement type %d in HandleGeometryFile\n",
+ WSGO("Unexpected statement type %d in HandleGeometryFile\n",
stmt->stmtType);
break;
}
stmt->stmtType);
break;
}
@@
-2868,7
+2868,7
@@
HandleGeometryFile(XkbFile * file,
#ifdef NOISY
ERROR("Too many errors\n");
#endif
#ifdef NOISY
ERROR("Too many errors\n");
#endif
- ACTION
1
("Abandoning geometry file \"%s\"\n", file->topName);
+ ACTION("Abandoning geometry file \"%s\"\n", file->topName);
break;
}
}
break;
}
}
@@
-2891,7
+2891,7
@@
CopyShapeDef(XkbGeometryPtr geom, ShapeInfo * si)
if (!shape)
{
WSGO("Couldn't allocate shape in geometry\n");
if (!shape)
{
WSGO("Couldn't allocate shape in geometry\n");
- ACTION
1
("Shape %s not compiled\n", shText(si));
+ ACTION("Shape %s not compiled\n", shText(si));
return False;
}
old_outline = si->outlines;
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");
if (!outline)
{
WSGO("Couldn't allocate outline in shape\n");
- ACTION
1
("Shape %s is incomplete\n", shText(si));
+ ACTION("Shape %s is incomplete\n", shText(si));
return False;
}
n = old_outline->num_points;
return False;
}
n = old_outline->num_points;
@@
-2930,7
+2930,7
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel < 9)
{
{
if (warningLevel < 9)
{
- ERROR
1
("No position defined for doodad %s\n",
+ ERROR("No position defined for doodad %s\n",
ddText(di));
ACTION("Illegal doodad ignored\n");
return False;
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)
{
case XkbSolidDoodad:
if ((di->defs.defined & _GD_Shape) == 0)
{
- ERROR
2
("No shape defined for %s doodad %s\n",
+ ERROR("No shape defined for %s doodad %s\n",
(di->type == XkbOutlineDoodad ? "outline" : "filled"),
ddText(di));
ACTION("Incomplete definition ignored\n");
(di->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
{
di->shape = si->name;
else
{
- ERROR
1
("No legal shape for %s\n", ddText(di));
+ ERROR("No legal shape for %s\n", ddText(di));
ACTION("Incomplete definition ignored\n");
return False;
}
ACTION("Incomplete definition ignored\n");
return False;
}
@@
-2972,7
+2972,7
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel > 5)
{
{
if (warningLevel > 5)
{
- WARN
1
("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);
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)
{
case XkbTextDoodad:
if ((di->defs.defined & _GD_Text) == 0)
{
- ERROR
1
("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;
}
ACTION("Illegal doodad definition ignored\n");
return False;
}
@@
-2991,7
+2991,7
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel > 5)
{
{
if (warningLevel > 5)
{
- WARN
1
("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);
ACTION("Using black\n");
}
di->color = XkbcInternAtom("black", False);
@@
-3002,7
+3002,7
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
return True;
if (warningLevel < 9)
{
return True;
if (warningLevel < 9)
{
- WARN
1
+ WARN
("Text doodad %s has full and partial font definition\n",
ddText(di));
ACTION("Full specification ignored\n");
("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)
{
{
if (warningLevel > 5)
{
- WARN
1
("No font specified for doodad %s\n", ddText(di));
- ACTION
1
("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);
}
}
di->font = XkbcInternAtom(DFLT_FONT, False);
}
@@
-3023,8
+3023,8
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel > 7)
{
{
if (warningLevel > 7)
{
- WARN
1
("No font slant for text doodad %s\n", ddText(di));
- ACTION
1
("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);
}
}
di->fontSlant = XkbcInternAtom(DFLT_SLANT, False);
}
@@
-3032,8
+3032,8
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel > 7)
{
{
if (warningLevel > 7)
{
- WARN
1
("No font weight for text doodad %s\n", ddText(di));
- ACTION
1
("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);
}
}
di->fontWeight = XkbcInternAtom(DFLT_WEIGHT, False);
}
@@
-3041,8
+3041,8
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel > 9)
{
{
if (warningLevel > 9)
{
- WARN
1
("No font set width for text doodad %s\n", ddText(di));
- ACTION
1
("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);
}
}
di->fontSetWidth = XkbcInternAtom(DFLT_SET_WIDTH, False);
}
@@
-3050,8
+3050,8
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel > 9)
{
{
if (warningLevel > 9)
{
- WARN
1
("No font variant for text doodad %s\n", ddText(di));
- ACTION
1
("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);
}
}
di->fontVariant = XkbcInternAtom(DFLT_VARIANT, False);
}
@@
-3059,8
+3059,8
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel > 7)
{
{
if (warningLevel > 7)
{
- WARN
1
("No font encoding for doodad %s\n", ddText(di));
- ACTION
1
("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);
}
}
di->fontEncoding = XkbcInternAtom(DFLT_ENCODING, False);
}
@@
-3068,8
+3068,8
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel > 7)
{
{
if (warningLevel > 7)
{
- WARN
1
("No font size for text doodad %s\n", ddText(di));
- ACTION
1
("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;
}
}
di->fontSize = DFLT_SIZE;
}
@@
-3088,8
+3088,8
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
size *= nLines;
if (warningLevel > 5)
{
size *= nLines;
if (warningLevel > 5)
{
- WARN
1
("No height for text doodad %s\n", ddText(di));
- ACTION
1
("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;
XkbcGeomFPText(size));
}
di->height = size;
@@
-3115,8
+3115,8
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
width *= (di->height * 2) / 3;
if (warningLevel > 5)
{
width *= (di->height * 2) / 3;
if (warningLevel > 5)
{
- WARN
1
("No width for text doodad %s\n", ddText(di));
- ACTION
1
("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;
XkbcGeomFPText(width));
}
di->width = width;
@@
-3125,7
+3125,7
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
case XkbIndicatorDoodad:
if ((di->defs.defined & _GD_Shape) == 0)
{
case XkbIndicatorDoodad:
if ((di->defs.defined & _GD_Shape) == 0)
{
- ERROR
1
("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;
}
ACTION("Incomplete definition ignored\n");
return False;
}
@@
-3137,7
+3137,7
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
di->shape = si->name;
else
{
di->shape = si->name;
else
{
- ERROR
1
("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;
}
ACTION("Incomplete definition ignored\n");
return False;
}
@@
-3146,7
+3146,7
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel > 5)
{
{
if (warningLevel > 5)
{
- WARN
1
("No \"on\" color for indicator doodad %s\n",
+ WARN("No \"on\" color for indicator doodad %s\n",
ddText(di));
ACTION("Using green\n");
}
ddText(di));
ACTION("Using green\n");
}
@@
-3156,7
+3156,7
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel > 5)
{
{
if (warningLevel > 5)
{
- WARN
1
("No \"off\" color for indicator doodad %s\n",
+ WARN("No \"off\" color for indicator doodad %s\n",
ddText(di));
ACTION("Using black\n");
}
ddText(di));
ACTION("Using black\n");
}
@@
-3166,13
+3166,13
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
case XkbLogoDoodad:
if (di->logoName == NULL)
{
case XkbLogoDoodad:
if (di->logoName == NULL)
{
- ERROR
1
("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)
{
ACTION("Incomplete definition ignored\n");
return False;
}
if ((di->defs.defined & _GD_Shape) == 0)
{
- ERROR
1
("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;
}
ACTION("Incomplete definition ignored\n");
return False;
}
@@
-3185,7
+3185,7
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
di->shape = si->name;
else
{
di->shape = si->name;
else
{
- ERROR
1
("No legal shape for %s\n", ddText(di));
+ ERROR("No legal shape for %s\n", ddText(di));
ACTION("Incomplete definition ignored\n");
return False;
}
ACTION("Incomplete definition ignored\n");
return False;
}
@@
-3194,14
+3194,14
@@
VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
{
if (warningLevel > 5)
{
{
if (warningLevel > 5)
{
- WARN
1
("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:
ACTION("Using black\n");
}
di->color = XkbcInternAtom("black", False);
}
break;
default:
- WSGO
1
("Uknown doodad type %d in VerifyDoodad\n",
+ WSGO("Uknown doodad type %d in VerifyDoodad\n",
(unsigned int) di->type);
return False;
}
(unsigned int) di->type);
return False;
}
@@
-3263,9
+3263,9
@@
CopyDoodadDef(XkbGeometryPtr geom,
doodad = XkbcAddGeomDoodad(geom, section, name);
if (!doodad)
{
doodad = XkbcAddGeomDoodad(geom, section, name);
if (!doodad)
{
- WSGO
1
("Couldn't allocate doodad in %s\n",
+ WSGO("Couldn't allocate doodad in %s\n",
(section ? "section" : "geometry"));
(section ? "section" : "geometry"));
- ACTION
1
("Cannot copy doodad %s\n", ddText(di));
+ ACTION("Cannot copy doodad %s\n", ddText(di));
return False;
}
doodad->any.type = di->type;
return False;
}
doodad->any.type = di->type;
@@
-3368,7
+3368,7
@@
VerifyOverlayInfo(XkbGeometryPtr geom,
{
if (warningLevel > 0)
{
{
if (warningLevel > 0)
{
- WARN
3
+ WARN
("Key %s in section \"%s\" and overlay \"%s\"\n",
XkbcKeyNameText(key->name.name),
XkbcAtomText(section->name),
("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))
{
}
if ((ki->sectionRow == _GOK_UnknownRow) && (warningLevel > 0))
{
- WARN
3
+ WARN
("Key %s not in \"%s\", but has an overlay key in \"%s\"\n",
XkbcKeyNameText(ki->under),
XkbcAtomText(section->name),
("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)
{
}
if (oi->nKeys < 1)
{
- ERROR
2
("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;
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)
{
ol = XkbcAddGeomOverlay(section, name, oi->nRows);
if (!ol)
{
- WSGO
2
("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;
}
XkbcAtomText(name), XkbcAtomText(section->name));
return False;
}
@@
-3470,7
+3470,7
@@
CopyOverlayDef(XkbGeometryPtr geom,
}
if (!XkbcAddGeomOverlayRow(ol, row_under, rowSize[i]))
{
}
if (!XkbcAddGeomOverlayRow(ol, row_under, rowSize[i]))
{
- WSGO
3
+ WSGO
("Can't add row %d to overlay \"%s\" of section \"%s\"\n",
i, XkbcAtomText(name), XkbcAtomText(section->name));
return False;
("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");
if (section == NULL)
{
WSGO("Couldn't allocate section in geometry\n");
- ACTION
1
("Section %s not compiled\n", scText(si));
+ ACTION("Section %s not compiled\n", scText(si));
return False;
}
section->top = si->top;
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");
if (row == NULL)
{
WSGO("Couldn't allocate row in section\n");
- ACTION
1
("Section %s is incomplete\n", scText(si));
+ ACTION("Section %s is incomplete\n", scText(si));
return False;
}
row->top = ri->top;
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)
{
XkbColorPtr color;
if ((ki->defs.defined & _GK_Name) == 0)
{
- ERROR
3
("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));
(int) ki->index, (int) ri->index, scText(si));
- ACTION
1
("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");
return False;
}
key = XkbcAddGeomKey(row);
if (key == NULL)
{
WSGO("Couldn't allocate key in row\n");
- ACTION
1
("Section %s is incomplete\n", scText(si));
+ ACTION("Section %s is incomplete\n", scText(si));
return False;
}
memcpy(key->name.name, ki->name, XkbKeyNameLength);
return False;
}
memcpy(key->name.name, ki->name, XkbKeyNameLength);
diff --git
a/src/xkbcomp/indicators.c
b/src/xkbcomp/indicators.c
index
adcd0fd
..
14c55ea
100644
(file)
--- a/
src/xkbcomp/indicators.c
+++ b/
src/xkbcomp/indicators.c
@@
-81,7
+81,7
@@
AddIndicatorMap(LEDInfo * oldLEDs, LEDInfo * new)
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN
1
("Map for indicator %s redefined\n",
+ WARN("Map for indicator %s redefined\n",
XkbcAtomText(old->name));
ACTION("Earlier definition ignored\n");
}
XkbcAtomText(old->name));
ACTION("Earlier definition ignored\n");
}
@@
-133,9
+133,9
@@
AddIndicatorMap(LEDInfo * oldLEDs, LEDInfo * new)
}
if (collide)
{
}
if (collide)
{
- WARN
1
("Map for indicator %s redefined\n",
+ WARN("Map for indicator %s redefined\n",
XkbcAtomText(old->name));
XkbcAtomText(old->name));
- ACTION
1
("Using %s definition for duplicate fields\n",
+ ACTION("Using %s definition for duplicate fields\n",
(new->defs.merge == MergeAugment ? "first" : "last"));
}
return oldLEDs;
(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");
if (!old)
{
WSGO("Couldn't allocate indicator map\n");
- ACTION
1
("Map for indicator %s not compiled\n",
+ ACTION("Map for indicator %s not compiled\n",
XkbcAtomText(new->name));
return NULL;
}
XkbcAtomText(new->name));
return NULL;
}
@@
-300,9
+300,9
@@
SetIndicatorMapField(LEDInfo * led,
"indicator index");
if ((rtrn.uval < 1) || (rtrn.uval > 32))
{
"indicator index");
if ((rtrn.uval < 1) || (rtrn.uval > 32))
{
- ERROR
2
("Illegal indicator index %d (range 1..%d)\n",
+ ERROR("Illegal indicator index %d (range 1..%d)\n",
rtrn.uval, XkbNumIndicators);
rtrn.uval, XkbNumIndicators);
- ACTION
1
("Index definition for %s indicator ignored\n",
+ ACTION("Index definition for %s indicator ignored\n",
XkbcAtomText(led->name));
return False;
}
XkbcAtomText(led->name));
return False;
}
@@
-311,7
+311,7
@@
SetIndicatorMapField(LEDInfo * led,
}
else
{
}
else
{
- ERROR
2
("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;
XkbcAtomText(led->name));
ACTION("Definition ignored\n");
ok = False;
@@
-347,10
+347,10
@@
HandleIndicatorMapDef(IndicatorMapDef * def,
}
if (elem.str != NULL)
{
}
if (elem.str != NULL)
{
- ERROR
1
+ ERROR
("Cannot set defaults for \"%s\" element in indicator map\n",
elem.str);
("Cannot set defaults for \"%s\" element in indicator map\n",
elem.str);
- ACTION
2
("Assignment to %s.%s ignored\n", elem.str, field.str);
+ ACTION("Assignment to %s.%s ignored\n", elem.str, field.str);
ok = False;
}
else
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");
if (led->indicator == _LED_NotBound)
{
ERROR("No unnamed indicators found\n");
- ACTION
1
+ ACTION
("Virtual indicator map \"%s\" not bound\n",
XkbcAtomGetString(led->name));
continue;
("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];
(xkb->names->indicators[led->indicator - 1] != led->name))
{
Atom old = xkb->names->indicators[led->indicator - 1];
- ERROR
1
("Multiple names bound to indicator %d\n",
+ ERROR("Multiple names bound to indicator %d\n",
(unsigned int) led->indicator);
(unsigned int) led->indicator);
- ACTION
2
("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
XkbcAtomGetString(old),
XkbcAtomGetString(led->name));
led->indicator = _LED_NotBound;
XkbcAtomGetString(old),
XkbcAtomGetString(led->name));
led->indicator = _LED_NotBound;
diff --git
a/src/xkbcomp/keycodes.c
b/src/xkbcomp/keycodes.c
index
82cff8f
..
0b4439a
100644
(file)
--- a/
src/xkbcomp/keycodes.c
+++ b/
src/xkbcomp/keycodes.c
@@
-168,7
+168,7
@@
AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN
1
("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)
if (old->ndx == new->ndx)
{
if (old->virtual != new->virtual)
@@
-181,7
+181,7
@@
AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
{
action = "Identical definitions ignored\n";
}
{
action = "Identical definitions ignored\n";
}
- ACTION
2
(action, (old->virtual ? "virtual" : "real"),
+ ACTION(action, (old->virtual ? "virtual" : "real"),
(old->virtual ? "real" : "virtual"));
return True;
}
(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";
action = "Ignoring %d, using %d\n";
else
action = "Using %d, ignoring %d\n";
- ACTION
2
(action, old->ndx, new->ndx);
+ ACTION(action, old->ndx, new->ndx);
}
if (replace)
{
}
if (replace)
{
@@
-221,7
+221,7
@@
AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0))
|| (warningLevel > 9))
{
- WARN
1
("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
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;
}
using = old->name;
ignoring = new->name;
}
- ACTION
4
("Using %s %s, ignoring %s %s\n",
+ ACTION("Using %s %s, ignoring %s %s\n",
oldType, XkbcAtomText(using),
newType, XkbcAtomText(ignoring));
}
oldType, XkbcAtomText(using),
newType, XkbcAtomText(ignoring));
}
@@
-262,7
+262,7
@@
AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
new = NextIndicatorName(info);
if (!new)
{
new = NextIndicatorName(info);
if (!new)
{
- WSGO
1
("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;
}
ACTION("Ignored\n");
return False;
}
@@
-331,8
+331,8
@@
AddKeyName(KeyNamesInfo * info,
if ((kc < info->effectiveMin) || (kc > info->effectiveMax))
{
if ((kc < info->effectiveMin) || (kc > info->effectiveMax))
{
- ERROR
2
("Illegal keycode %d for name <%s>\n", kc, name);
- ACTION
2
("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;
}
info->effectiveMin, info->effectiveMax);
return False;
}
@@
-364,7
+364,7
@@
AddKeyName(KeyNamesInfo * info,
else if (reportCollisions)
{
WARN("Multiple identical key name definitions\n");
else if (reportCollisions)
{
WARN("Multiple identical key name definitions\n");
- ACTION
2
("Later occurences of \"<%s> = %d\" ignored\n",
+ ACTION("Later occurences of \"<%s> = %d\" ignored\n",
buf, kc);
}
return True;
buf, kc);
}
return True;
@@
-373,8
+373,8
@@
AddKeyName(KeyNamesInfo * info,
{
if (reportCollisions)
{
{
if (reportCollisions)
{
- WARN
1
("Multiple names for keycode %d\n", kc);
- ACTION
2
("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;
}
}
return True;
}
@@
-382,8
+382,8
@@
AddKeyName(KeyNamesInfo * info,
{
if (reportCollisions)
{
{
if (reportCollisions)
{
- WARN
1
("Multiple names for keycode %d\n", kc);
- ACTION
2
("Using <%s>, ignoring <%s>\n", name, buf);
+ WARN("Multiple names for keycode %d\n", kc);
+ ACTION("Using <%s>, ignoring <%s>\n", name, buf);
}
info->names[kc] = 0;
info->files[kc] = 0;
}
info->names[kc] = 0;
info->files[kc] = 0;
@@
-399,16
+399,16
@@
AddKeyName(KeyNamesInfo * info,
info->has_alt_forms[old] = True;
if (reportCollisions)
{
info->has_alt_forms[old] = True;
if (reportCollisions)
{
- WARN
1
("Key name <%s> assigned to multiple keys\n", name);
- ACTION
2
("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))
{
}
}
else if (merge != MergeAltForm)
{
if ((reportCollisions) && (warningLevel > 3))
{
- WARN
1
("Key name <%s> assigned to multiple keys\n", name);
- ACTION
2
("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");
}
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))
{
if (!ExprResolveInteger(stmt->value, &result, NULL, NULL))
{
- ACTION
1
("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))
{
return 0;
}
code = result.ival;
if ((code < info->effectiveMin) || (code > info->effectiveMax))
{
- ERROR
2
("Illegal keycode %d for name <%s>\n", code, stmt->name);
- ACTION
2
("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;
}
info->effectiveMin, info->effectiveMax);
return 0;
}
@@
-626,8
+626,8
@@
HandleKeyNameVar(VarDef * stmt, KeyNamesInfo * info)
if (tmp.str != NULL)
{
if (tmp.str != NULL)
{
- ERROR
1
("Unknown element %s encountered\n", tmp.str);
- ACTION
1
("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)
return 0;
}
if (uStrCaseCmp(field.str, "minimum") == 0)
@@
-637,34
+637,34
@@
HandleKeyNameVar(VarDef * stmt, KeyNamesInfo * info)
else
{
ERROR("Unknown field encountered\n");
else
{
ERROR("Unknown field encountered\n");
- ACTION
1
("Assigment to field %s ignored\n", field.str);
+ ACTION("Assigment to field %s ignored\n", field.str);
return 0;
}
if (arrayNdx != NULL)
{
return 0;
}
if (arrayNdx != NULL)
{
- ERROR
1
("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)
{
ACTION("Illegal array reference ignored\n");
return 0;
}
if (ExprResolveInteger(stmt->value, &tmp, NULL, NULL) == 0)
{
- ACTION
1
("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))
{
return 0;
}
if ((tmp.ival < XkbMinLegalKeyCode) || (tmp.ival > XkbMaxLegalKeyCode))
{
- ERROR
3
+ ERROR
("Illegal keycode %d (must be in the range %d-%d inclusive)\n",
tmp.ival, XkbMinLegalKeyCode, XkbMaxLegalKeyCode);
("Illegal keycode %d (must be in the range %d-%d inclusive)\n",
tmp.ival, XkbMinLegalKeyCode, XkbMaxLegalKeyCode);
- ACTION
1
("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))
{
return 0;
}
if (which == MIN_KEYCODE_DEF)
{
if ((info->explicitMax > 0) && (info->explicitMax < tmp.ival))
{
- ERROR
2
+ ERROR
("Minimum key code (%d) must be <= maximum key code (%d)\n",
tmp.ival, info->explicitMax);
ACTION("Minimum key code value not changed\n");
("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))
{
}
if ((info->computedMax > 0) && (info->computedMin < tmp.ival))
{
- ERROR
2
+ ERROR
("Minimum key code (%d) must be <= lowest defined key (%d)\n",
tmp.ival, info->computedMin);
ACTION("Minimum key code value not changed\n");
("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))
{
{
if ((info->explicitMin > 0) && (info->explicitMin > tmp.ival))
{
- ERROR
2
("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))
{
tmp.ival, info->explicitMin);
ACTION("Maximum code value not changed\n");
return 0;
}
if ((info->computedMax > 0) && (info->computedMax > tmp.ival))
{
- ERROR
2
+ ERROR
("Maximum code (%d) must be >= highest defined key (%d)\n",
tmp.ival, info->computedMax);
ACTION("Maximum code value not changed\n");
("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++;
if ((def->ndx < 1) || (def->ndx > XkbNumIndicators))
{
info->errorCount++;
- ERROR
1
("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;
}
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");
case StmtInterpDef:
case StmtVModDef:
ERROR("Keycode files may define key and indicator names only\n");
- ACTION
1
("Ignoring definition of %s\n",
+ ACTION("Ignoring definition of %s\n",
((stmt->stmtType ==
StmtInterpDef) ? "a symbol interpretation" :
"virtual modifiers"));
info->errorCount++;
break;
default:
((stmt->stmtType ==
StmtInterpDef) ? "a symbol interpretation" :
"virtual modifiers"));
info->errorCount++;
break;
default:
- WSGO
1
("Unexpected statement type %d in HandleKeycodesFile\n",
+ WSGO("Unexpected statement type %d in HandleKeycodesFile\n",
stmt->stmtType);
break;
}
stmt->stmtType);
break;
}
@@
-803,7
+803,7
@@
HandleKeycodesFile(XkbFile * file,
#ifdef NOISY
ERROR("Too many errors\n");
#endif
#ifdef NOISY
ERROR("Too many errors\n");
#endif
- ACTION
1
("Abandoning keycodes file \"%s\"\n", file->topName);
+ ACTION("Abandoning keycodes file \"%s\"\n", file->topName);
break;
}
}
break;
}
}
diff --git
a/src/xkbcomp/keymap.c
b/src/xkbcomp/keymap.c
index
927dd95
..
ac686d0
100644
(file)
--- a/
src/xkbcomp/keymap.c
+++ b/
src/xkbcomp/keymap.c
@@
-74,7
+74,7
@@
CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
legal = XkmKeymapLegal;
break;
default:
legal = XkmKeymapLegal;
break;
default:
- ERROR
1
("Cannot compile %s alone into an XKM file\n",
+ ERROR("Cannot compile %s alone into an XKM file\n",
XkbcConfigText(mainType));
return False;
}
XkbcConfigText(mainType));
return False;
}
@@
-87,14
+87,14
@@
CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
file->topName = mainName;
if ((have & (1 << file->type)) != 0)
{
file->topName = mainName;
if ((have & (1 << file->type)) != 0)
{
- ERROR
2
("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))
{
XkbcConfigText(file->type), XkbcConfigText(mainType));
ACTION("All sections after the first ignored\n");
ok = False;
}
else if ((1 << file->type) & (~legal))
{
- ERROR
2
("Cannot define %s in a %s file\n",
+ ERROR("Cannot define %s in a %s file\n",
XkbcConfigText(file->type), XkbcConfigText(mainType));
ok = False;
}
XkbcConfigText(file->type), XkbcConfigText(mainType));
ok = False;
}
@@
-104,7
+104,7
@@
CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
case XkmSemanticsFile:
case XkmLayoutFile:
case XkmKeymapFile:
case XkmSemanticsFile:
case XkmLayoutFile:
case XkmKeymapFile:
- WSGO
2
("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;
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:
break;
case XkmVirtualModsIndex:
case XkmIndicatorsIndex:
- WSGO
1
("Found an isolated %s section\n",
+ WSGO("Found an isolated %s section\n",
XkbcConfigText(file->type));
break;
default:
XkbcConfigText(file->type));
break;
default:
- WSGO
1
("Unknown file type %d\n", file->type);
+ WSGO("Unknown file type %d\n", file->type);
break;
}
if (ok)
break;
}
if (ok)
@@
-165,12
+165,12
@@
CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
{
if (missing & bit)
{
{
if (missing & bit)
{
- ERROR
2
("Missing %s section in a %s file\n",
+ ERROR("Missing %s section in a %s file\n",
XkbcConfigText(i), XkbcConfigText(mainType));
missing &= ~bit;
}
}
XkbcConfigText(i), XkbcConfigText(mainType));
missing &= ~bit;
}
}
- ACTION
1
("Description of %s not compiled\n",
+ ACTION("Description of %s not compiled\n",
XkbcConfigText(mainType));
ok = False;
}
XkbcConfigText(mainType));
ok = False;
}
diff --git
a/src/xkbcomp/keytypes.c
b/src/xkbcomp/keytypes.c
index
708ec9a
..
abadfdf
100644
(file)
--- a/
src/xkbcomp/keytypes.c
+++ b/
src/xkbcomp/keytypes.c
@@
-269,7
+269,7
@@
FindMatchingKeyType(KeyTypesInfo * info, KeyTypeInfo * new)
static Bool
ReportTypeBadWidth(const char *type, int has, int needs)
{
static Bool
ReportTypeBadWidth(const char *type, int has, int needs)
{
- ERROR
3
("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;
}
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))
{
if (((old->defs.fileID == new->defs.fileID)
&& (warningLevel > 0)) || (warningLevel > 9))
{
- WARN
1
("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");
}
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)
{
report = (old->defs.fileID == new->defs.fileID) && (warningLevel > 0);
if (report)
{
- WARN
1
("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");
}
XkbcAtomGetString(new->name));
ACTION("Later definition ignored\n");
}
@@
-515,7
+515,7
@@
NextMapEntry(KeyTypeInfo * type)
type->entries = uTypedCalloc(2, XkbKTMapEntryRec);
if (type->entries == NULL)
{
type->entries = uTypedCalloc(2, XkbKTMapEntryRec);
if (type->entries == NULL)
{
- ERROR
1
("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;
}
ACTION("Map entries lost\n");
return NULL;
}
@@
-530,7
+530,7
@@
NextMapEntry(KeyTypeInfo * type)
XkbKTMapEntryRec);
if (type->entries == NULL)
{
XkbKTMapEntryRec);
if (type->entries == NULL)
{
- ERROR
1
("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;
}
ACTION("Map entries lost\n");
return NULL;
}
@@
-558,7
+558,7
@@
AddPreserve(XkbcDescPtr xkb,
{
if (warningLevel > 9)
{
{
if (warningLevel > 9)
{
- WARN
2
("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");
}
PreserveIndexTxt(xkb, old), TypeTxt(type));
ACTION("Ignored\n");
}
@@
-567,19
+567,19
@@
AddPreserve(XkbcDescPtr xkb,
if (report && (warningLevel > 0))
{
char *str;
if (report && (warningLevel > 0))
{
char *str;
- WARN
2
("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);
PreserveIndexTxt(xkb, old), TypeTxt(type));
if (clobber)
str = PreserveTxt(xkb, new);
else
str = PreserveTxt(xkb, old);
- ACTION
1
("Using %s, ", str);
+ ACTION("Using %s, ", str);
if (clobber)
str = PreserveTxt(xkb, old);
else
str = PreserveTxt(xkb, new);
if (clobber)
str = PreserveTxt(xkb, old);
else
str = PreserveTxt(xkb, new);
- INFO
1
("ignoring %s\n", str);
+ INFO("ignoring %s\n", str);
}
if (clobber)
{
}
if (clobber)
{
@@
-591,8
+591,8
@@
AddPreserve(XkbcDescPtr xkb,
old = uTypedAlloc(PreserveInfo);
if (!old)
{
old = uTypedAlloc(PreserveInfo);
if (!old)
{
- WSGO
1
("Couldn't allocate preserve in %s\n", TypeTxt(type));
- ACTION
1
("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;
return False;
}
*old = *new;
@@
-633,13
+633,13
@@
AddMapEntry(XkbcDescPtr xkb,
use = old->level + 1;
ignore = new->level + 1;
}
use = old->level + 1;
ignore = new->level + 1;
}
- WARN
2
("Multiple map entries for %s in %s\n",
+ WARN("Multiple map entries for %s in %s\n",
MapEntryTxt(xkb, new), TypeTxt(type));
MapEntryTxt(xkb, new), TypeTxt(type));
- ACTION
2
("Using %d, ignoring %d\n", use, ignore);
+ ACTION("Using %d, ignoring %d\n", use, ignore);
}
else if (warningLevel > 9)
{
}
else if (warningLevel > 9)
{
- WARN
3
("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;
MapEntryTxt(xkb, new), new->level + 1, TypeTxt(type));
ACTION("Ignored\n");
return True;
@@
-693,12
+693,12
@@
SetMapEntry(KeyTypeInfo * type,
{
if (warningLevel > 0)
{
{
if (warningLevel > 0)
{
- WARN
1
("Map entry for unused modifiers in %s\n", TypeTxt(type));
- ACTION
1
("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));
XkbcVModMaskText(xkb,
entry.mods.real_mods & type->mask,
entry.mods.vmods & type->vmask));
- INFO
1
("%s\n", MapEntryTxt(xkb, &entry));
+ INFO("%s\n", MapEntryTxt(xkb, &entry));
}
entry.mods.real_mods &= type->mask;
entry.mods.vmods &= type->vmask;
}
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))
{
}
if ((rtrn.ival < 1) || (rtrn.ival > XkbMaxShiftLevel + 1))
{
- ERROR
3
("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));
XkbMaxShiftLevel + 1, rtrn.ival, TypeTxt(type));
- ACTION
1
("Ignoring illegal definition of map[%s]\n",
+ ACTION("Ignoring illegal definition of map[%s]\n",
MapEntryTxt(xkb, &entry));
return False;
}
MapEntryTxt(xkb, &entry));
return False;
}
@@
-740,19
+740,19
@@
SetPreserve(KeyTypeInfo * type,
{
if (warningLevel > 0)
{
{
if (warningLevel > 0)
{
- WARN
1
("Preserve for modifiers not used by the %s type\n",
+ WARN("Preserve for modifiers not used by the %s type\n",
TypeTxt(type));
TypeTxt(type));
- ACTION
1
("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)
}
new.indexMods &= type->mask;
new.indexVMods &= type->vmask;
if (warningLevel > 0)
- INFO
1
("%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");
}
if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (char *) xkb))
{
ERROR("Preserve value in a key type is not a modifier mask\n");
- ACTION
2
("Ignoring preserve[%s] in type %s\n",
+ ACTION("Ignoring preserve[%s] in type %s\n",
PreserveIndexTxt(xkb, &new), TypeTxt(type));
return False;
}
PreserveIndexTxt(xkb, &new), TypeTxt(type));
return False;
}
@@
-763,15
+763,15
@@
SetPreserve(KeyTypeInfo * type,
{
if (warningLevel > 0)
{
{
if (warningLevel > 0)
{
- WARN
2
("Illegal value for preserve[%s] in type %s\n",
+ WARN("Illegal value for preserve[%s] in type %s\n",
PreserveTxt(xkb, &new), TypeTxt(type));
PreserveTxt(xkb, &new), TypeTxt(type));
- ACTION
1
("Converted %s to ", PreserveIndexTxt(xkb, &new));
+ ACTION("Converted %s to ", PreserveIndexTxt(xkb, &new));
}
new.preMods &= new.indexMods;
new.preVMods &= new.indexVMods;
if (warningLevel > 0)
{
}
new.preMods &= new.indexMods;
new.preVMods &= new.indexVMods;
if (warningLevel > 0)
{
- INFO
1
("%s\n", PreserveIndexTxt(xkb, &new));
+ INFO("%s\n", PreserveIndexTxt(xkb, &new));
}
}
return AddPreserve(xkb, type, &new, True, True);
}
}
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)
{
uTypedRecalloc(type->lvlNames, type->szNames, level + 1, Atom);
if (type->lvlNames == NULL)
{
- ERROR
1
("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;
TypeTxt(type));
ACTION("Level names lost\n");
type->szNames = 0;
@@
-801,7
+801,7
@@
AddLevelName(KeyTypeInfo * type,
{
if (warningLevel > 9)
{
{
if (warningLevel > 9)
{
- WARN
2
("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");
}
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);
char *old, *new;
old = XkbcAtomText(type->lvlNames[level]);
new = XkbcAtomText(name);
- WARN
2
("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)
level + 1, TypeTxt(type));
if (clobber)
- ACTION
2
("Using %s, ignoring %s\n", new, old);
+ ACTION("Using %s, ignoring %s\n", new, old);
else
else
- ACTION
2
("Using %s, ignoring %s\n", old, new);
+ ACTION("Using %s, ignoring %s\n", old, new);
}
if (!clobber)
return True;
}
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))
{
return ReportTypeBadType(type, "level name", "integer");
if ((rtrn.ival < 1) || (rtrn.ival > XkbMaxShiftLevel + 1))
{
- ERROR
3
("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));
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))
{
level = rtrn.ival - 1;
if (!ExprResolveString(value, &rtrn, NULL, NULL))
{
- ERROR
2
("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;
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)
{
vmods = (tmp.uval >> 8) & 0xffff; /* xkb virtual mods */
if (type->defs.defined & _KT_Mask)
{
- WARN
1
("Multiple modifier mask definitions for key type %s\n",
+ WARN("Multiple modifier mask definitions for key type %s\n",
XkbcAtomText(type->name));
XkbcAtomText(type->name));
- ACTION
1
("Using %s, ", TypeMaskTxt(type, xkb));
- INFO
1
("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;
return False;
}
type->mask = mods;
@@
-923,7
+923,7
@@
SetKeyTypeField(KeyTypeInfo * type,
type->defs.defined |= _KT_LevelNames;
return SetLevelName(type, arrayNdx, value);
}
type->defs.defined |= _KT_LevelNames;
return SetLevelName(type, arrayNdx, value);
}
- ERROR
2
("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;
}
ACTION("Definition ignored\n");
return False;
}
@@
-941,12
+941,12
@@
HandleKeyTypeVar(VarDef * stmt, XkbcDescPtr xkb, KeyTypesInfo * info)
stmt->value, info);
if (elem.str != NULL)
{
stmt->value, info);
if (elem.str != NULL)
{
- ERROR
1
("Default for unknown element %s\n", uStringText(elem.str));
- ACTION
1
("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)
{
}
else if (field.str != NULL)
{
- ERROR
1
("Default defined for unknown field %s\n",
+ ERROR("Default defined for unknown field %s\n",
uStringText(field.str));
ACTION("Ignored\n");
}
uStringText(field.str));
ACTION("Ignored\n");
}
@@
-1105,7
+1105,7
@@
HandleKeyTypesFile(XkbFile * file,
info->errorCount++;
break;
default:
info->errorCount++;
break;
default:
- WSGO
1
("Unexpected statement type %d in HandleKeyTypesFile\n",
+ WSGO("Unexpected statement type %d in HandleKeyTypesFile\n",
stmt->stmtType);
break;
}
stmt->stmtType);
break;
}
@@
-1115,7
+1115,7
@@
HandleKeyTypesFile(XkbFile * file,
#ifdef NOISY
ERROR("Too many errors\n");
#endif
#ifdef NOISY
ERROR("Too many errors\n");
#endif
- ACTION
1
("Abandoning keytypes file \"%s\"\n", file->topName);
+ ACTION("Abandoning keytypes file \"%s\"\n", file->topName);
break;
}
}
break;
}
}
@@
-1157,7
+1157,7
@@
CopyDefToKeyType(XkbcDescPtr xkb, XkbKeyTypePtr type, KeyTypeInfo * def)
if (!type->preserve)
{
WARN("Couldn't allocate preserve array in CopyDefToKeyType\n");
if (!type->preserve)
{
WARN("Couldn't allocate preserve array in CopyDefToKeyType\n");
- ACTION
1
("Preserve setting for type %s lost\n",
+ ACTION("Preserve setting for type %s lost\n",
XkbcAtomText(def->name));
}
else
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");
else
{
WSGO("Couldn't allocate space for types name\n");
- ACTION
2
("Name \"%s\" (from %s) NOT assigned\n",
+ ACTION("Name \"%s\" (from %s) NOT assigned\n",
scanFile, info.name);
}
}
scanFile, info.name);
}
}
diff --git
a/src/xkbcomp/misc.c
b/src/xkbcomp/misc.c
index
3ad2587
..
f45e7b0
100644
(file)
--- a/
src/xkbcomp/misc.c
+++ b/
src/xkbcomp/misc.c
@@
-66,7
+66,7
@@
ProcessIncludeFile(IncludeStmt * stmt,
file = XkbFindFileInPath(stmt->file, file_type, &stmt->path);
if (file == NULL)
{
file = XkbFindFileInPath(stmt->file, file_type, &stmt->path);
if (file == NULL)
{
- ERROR
2
("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;
XkbDirectoryForInclude(file_type));
ACTION("Exiting\n");
return False;
@@
-75,12
+75,12
@@
ProcessIncludeFile(IncludeStmt * stmt,
oldLine = lineNum;
setScanState(stmt->file, 1);
if (debugFlags & 2)
oldLine = lineNum;
setScanState(stmt->file, 1);
if (debugFlags & 2)
- INFO
1
("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);
/* parse the file */
if ((XKBParseFile(file, &rtrn) == 0) || (rtrn == NULL))
{
setScanState(oldFile, oldLine);
- ERROR
1
("Error interpreting include file \"%s\"\n", stmt->file);
+ ERROR("Error interpreting include file \"%s\"\n", stmt->file);
ACTION("Exiting\n");
fclose(file);
return False;
ACTION("Exiting\n");
fclose(file);
return False;
@@
-98,7
+98,7
@@
ProcessIncludeFile(IncludeStmt * stmt,
}
if (!mapToUse)
{
}
if (!mapToUse)
{
- ERROR
3
("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;
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))
{
}
else if ((rtrn->common.next != NULL) && (warningLevel > 5))
{
- WARN
1
("No map in include statement, but \"%s\" contains several\n",
+ WARN("No map in include statement, but \"%s\" contains several\n",
stmt->file);
stmt->file);
- ACTION
1
("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)
{
}
setScanState(oldFile, oldLine);
if (mapToUse->type != file_type)
{
- ERROR
2
("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));
XkbcConfigText(file_type), XkbcConfigText(mapToUse->type));
- ACTION
1
("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) */
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)
{
int
ReportNotArray(const char *type, const char *field, const char *name)
{
- ERROR
2
("The %s %s field is not an array\n", type, field);
- ACTION
1
("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)
{
return False;
}
int
ReportShouldBeArray(const char *type, const char *field, char *name)
{
- ERROR
2
("Missing subscript for %s %s\n", type, field);
- ACTION
1
("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;
}
return False;
}
@@
-148,31
+148,31
@@
int
ReportBadType(const char *type, const char *field,
const char *name, const char *wanted)
{
ReportBadType(const char *type, const char *field,
const char *name, const char *wanted)
{
- ERROR
3
("The %s %s field must be a %s\n", type, field, wanted);
- ACTION
1
("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)
{
return False;
}
int
ReportBadIndexType(char *type, char *field, char *name, char *wanted)
{
- ERROR
3
("Index for the %s %s field must be a %s\n", type, field, wanted);
- ACTION
1
("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)
{
return False;
}
int
ReportBadField(const char *type, const char *field, const char *name)
{
- ERROR
3
("Unknown %s field %s in %s\n", type, field, name);
- ACTION
1
("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)
{
return False;
}
int
ReportMultipleDefs(char *type, char *field, char *name)
{
- WARN
3
("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;
}
ACTION("Using last definition\n");
return False;
}
@@
-422,10
+422,10
@@
ComputeKbdDefaults(XkbcDescPtr xkb)
{
if (warningLevel > 2)
{
{
if (warningLevel > 2)
{
- WARN
1
+ WARN
("Several keys match pattern for %s\n",
XkbcKeyNameText(name->name));
("Several keys match pattern for %s\n",
XkbcKeyNameText(name->name));
- ACTION
2
("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",
nUnknown, i);
}
sprintf(xkb->names->keys[i].name, "U%03d",
@@
-438,8
+438,8
@@
ComputeKbdDefaults(XkbcDescPtr xkb)
{
if (warningLevel > 2)
{
{
if (warningLevel > 2)
{
- WARN
1
("Key %d does not match any defaults\n", i);
- ACTION
1
("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++);
}
}
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");
if (warningLevel > 0)
{
WARN("Couldn't allocate key names in FindNamedKey\n");
- ACTION
1
("Key \"%s\" not automatically created\n",
+ ACTION("Key \"%s\" not automatically created\n",
longText(name));
}
return False;
longText(name));
}
return False;
diff --git
a/src/xkbcomp/parseutils.c
b/src/xkbcomp/parseutils.c
index
cbb35d9
..
4dff8c7
100644
(file)
--- a/
src/xkbcomp/parseutils.c
+++ b/
src/xkbcomp/parseutils.c
@@
-709,7
+709,7
@@
IncludeCreate(char *str, unsigned merge)
uFree(stmt);
return first;
BAIL:
uFree(stmt);
return first;
BAIL:
- ERROR
1
("Illegal include statement \"%s\"\n", stmt);
+ ERROR("Illegal include statement \"%s\"\n", stmt);
ACTION("Ignored\n");
while (first)
{
ACTION("Ignored\n");
while (first)
{
@@
-766,9
+766,9
@@
CheckDefaultMap(XkbFile * maps)
{
if (warningLevel > 2)
{
{
if (warningLevel > 2)
{
- WARN
1
("Multiple default components in %s\n",
+ WARN("Multiple default components in %s\n",
(scanFile ? scanFile : "(unknown)"));
(scanFile ? scanFile : "(unknown)"));
- ACTION
2
("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
(dflt->name ? dflt->name : "(first)"),
(tmp->name ? tmp->name : "(subsequent)"));
}
(dflt->name ? dflt->name : "(first)"),
(tmp->name ? tmp->name : "(subsequent)"));
}
diff --git
a/src/xkbcomp/symbols.c
b/src/xkbcomp/symbols.c
index
e2a5933
..
81c5535
100644
(file)
--- a/
src/xkbcomp/symbols.c
+++ b/
src/xkbcomp/symbols.c
@@
-359,7
+359,7
@@
MergeKeyGroups(SymbolsInfo * info,
if (!resultSyms)
{
WSGO("Could not allocate symbols for group merge\n");
if (!resultSyms)
{
WSGO("Could not allocate symbols for group merge\n");
- ACTION
2
("Group %d of key %s not merged\n", group,
+ ACTION("Group %d of key %s not merged\n", group,
longText(into->name));
return False;
}
longText(into->name));
return False;
}
@@
-370,7
+370,7
@@
MergeKeyGroups(SymbolsInfo * info,
if (!resultActs)
{
WSGO("Could not allocate actions for group merge\n");
if (!resultActs)
{
WSGO("Could not allocate actions for group merge\n");
- ACTION
2
("Group %d of key %s not merged\n", group,
+ ACTION("Group %d of key %s not merged\n", group,
longText(into->name));
return False;
}
longText(into->name));
return False;
}
@@
-405,10
+405,10
@@
MergeKeyGroups(SymbolsInfo * info,
}
if (report)
{
}
if (report)
{
- WARN
3
+ WARN
("Multiple symbols for level %d/group %d on key %s\n",
i + 1, group + 1, longText(into->name));
("Multiple symbols for level %d/group %d on key %s\n",
i + 1, group + 1, longText(into->name));
- ACTION
2
("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
XkbcKeysymText(use), XkbcKeysymText(ignore));
}
resultSyms[i] = use;
XkbcKeysymText(use), XkbcKeysymText(ignore));
}
resultSyms[i] = use;
@@
-443,10
+443,10
@@
MergeKeyGroups(SymbolsInfo * info,
}
if (report)
{
}
if (report)
{
- WARN
3
+ WARN
("Multiple actions for level %d/group %d on key %s\n",
i + 1, group + 1, longText(into->name));
("Multiple actions for level %d/group %d on key %s\n",
i + 1, group + 1, longText(into->name));
- ACTION
2
("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
XkbcActionTypeText(use->type),
XkbcActionTypeText(ignore->type));
}
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];
}
use = into->types[i];
ignore = from->types[i];
}
- WARN
2
+ WARN
("Multiple definitions for group %d type of key %s\n",
i, longText(into->name));
("Multiple definitions for group %d type of key %s\n",
i, longText(into->name));
- ACTION
2
("Using %s, ignoring %s\n",
+ ACTION("Using %s, ignoring %s\n",
XkbcAtomText(use),
XkbcAtomText(ignore));
}
XkbcAtomText(use),
XkbcAtomText(ignore));
}
@@
-590,9
+590,9
@@
MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
}
if (collide)
{
}
if (collide)
{
- WARN
1
("Symbol map for key %s redefined\n",
+ WARN("Symbol map for key %s redefined\n",
longText(into->name));
longText(into->name));
- ACTION
1
("Using %s definition for conflicting fields\n",
+ ACTION("Using %s definition for conflicting fields\n",
(from->defs.merge == MergeAugment ? "first" : "last"));
}
return True;
(from->defs.merge == MergeAugment ? "first" : "last"));
}
return True;
@@
-657,10
+657,10
@@
AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
use = mm->modifier;
ignore = new->modifier;
}
use = mm->modifier;
ignore = new->modifier;
}
- ERROR
1
+ ERROR
("%s added to symbol map for multiple modifiers\n",
XkbcKeysymText(new->u.keySym));
("%s added to symbol map for multiple modifiers\n",
XkbcKeysymText(new->u.keySym));
- ACTION
2
("Using %s, ignoring %s.\n",
+ ACTION("Using %s, ignoring %s.\n",
XkbcModIndexText(use),
XkbcModIndexText(ignore));
mm->modifier = use;
XkbcModIndexText(use),
XkbcModIndexText(ignore));
mm->modifier = use;
@@
-683,9
+683,9
@@
AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
use = mm->modifier;
ignore = new->modifier;
}
use = mm->modifier;
ignore = new->modifier;
}
- ERROR
1
("Key %s added to map for multiple modifiers\n",
+ ERROR("Key %s added to map for multiple modifiers\n",
longText(new->u.keyName));
longText(new->u.keyName));
- ACTION
2
("Using %s, ignoring %s.\n",
+ ACTION("Using %s, ignoring %s.\n",
XkbcModIndexText(use),
XkbcModIndexText(ignore));
mm->modifier = use;
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");
if (mm == NULL)
{
WSGO("Could not allocate modifier map entry\n");
- ACTION
1
("Modifier map for %s will be incomplete\n",
+ ACTION("Modifier map for %s will be incomplete\n",
XkbcModIndexText(new->modifier));
return False;
}
XkbcModIndexText(new->modifier));
return False;
}
@@
-902,24
+902,24
@@
GetGroupIndex(KeyInfo * key,
return True;
}
}
return True;
}
}
- ERROR
3
("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);
longText(key->name), XkbNumKbdGroups + 1);
- ACTION
1
("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))
{
return False;
}
if (!ExprResolveInteger
(arrayNdx, &tmp, SimpleLookup, (char *) groupNames))
{
- ERROR
2
("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))
{
longText(key->name));
ACTION("Definition with non-integer array index ignored\n");
return False;
}
if ((tmp.uval < 1) || (tmp.uval > XkbNumKbdGroups))
{
- ERROR
3
("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);
name, longText(key->name), XkbNumKbdGroups + 1);
- ACTION
2
("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;
return False;
}
*ndx_rtrn = tmp.uval - 1;
@@
-944,15
+944,15
@@
AddSymbolsToKey(KeyInfo * key,
}
if (value->op != ExprKeysymList)
{
}
if (value->op != ExprKeysymList)
{
- ERROR
1
("Expected a list of symbols, found %s\n",
+ ERROR("Expected a list of symbols, found %s\n",
exprOpText(value->op));
exprOpText(value->op));
- ACTION
2
("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)
{
longText(key->name));
return False;
}
if (key->syms[ndx] != NULL)
{
- WSGO
2
("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;
}
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)))
{
if (((key->numLevels[ndx] < nSyms) || (key->syms[ndx] == NULL)) &&
(!ResizeKeyGroup(key, ndx, nSyms, False)))
{
- WSGO
2
("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;
longText(key->name));
ACTION("Symbols lost\n");
return False;
@@
-997,14
+997,14
@@
AddActionsToKey(KeyInfo * key,
}
if (value->op != ExprActionList)
{
}
if (value->op != ExprActionList)
{
- WSGO
1
("Bad expression type (%d) for action list value\n", value->op);
- ACTION
2
("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)
{
longText(key->name));
return False;
}
if (key->acts[ndx] != NULL)
{
- WSGO
2
("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;
}
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)))
{
if (((key->numLevels[ndx] < nActs) || (key->acts[ndx] == NULL)) &&
(!ResizeKeyGroup(key, ndx, nActs, True)))
{
- WSGO
2
("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;
longText(key->name));
ACTION("Actions lost\n");
return False;
@@
-1033,9
+1033,9
@@
AddActionsToKey(KeyInfo * key,
{
if (!HandleActionDef(act, xkb, toAct, MergeOverride, info->action))
{
{
if (!HandleActionDef(act, xkb, toAct, MergeOverride, info->action))
{
- ERROR
1
("Illegal action definition for %s\n",
+ ERROR("Illegal action definition for %s\n",
longText(key->name));
longText(key->name));
- ACTION
2
("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;
}
}
act = (ExprDef *) act->common.next;
}
@@
-1062,9
+1062,9
@@
SetAllowNone(KeyInfo * key, ExprDef * arrayNdx, ExprDef * value)
}
if ((tmp.uval < 1) || (tmp.uval > XkbMaxRadioGroups))
{
}
if ((tmp.uval < 1) || (tmp.uval > XkbMaxRadioGroups))
{
- ERROR
1
("Illegal radio group specified (must be 1..%d)\n",
+ ERROR("Illegal radio group specified (must be 1..%d)\n",
XkbMaxRadioGroups + 1);
XkbMaxRadioGroups + 1);
- ACTION
1
("Value of \"allow none\" for group %d ignored\n",
+ ACTION("Value of \"allow none\" for group %d ignored\n",
tmp.uval);
return False;
}
tmp.uval);
return False;
}
@@
-1072,7
+1072,7
@@
SetAllowNone(KeyInfo * key, ExprDef * arrayNdx, ExprDef * value)
}
if (!ExprResolveBoolean(value, &tmp, NULL, NULL))
{
}
if (!ExprResolveBoolean(value, &tmp, NULL, NULL))
{
- ERROR
1
("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;
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))
{
else if (!ExprResolveInteger(arrayNdx, &ndx, SimpleLookup,
(char *) groupNames))
{
- ERROR
1
("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))
{
longText(key->name));
ACTION("Definition with non-integer array index ignored\n");
return False;
}
else if ((ndx.uval < 1) || (ndx.uval > XkbNumKbdGroups))
{
- ERROR
2
+ ERROR
("Group index for type of key %s is out of range (1..%d)\n",
longText(key->name), XkbNumKbdGroups + 1);
("Group index for type of key %s is out of range (1..%d)\n",
longText(key->name), XkbNumKbdGroups + 1);
- ACTION
1
("Ignoring type for group %d\n", ndx.uval);
+ ACTION("Ignoring type for group %d\n", ndx.uval);
return False;
}
else
return False;
}
else
@@
-1173,9
+1173,9
@@
SetSymbolsField(KeyInfo * key,
}
else
{
}
else
{
- ERROR
1
("Expected a virtual modifier mask, found %s\n",
+ ERROR("Expected a virtual modifier mask, found %s\n",
exprOpText(value->op));
exprOpText(value->op));
- ACTION
1
("Ignoring virtual modifiers definition for key %s\n",
+ ACTION("Ignoring virtual modifiers definition for key %s\n",
longText(key->name));
}
}
longText(key->name));
}
}
@@
-1198,7
+1198,7
@@
SetSymbolsField(KeyInfo * key,
(char *) rgEntries);
if (!ok)
{
(char *) rgEntries);
if (!ok)
{
- ERROR
1
("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;
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))
{
}
if ((tmp.uval < 1) || (tmp.uval > XkbMaxRadioGroups))
{
- ERROR
1
+ ERROR
("Radio group specification for %s out of range (1..32)\n",
longText(key->name));
("Radio group specification for %s out of range (1..32)\n",
longText(key->name));
- ACTION
1
("Illegal radio group %d ignored\n", tmp.uval);
+ ACTION("Illegal radio group %d ignored\n", tmp.uval);
return False;
}
key->behavior.type =
return False;
}
key->behavior.type =
@@
-1247,7
+1247,7
@@
SetSymbolsField(KeyInfo * key,
{
if (((overlayNdx < 1) || (overlayNdx > 2)) && (warningLevel > 0))
{
{
if (((overlayNdx < 1) || (overlayNdx > 2)) && (warningLevel > 0))
{
- ERROR
2
("Illegal overlay %d specified for %s\n",
+ ERROR("Illegal overlay %d specified for %s\n",
overlayNdx, longText(key->name));
ACTION("Ignored\n");
return False;
overlayNdx, longText(key->name));
ACTION("Ignored\n");
return False;
@@
-1257,7
+1257,7
@@
SetSymbolsField(KeyInfo * key,
overlayNdx = 1;
else if (warningLevel > 0)
{
overlayNdx = 1;
else if (warningLevel > 0)
{
- ERROR
2
("Illegal overlay \"%s\" specified for %s\n",
+ ERROR("Illegal overlay \"%s\" specified for %s\n",
which, longText(key->name));
ACTION("Ignored\n");
return False;
which, longText(key->name));
ACTION("Ignored\n");
return False;
@@
-1265,7
+1265,7
@@
SetSymbolsField(KeyInfo * key,
ok = ExprResolveKeyName(value, &tmp, NULL, NULL);
if (!ok)
{
ok = ExprResolveKeyName(value, &tmp, NULL, NULL);
if (!ok)
{
- ERROR
1
("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;
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)
{
ok = ExprResolveEnum(value, &tmp, repeatEntries);
if (!ok)
{
- ERROR
1
("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;
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)
{
ok = ExprResolveBoolean(value, &tmp, NULL, NULL);
if (!ok)
{
- ERROR
1
("Illegal groupsWrap setting for %s\n",
+ ERROR("Illegal groupsWrap setting for %s\n",
longText(key->name));
ACTION("Non-boolean value ignored\n");
return False;
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)
{
ok = ExprResolveBoolean(value, &tmp, NULL, NULL);
if (!ok)
{
- ERROR
1
("Illegal groupsClamp setting for %s\n",
+ ERROR("Illegal groupsClamp setting for %s\n",
longText(key->name));
ACTION("Non-boolean value ignored\n");
return False;
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))
{
if (!ExprResolveInteger
(value, &tmp, SimpleLookup, (char *) groupNames))
{
- ERROR
1
("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))
{
longText(key->name));
ACTION("Definition with non-integer group ignored\n");
return False;
}
if ((tmp.uval < 1) || (tmp.uval > XkbNumKbdGroups))
{
- ERROR
2
("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));
XkbNumKbdGroups, longText(key->name));
- ERROR
1
("Ignoring illegal group %d\n", tmp.uval);
+ ERROR("Ignoring illegal group %d\n", tmp.uval);
return False;
}
key->groupInfo =
return False;
}
key->groupInfo =
@@
-1354,7
+1354,7
@@
SetSymbolsField(KeyInfo * key,
}
else
{
}
else
{
- ERROR
1
("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;
}
ACTION("Definition ignored\n");
ok = False;
}
@@
-1381,16
+1381,16
@@
SetGroupName(SymbolsInfo * info, ExprDef * arrayNdx, ExprDef * value)
}
if ((tmp.uval < 1) || (tmp.uval > XkbNumKbdGroups))
{
}
if ((tmp.uval < 1) || (tmp.uval > XkbNumKbdGroups))
{
- ERROR
1
+ ERROR
("Attempt to specify name for illegal group (must be 1..%d)\n",
XkbNumKbdGroups + 1);
("Attempt to specify name for illegal group (must be 1..%d)\n",
XkbNumKbdGroups + 1);
- ACTION
1
("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");
return False;
}
if (!ExprResolveString(value, &name, NULL, NULL))
{
ERROR("Group name must be a string\n");
- ACTION
1
("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] =
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))
{
}
if ((tmp.uval < 1) || (tmp.uval > XkbNumKbdGroups))
{
- ERROR
1
+ ERROR
("Out-of-range (1..%d) group for global groupsRedirect\n",
XkbNumKbdGroups);
("Out-of-range (1..%d) group for global groupsRedirect\n",
XkbNumKbdGroups);
- ACTION
1
("Ignoring illegal group %d\n", tmp.uval);
+ ACTION("Ignoring illegal group %d\n", tmp.uval);
return False;
}
info->groupInfo = XkbSetGroupInfo(0, XkbRedirectIntoRange, 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;
if ((key->typesDefined | key->symsDefined | key->actsDefined) & ~1)
{
int i;
- WARN
1
("For the map %s an explicit group specified\n", info->name);
- WARN
1
("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++)
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");
if (!LookupModIndex(NULL, None, def->modifier, TypeInt, &rtrn))
{
ERROR("Illegal modifier map definition\n");
- ACTION
1
("Ignoring map for non-modifier \"%s\"\n",
+ ACTION("Ignoring map for non-modifier \"%s\"\n",
XkbcAtomText(def->modifier));
return False;
}
XkbcAtomText(def->modifier));
return False;
}
@@
-1621,7
+1621,7
@@
HandleModMapDef(ModMapDef * def,
else
{
ERROR("Modmap entries may contain only key names or keysyms\n");
else
{
ERROR("Modmap entries may contain only key names or keysyms\n");
- ACTION
1
("Illegal definition for %s modifier ignored\n",
+ ACTION("Illegal definition for %s modifier ignored\n",
XkbcModIndexText(tmp.modifier));
continue;
}
XkbcModIndexText(tmp.modifier));
continue;
}
@@
-1675,7
+1675,7
@@
HandleSymbolsFile(XkbFile * file,
info->errorCount++;
break;
default:
info->errorCount++;
break;
default:
- WSGO
1
("Unexpected statement type %d in HandleSymbolsFile\n",
+ WSGO("Unexpected statement type %d in HandleSymbolsFile\n",
stmt->stmtType);
break;
}
stmt->stmtType);
break;
}
@@
-1685,7
+1685,7
@@
HandleSymbolsFile(XkbFile * file,
#ifdef NOISY
ERROR("Too many errors\n");
#endif
#ifdef NOISY
ERROR("Too many errors\n");
#endif
- ACTION
1
("Abandoning symbols file \"%s\"\n", file->topName);
+ ACTION("Abandoning symbols file \"%s\"\n", file->topName);
break;
}
}
break;
}
}
@@
-1942,7
+1942,7
@@
CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
{
if ((start_from == 0) && (warningLevel >= 5))
{
{
if ((start_from == 0) && (warningLevel >= 5))
{
- WARN
2
("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");
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)
{
{
if (warningLevel >= 5)
{
- WARN
1
("No automatic type for %d symbols\n",
+ WARN("No automatic type for %d symbols\n",
(unsigned int) key->numLevels[i]);
(unsigned int) key->numLevels[i]);
- ACTION
3
("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);
}
XkbcAtomText(key->types[i]),
longText(key->name), kc);
}
@@
-1990,9
+1990,9
@@
CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
{
if (warningLevel >= 3)
{
{
if (warningLevel >= 3)
{
- WARN
1
("Type \"%s\" is not defined\n",
+ WARN("Type \"%s\" is not defined\n",
XkbcAtomText(key->types[i]));
XkbcAtomText(key->types[i]));
- ACTION
2
("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;
longText(key->name), kc);
}
types[i] = XkbTwoLevelIndex;
@@
-2003,7
+2003,7
@@
CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
{
if (warningLevel > 0)
{
{
if (warningLevel > 0)
{
- WARN
4
+ WARN
("Type \"%s\" has %d levels, but %s has %d symbols\n",
XkbcAtomText(type->name),
(unsigned int) type->num_levels,
("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)
{
outSyms = XkbcResizeKeySyms(xkb, kc, i);
if (outSyms == NULL)
{
- WSGO
2
("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;
}
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)
{
outActs = XkbcResizeKeyActions(xkb, kc, i);
if (outActs == NULL)
{
- WSGO
2
("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;
}
longText(key->name), kc);
return False;
}
@@
-2094,10
+2094,10
@@
CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
{
if (warningLevel >= 1)
{
{
if (warningLevel >= 1)
{
- WARN
2
("Key %s not found in %s keycodes\n",
+ WARN("Key %s not found in %s keycodes\n",
longText(key->nameForOverlayKey),
XkbcAtomText(xkb->names->keycodes));
longText(key->nameForOverlayKey),
XkbcAtomText(xkb->names->keycodes));
- ACTION
1
("Not treating %s as an overlay key \n",
+ ACTION("Not treating %s as an overlay key \n",
longText(key->name));
}
break;
longText(key->name));
}
break;
@@
-2139,10
+2139,10
@@
CopyModMapDef(XkbcDescPtr xkb, ModMapEntry *entry)
{
if (warningLevel >= 5)
{
{
if (warningLevel >= 5)
{
- WARN
2
("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));
longText(entry->u.keyName),
XkbcAtomText(xkb->names->keycodes));
- ACTION
1
("Modifier map entry for %s not updated\n",
+ ACTION("Modifier map entry for %s not updated\n",
XkbcModIndexText(entry->modifier));
}
return False;
XkbcModIndexText(entry->modifier));
}
return False;
@@
-2152,10
+2152,10
@@
CopyModMapDef(XkbcDescPtr xkb, ModMapEntry *entry)
{
if (warningLevel > 5)
{
{
if (warningLevel > 5)
{
- WARN
2
("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));
XkbcKeysymText(entry->u.keySym),
XkbcAtomText(xkb->names->symbols));
- ACTION
1
("Modifier map entry for %s not updated\n",
+ ACTION("Modifier map entry for %s not updated\n",
XkbcModIndexText(entry->modifier));
}
return False;
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';
char buf[5];
memcpy(buf, xkb->names->keys[i].name, 4);
buf[4] = '\0';
- WARN
2
+ WARN
("No symbols defined for <%s> (keycode %d)\n",
buf, i);
}
("No symbols defined for <%s> (keycode %d)\n",
buf, i);
}
diff --git
a/src/xkbcomp/utils.h
b/src/xkbcomp/utils.h
index
ccdc5dd
..
2d69033
100644
(file)
--- a/
src/xkbcomp/utils.h
+++ b/
src/xkbcomp/utils.h
@@
-105,12
+105,6
@@
extern void uFree(Opaque /* ptr */
extern Boolean uSetErrorFile(char * /* name */
);
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
#define INFO uInformation
extern void
@@
-122,12
+116,6
@@
uInformation(const char * /* s */ , ...
#endif
;
#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 */ , ...
#define ACTION uAction
extern void uAction(const char * /* s */ , ...
@@
-138,12
+126,6
@@
uInformation(const char * /* s */ , ...
#endif
;
#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 */ , ...
#define WARN uWarning
extern void uWarning(const char * /* s */ , ...
@@
-154,12
+136,6
@@
uInformation(const char * /* s */ , ...
#endif
;
#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 */ , ...
#define ERROR uError
extern void uError(const char * /* s */ , ...
@@
-170,12
+146,6
@@
uInformation(const char * /* s */ , ...
#endif
;
#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 */ , ...
#define FATAL uFatalError
extern void uFatalError(const char * /* s */ , ...
@@
-186,13
+156,7
@@
uInformation(const char * /* s */ , ...
#endif
;
#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 */ , ...
#define WSGO uInternalError
extern void uInternalError(const char * /* s */ , ...
diff --git
a/src/xkbcomp/vmod.c
b/src/xkbcomp/vmod.c
index
181fa4e
..
111fa31
100644
(file)
--- a/
src/xkbcomp/vmod.c
+++ b/
src/xkbcomp/vmod.c
@@
-105,21
+105,21
@@
HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
if (!ExprResolveModMask(stmt->value, &mod, NULL, NULL))
{
str1 = XkbcAtomText(stmt->name);
if (!ExprResolveModMask(stmt->value, &mod, NULL, NULL))
{
str1 = XkbcAtomText(stmt->name);
- ACTION
1
("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);
return False;
}
if (mod.uval == srv->vmods[i])
return True;
str1 = XkbcAtomText(stmt->name);
- WARN
1
("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);
}
str1 = XkbcModMaskText(srv->vmods[i], True);
if (mergeMode == MergeOverride)
{
str2 = str1;
str1 = XkbcModMaskText(mod.uval, True);
}
- ACTION
2
("Using %s, ignoring %s\n", str1, str2);
+ ACTION("Using %s, ignoring %s\n", str1, str2);
if (mergeMode == MergeOverride)
srv->vmods[i] = mod.uval;
return True;
if (mergeMode == MergeOverride)
srv->vmods[i] = mod.uval;
return True;
@@
-131,7
+131,7
@@
HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
}
if (nextFree < 0)
{
}
if (nextFree < 0)
{
- ERROR
1
("Too many virtual modifiers defined (maximum %d)\n",
+ ERROR("Too many virtual modifiers defined (maximum %d)\n",
XkbNumVirtualMods);
ACTION("Exiting\n");
return False;
XkbNumVirtualMods);
ACTION("Exiting\n");
return False;
@@
-147,7
+147,7
@@
HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
srv->vmods[nextFree] = mod.uval;
return True;
}
srv->vmods[nextFree] = mod.uval;
return True;
}
- ACTION
1
("Declaration of %s ignored\n",
+ ACTION("Declaration of %s ignored\n",
XkbcAtomText(stmt->name));
return False;
}
XkbcAtomText(stmt->name));
return False;
}
@@
-262,7
+262,7
@@
ResolveVirtualModifier(ExprDef * def, ExprResult * val_rtrn, VModInfo * info)
{
if (val_rtrn->uval < XkbNumVirtualMods)
return True;
{
if (val_rtrn->uval < XkbNumVirtualMods)
return True;
- ERROR
2
("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;
val_rtrn->uval, XkbNumVirtualMods - 1);
}
return False;
diff --git
a/src/xkbcomp/xkbpath.c
b/src/xkbcomp/xkbpath.c
index
3550769
..
df739a1
100644
(file)
--- a/
src/xkbcomp/xkbpath.c
+++ b/
src/xkbcomp/xkbpath.c
@@
-217,7
+217,7
@@
XkbAddDirectoryToPath(const char *dir)
len = strlen(dir);
if (len + 2 >= PATH_MAX)
{ /* allow for '/' and at least one character */
len = strlen(dir);
if (len + 2 >= PATH_MAX)
{ /* allow for '/' and at least one character */
- ERROR
2
("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;
}
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)
{
(char *) calloc(strlen(dir) + 1, sizeof(char));
if (includePath[nPathEntries] == NULL)
{
- WSGO
1
("Allocation failed (includePath[%d])\n", nPathEntries);
+ WSGO("Allocation failed (includePath[%d])\n", nPathEntries);
return False;
}
strcpy(includePath[nPathEntries++], dir);
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;
if ((type == entry->type) && (uStringEqual(name, entry->name)))
{
void *old = entry->data;
- WSGO
2
("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;
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)
{
if ((nameLen + typeLen + pathLen + 2) >= PATH_MAX)
{
- ERROR
3
("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;
typeDir, name);
ACTION("Ignored\n");
continue;