libxkbcomp: s/XPointer/char */
Replace XPointer with its definition since we don't have the privilege of using Xlib.h. Why this is char * and not void *, I'll never know.master
parent
37769b5a10
commit
4fe322aa99
|
@ -383,7 +383,7 @@ CheckModifierField(XkbcDescPtr xkb,
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (XPointer) xkb))
|
if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (char *) xkb))
|
||||||
return ReportMismatch(action, F_Modifiers, "modifier mask");
|
return ReportMismatch(action, F_Modifiers, "modifier mask");
|
||||||
*mods_rtrn = rtrn.uval;
|
*mods_rtrn = rtrn.uval;
|
||||||
*flags_inout &= ~XkbSA_UseModMapMods;
|
*flags_inout &= ~XkbSA_UseModMapMods;
|
||||||
|
@ -494,7 +494,7 @@ CheckGroupField(unsigned action,
|
||||||
spec = value;
|
spec = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ExprResolveInteger(spec, &rtrn, SimpleLookup, (XPointer) groupNames))
|
if (!ExprResolveInteger(spec, &rtrn, SimpleLookup, (char *) groupNames))
|
||||||
return ReportMismatch(action, F_Group, "integer (range 1..8)");
|
return ReportMismatch(action, F_Group, "integer (range 1..8)");
|
||||||
if ((rtrn.ival < 1) || (rtrn.ival > XkbNumKbdGroups))
|
if ((rtrn.ival < 1) || (rtrn.ival > XkbNumKbdGroups))
|
||||||
{
|
{
|
||||||
|
@ -663,7 +663,7 @@ HandlePtrBtn(XkbcDescPtr xkb,
|
||||||
if (array_ndx != NULL)
|
if (array_ndx != NULL)
|
||||||
return ReportActionNotArray(action->type, field);
|
return ReportActionNotArray(action->type, field);
|
||||||
if (!ExprResolveInteger
|
if (!ExprResolveInteger
|
||||||
(value, &rtrn, SimpleLookup, (XPointer) btnNames))
|
(value, &rtrn, SimpleLookup, (char *) btnNames))
|
||||||
return ReportMismatch(action->type, field,
|
return ReportMismatch(action->type, field,
|
||||||
"integer (range 1..5)");
|
"integer (range 1..5)");
|
||||||
if ((rtrn.ival < 0) || (rtrn.ival > 5))
|
if ((rtrn.ival < 0) || (rtrn.ival > 5))
|
||||||
|
@ -690,7 +690,7 @@ HandlePtrBtn(XkbcDescPtr xkb,
|
||||||
if (array_ndx != NULL)
|
if (array_ndx != NULL)
|
||||||
return ReportActionNotArray(action->type, field);
|
return ReportActionNotArray(action->type, field);
|
||||||
if (!ExprResolveInteger
|
if (!ExprResolveInteger
|
||||||
(value, &rtrn, SimpleLookup, (XPointer) btnNames))
|
(value, &rtrn, SimpleLookup, (char *) btnNames))
|
||||||
return ReportMismatch(action->type, field, "integer");
|
return ReportMismatch(action->type, field, "integer");
|
||||||
if ((rtrn.ival < 0) || (rtrn.ival > 255))
|
if ((rtrn.ival < 0) || (rtrn.ival > 255))
|
||||||
{
|
{
|
||||||
|
@ -746,7 +746,7 @@ HandleSetPtrDflt(XkbcDescPtr xkb,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ExprResolveInteger
|
if (!ExprResolveInteger
|
||||||
(btn, &rtrn, SimpleLookup, (XPointer) btnNames))
|
(btn, &rtrn, SimpleLookup, (char *) btnNames))
|
||||||
return ReportMismatch(action->type, field,
|
return ReportMismatch(action->type, field,
|
||||||
"integer (range 1..5)");
|
"integer (range 1..5)");
|
||||||
if ((rtrn.ival < 0) || (rtrn.ival > 5))
|
if ((rtrn.ival < 0) || (rtrn.ival > 5))
|
||||||
|
@ -824,7 +824,7 @@ HandleISOLock(XkbcDescPtr xkb,
|
||||||
case F_Affect:
|
case F_Affect:
|
||||||
if (array_ndx != NULL)
|
if (array_ndx != NULL)
|
||||||
return ReportActionNotArray(action->type, field);
|
return ReportActionNotArray(action->type, field);
|
||||||
if (!ExprResolveMask(value, &rtrn, SimpleLookup, (XPointer) isoNames))
|
if (!ExprResolveMask(value, &rtrn, SimpleLookup, (char *) isoNames))
|
||||||
return ReportMismatch(action->type, field, "keyboard component");
|
return ReportMismatch(action->type, field, "keyboard component");
|
||||||
act->affect = (~rtrn.uval) & XkbSA_ISOAffectMask;
|
act->affect = (~rtrn.uval) & XkbSA_ISOAffectMask;
|
||||||
return True;
|
return True;
|
||||||
|
@ -938,7 +938,7 @@ HandleSetLockControls(XkbcDescPtr xkb,
|
||||||
if (array_ndx != NULL)
|
if (array_ndx != NULL)
|
||||||
return ReportActionNotArray(action->type, field);
|
return ReportActionNotArray(action->type, field);
|
||||||
if (!ExprResolveMask
|
if (!ExprResolveMask
|
||||||
(value, &rtrn, SimpleLookup, (XPointer) ctrlNames))
|
(value, &rtrn, SimpleLookup, (char *) ctrlNames))
|
||||||
return ReportMismatch(action->type, field, "controls mask");
|
return ReportMismatch(action->type, field, "controls mask");
|
||||||
XkbActionSetCtrls(act, rtrn.uval);
|
XkbActionSetCtrls(act, rtrn.uval);
|
||||||
return True;
|
return True;
|
||||||
|
@ -970,7 +970,7 @@ HandleActionMessage(XkbcDescPtr xkb,
|
||||||
case F_Report:
|
case F_Report:
|
||||||
if (array_ndx != NULL)
|
if (array_ndx != NULL)
|
||||||
return ReportActionNotArray(action->type, field);
|
return ReportActionNotArray(action->type, field);
|
||||||
if (!ExprResolveMask(value, &rtrn, SimpleLookup, (XPointer) evNames))
|
if (!ExprResolveMask(value, &rtrn, SimpleLookup, (char *) evNames))
|
||||||
return ReportMismatch(action->type, field, "key event mask");
|
return ReportMismatch(action->type, field, "key event mask");
|
||||||
act->flags &= ~(XkbSA_MessageOnPress | XkbSA_MessageOnRelease);
|
act->flags &= ~(XkbSA_MessageOnPress | XkbSA_MessageOnRelease);
|
||||||
act->flags =
|
act->flags =
|
||||||
|
@ -1130,7 +1130,7 @@ HandleDeviceBtn(XkbcDescPtr xkb,
|
||||||
if (array_ndx != NULL)
|
if (array_ndx != NULL)
|
||||||
return ReportActionNotArray(action->type, field);
|
return ReportActionNotArray(action->type, field);
|
||||||
if (!ExprResolveInteger
|
if (!ExprResolveInteger
|
||||||
(value, &rtrn, SimpleLookup, (XPointer) btnNames))
|
(value, &rtrn, SimpleLookup, (char *) btnNames))
|
||||||
return ReportMismatch(action->type, field, "integer");
|
return ReportMismatch(action->type, field, "integer");
|
||||||
if ((rtrn.ival < 0) || (rtrn.ival > 255))
|
if ((rtrn.ival < 0) || (rtrn.ival > 255))
|
||||||
{
|
{
|
||||||
|
|
|
@ -699,7 +699,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
|
||||||
}
|
}
|
||||||
tmp.fileID = info->fileID;
|
tmp.fileID = info->fileID;
|
||||||
tmp.merge = merge;
|
tmp.merge = merge;
|
||||||
if (!ExprResolveModMask(def->def, &val, LookupVModMask, (XPointer) xkb))
|
if (!ExprResolveModMask(def->def, &val, LookupVModMask, (char *) xkb))
|
||||||
{
|
{
|
||||||
ERROR("Expected a modifier mask in group compatibility definition\n");
|
ERROR("Expected a modifier mask in group compatibility definition\n");
|
||||||
ACTION1("Ignoring illegal compatibility map for group %d\n",
|
ACTION1("Ignoring illegal compatibility map for group %d\n",
|
||||||
|
|
|
@ -154,7 +154,7 @@ ExprResolveLhs(ExprDef * expr,
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
SimpleLookup(XPointer priv,
|
SimpleLookup(char * priv,
|
||||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
LookupEntry *entry;
|
LookupEntry *entry;
|
||||||
|
@ -182,7 +182,7 @@ SimpleLookup(XPointer priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
RadioLookup(XPointer priv,
|
RadioLookup(char * priv,
|
||||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
register char *str;
|
register char *str;
|
||||||
|
@ -210,7 +210,7 @@ RadioLookup(XPointer priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
TableLookup(XPointer priv,
|
TableLookup(char * priv,
|
||||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
LookupTable *tbl = (LookupTable *) priv;
|
LookupTable *tbl = (LookupTable *) priv;
|
||||||
|
@ -231,7 +231,7 @@ TableLookup(XPointer priv,
|
||||||
}
|
}
|
||||||
if (tbl == NULL) /* didn't find a matching element */
|
if (tbl == NULL) /* didn't find a matching element */
|
||||||
return False;
|
return False;
|
||||||
priv = (XPointer) tbl->entries;
|
priv = (char *) tbl->entries;
|
||||||
return SimpleLookup(priv, (Atom) None, field, type, val_rtrn);
|
return SimpleLookup(priv, (Atom) None, field, type, val_rtrn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,15 +249,15 @@ static LookupEntry modIndexNames[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
LookupModIndex(XPointer priv,
|
LookupModIndex(char * priv,
|
||||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
return SimpleLookup((XPointer) modIndexNames, elem, field, type,
|
return SimpleLookup((char *) modIndexNames, elem, field, type,
|
||||||
val_rtrn);
|
val_rtrn);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
LookupModMask(XPointer priv,
|
LookupModMask(char * priv,
|
||||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
|
@ -289,7 +289,7 @@ LookupModMask(XPointer priv,
|
||||||
int
|
int
|
||||||
ExprResolveModIndex(ExprDef * expr,
|
ExprResolveModIndex(ExprDef * expr,
|
||||||
ExprResult * val_rtrn,
|
ExprResult * val_rtrn,
|
||||||
IdentLookupFunc lookup, XPointer lookupPriv)
|
IdentLookupFunc lookup, char * lookupPriv)
|
||||||
{
|
{
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
char *bogus = NULL;
|
char *bogus = NULL;
|
||||||
|
@ -366,20 +366,20 @@ ExprResolveModIndex(ExprDef * expr,
|
||||||
int
|
int
|
||||||
ExprResolveModMask(ExprDef * expr,
|
ExprResolveModMask(ExprDef * expr,
|
||||||
ExprResult * val_rtrn,
|
ExprResult * val_rtrn,
|
||||||
IdentLookupFunc lookup, XPointer lookupPriv)
|
IdentLookupFunc lookup, char * lookupPriv)
|
||||||
{
|
{
|
||||||
LookupPriv priv;
|
LookupPriv priv;
|
||||||
|
|
||||||
priv.priv = NULL;
|
priv.priv = NULL;
|
||||||
priv.chain = lookup;
|
priv.chain = lookup;
|
||||||
priv.chainPriv = lookupPriv;
|
priv.chainPriv = lookupPriv;
|
||||||
return ExprResolveMask(expr, val_rtrn, LookupModMask, (XPointer) & priv);
|
return ExprResolveMask(expr, val_rtrn, LookupModMask, (char *) & priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ExprResolveBoolean(ExprDef * expr,
|
ExprResolveBoolean(ExprDef * expr,
|
||||||
ExprResult * val_rtrn,
|
ExprResult * val_rtrn,
|
||||||
IdentLookupFunc lookup, XPointer lookupPriv)
|
IdentLookupFunc lookup, char * lookupPriv)
|
||||||
{
|
{
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
char *bogus = NULL;
|
char *bogus = NULL;
|
||||||
|
@ -475,7 +475,7 @@ ExprResolveBoolean(ExprDef * expr,
|
||||||
int
|
int
|
||||||
ExprResolveFloat(ExprDef * expr,
|
ExprResolveFloat(ExprDef * expr,
|
||||||
ExprResult * val_rtrn,
|
ExprResult * val_rtrn,
|
||||||
IdentLookupFunc lookup, XPointer lookupPriv)
|
IdentLookupFunc lookup, char * lookupPriv)
|
||||||
{
|
{
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
ExprResult leftRtrn, rightRtrn;
|
ExprResult leftRtrn, rightRtrn;
|
||||||
|
@ -588,7 +588,7 @@ ExprResolveFloat(ExprDef * expr,
|
||||||
int
|
int
|
||||||
ExprResolveInteger(ExprDef * expr,
|
ExprResolveInteger(ExprDef * expr,
|
||||||
ExprResult * val_rtrn,
|
ExprResult * val_rtrn,
|
||||||
IdentLookupFunc lookup, XPointer lookupPriv)
|
IdentLookupFunc lookup, char * lookupPriv)
|
||||||
{
|
{
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
ExprResult leftRtrn, rightRtrn;
|
ExprResult leftRtrn, rightRtrn;
|
||||||
|
@ -709,7 +709,7 @@ ExprResolveInteger(ExprDef * expr,
|
||||||
int
|
int
|
||||||
ExprResolveString(ExprDef * expr,
|
ExprResolveString(ExprDef * expr,
|
||||||
ExprResult * val_rtrn,
|
ExprResult * val_rtrn,
|
||||||
IdentLookupFunc lookup, XPointer lookupPriv)
|
IdentLookupFunc lookup, char * lookupPriv)
|
||||||
{
|
{
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
ExprResult leftRtrn, rightRtrn;
|
ExprResult leftRtrn, rightRtrn;
|
||||||
|
@ -817,7 +817,7 @@ ExprResolveString(ExprDef * expr,
|
||||||
int
|
int
|
||||||
ExprResolveKeyName(ExprDef * expr,
|
ExprResolveKeyName(ExprDef * expr,
|
||||||
ExprResult * val_rtrn,
|
ExprResult * val_rtrn,
|
||||||
IdentLookupFunc lookup, XPointer lookupPriv)
|
IdentLookupFunc lookup, char * lookupPriv)
|
||||||
{
|
{
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
ExprDef *left;
|
ExprDef *left;
|
||||||
|
@ -912,7 +912,7 @@ ExprResolveEnum(ExprDef * expr, ExprResult * val_rtrn, LookupEntry * values)
|
||||||
exprOpText(expr->op));
|
exprOpText(expr->op));
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
if (!SimpleLookup((XPointer) values, (Atom) None, expr->value.str,
|
if (!SimpleLookup((char *) values, (Atom) None, expr->value.str,
|
||||||
(unsigned) TypeInt, val_rtrn))
|
(unsigned) TypeInt, val_rtrn))
|
||||||
{
|
{
|
||||||
int nOut = 0;
|
int nOut = 0;
|
||||||
|
@ -936,7 +936,7 @@ ExprResolveEnum(ExprDef * expr, ExprResult * val_rtrn, LookupEntry * values)
|
||||||
int
|
int
|
||||||
ExprResolveMask(ExprDef * expr,
|
ExprResolveMask(ExprDef * expr,
|
||||||
ExprResult * val_rtrn,
|
ExprResult * val_rtrn,
|
||||||
IdentLookupFunc lookup, XPointer lookupPriv)
|
IdentLookupFunc lookup, char * lookupPriv)
|
||||||
{
|
{
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
ExprResult leftRtrn, rightRtrn;
|
ExprResult leftRtrn, rightRtrn;
|
||||||
|
@ -1043,7 +1043,7 @@ ExprResolveMask(ExprDef * expr,
|
||||||
int
|
int
|
||||||
ExprResolveKeySym(ExprDef * expr,
|
ExprResolveKeySym(ExprDef * expr,
|
||||||
ExprResult * val_rtrn,
|
ExprResult * val_rtrn,
|
||||||
IdentLookupFunc lookup, XPointer lookupPriv)
|
IdentLookupFunc lookup, char * lookupPriv)
|
||||||
{
|
{
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
KeySym sym;
|
KeySym sym;
|
||||||
|
|
|
@ -35,7 +35,7 @@ typedef union _ExprResult
|
||||||
XkbKeyNameRec keyName;
|
XkbKeyNameRec keyName;
|
||||||
} ExprResult;
|
} ExprResult;
|
||||||
|
|
||||||
typedef Bool(*IdentLookupFunc) (XPointer /* priv */ ,
|
typedef Bool(*IdentLookupFunc) (char * /* priv */ ,
|
||||||
Atom /* elem */ ,
|
Atom /* elem */ ,
|
||||||
Atom /* field */ ,
|
Atom /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
|
@ -53,9 +53,9 @@ extern int ExprResolveLhs(ExprDef * /* expr */ ,
|
||||||
|
|
||||||
typedef struct _LookupPriv
|
typedef struct _LookupPriv
|
||||||
{
|
{
|
||||||
XPointer priv;
|
char * priv;
|
||||||
IdentLookupFunc chain;
|
IdentLookupFunc chain;
|
||||||
XPointer chainPriv;
|
char * chainPriv;
|
||||||
} LookupPriv;
|
} LookupPriv;
|
||||||
|
|
||||||
typedef struct _LookupEntry
|
typedef struct _LookupEntry
|
||||||
|
@ -75,35 +75,35 @@ typedef struct _LookupTable
|
||||||
extern char *exprOpText(unsigned /* type */
|
extern char *exprOpText(unsigned /* type */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int RadioLookup(XPointer /* priv */ ,
|
extern int RadioLookup(char * /* priv */ ,
|
||||||
Atom /* elem */ ,
|
Atom /* elem */ ,
|
||||||
Atom /* field */ ,
|
Atom /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int SimpleLookup(XPointer /* priv */ ,
|
extern int SimpleLookup(char * /* priv */ ,
|
||||||
Atom /* elem */ ,
|
Atom /* elem */ ,
|
||||||
Atom /* field */ ,
|
Atom /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int TableLookup(XPointer /* priv */ ,
|
extern int TableLookup(char * /* priv */ ,
|
||||||
Atom /* elem */ ,
|
Atom /* elem */ ,
|
||||||
Atom /* field */ ,
|
Atom /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int LookupModIndex(XPointer /* priv */ ,
|
extern int LookupModIndex(char * /* priv */ ,
|
||||||
Atom /* elem */ ,
|
Atom /* elem */ ,
|
||||||
Atom /* field */ ,
|
Atom /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int LookupModMask(XPointer /* priv */ ,
|
extern int LookupModMask(char * /* priv */ ,
|
||||||
Atom /* elem */ ,
|
Atom /* elem */ ,
|
||||||
Atom /* field */ ,
|
Atom /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
|
@ -113,43 +113,43 @@ extern int LookupModMask(XPointer /* priv */ ,
|
||||||
extern int ExprResolveModIndex(ExprDef * /* expr */ ,
|
extern int ExprResolveModIndex(ExprDef * /* expr */ ,
|
||||||
ExprResult * /* val_rtrn */ ,
|
ExprResult * /* val_rtrn */ ,
|
||||||
IdentLookupFunc /* lookup */ ,
|
IdentLookupFunc /* lookup */ ,
|
||||||
XPointer /* lookupPriv */
|
char * /* lookupPriv */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int ExprResolveModMask(ExprDef * /* expr */ ,
|
extern int ExprResolveModMask(ExprDef * /* expr */ ,
|
||||||
ExprResult * /* val_rtrn */ ,
|
ExprResult * /* val_rtrn */ ,
|
||||||
IdentLookupFunc /* lookup */ ,
|
IdentLookupFunc /* lookup */ ,
|
||||||
XPointer /* priv */
|
char * /* priv */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int ExprResolveBoolean(ExprDef * /* expr */ ,
|
extern int ExprResolveBoolean(ExprDef * /* expr */ ,
|
||||||
ExprResult * /* val_rtrn */ ,
|
ExprResult * /* val_rtrn */ ,
|
||||||
IdentLookupFunc /* lookup */ ,
|
IdentLookupFunc /* lookup */ ,
|
||||||
XPointer /* lookupPriv */
|
char * /* lookupPriv */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int ExprResolveInteger(ExprDef * /* expr */ ,
|
extern int ExprResolveInteger(ExprDef * /* expr */ ,
|
||||||
ExprResult * /* val_rtrn */ ,
|
ExprResult * /* val_rtrn */ ,
|
||||||
IdentLookupFunc /* lookup */ ,
|
IdentLookupFunc /* lookup */ ,
|
||||||
XPointer /* lookupPriv */
|
char * /* lookupPriv */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int ExprResolveFloat(ExprDef * /* expr */ ,
|
extern int ExprResolveFloat(ExprDef * /* expr */ ,
|
||||||
ExprResult * /* val_rtrn */ ,
|
ExprResult * /* val_rtrn */ ,
|
||||||
IdentLookupFunc /* lookup */ ,
|
IdentLookupFunc /* lookup */ ,
|
||||||
XPointer /* lookupPriv */
|
char * /* lookupPriv */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int ExprResolveString(ExprDef * /* expr */ ,
|
extern int ExprResolveString(ExprDef * /* expr */ ,
|
||||||
ExprResult * /* val_rtrn */ ,
|
ExprResult * /* val_rtrn */ ,
|
||||||
IdentLookupFunc /* lookup */ ,
|
IdentLookupFunc /* lookup */ ,
|
||||||
XPointer /* lookupPriv */
|
char * /* lookupPriv */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int ExprResolveKeyName(ExprDef * /* expr */ ,
|
extern int ExprResolveKeyName(ExprDef * /* expr */ ,
|
||||||
ExprResult * /* val_rtrn */ ,
|
ExprResult * /* val_rtrn */ ,
|
||||||
IdentLookupFunc /* lookup */ ,
|
IdentLookupFunc /* lookup */ ,
|
||||||
XPointer /* lookupPriv */
|
char * /* lookupPriv */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int ExprResolveEnum(ExprDef * /* expr */ ,
|
extern int ExprResolveEnum(ExprDef * /* expr */ ,
|
||||||
|
@ -160,13 +160,13 @@ extern int ExprResolveEnum(ExprDef * /* expr */ ,
|
||||||
extern int ExprResolveMask(ExprDef * /* expr */ ,
|
extern int ExprResolveMask(ExprDef * /* expr */ ,
|
||||||
ExprResult * /* val_rtrn */ ,
|
ExprResult * /* val_rtrn */ ,
|
||||||
IdentLookupFunc /* lookup */ ,
|
IdentLookupFunc /* lookup */ ,
|
||||||
XPointer /* lookupPriv */
|
char * /* lookupPriv */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int ExprResolveKeySym(ExprDef * /* expr */ ,
|
extern int ExprResolveKeySym(ExprDef * /* expr */ ,
|
||||||
ExprResult * /* val_rtrn */ ,
|
ExprResult * /* val_rtrn */ ,
|
||||||
IdentLookupFunc /* lookup */ ,
|
IdentLookupFunc /* lookup */ ,
|
||||||
XPointer /* lookupPriv */
|
char * /* lookupPriv */
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif /* EXPR_H */
|
#endif /* EXPR_H */
|
||||||
|
|
|
@ -211,7 +211,7 @@ SetIndicatorMapField(LEDInfo * led,
|
||||||
{
|
{
|
||||||
if (arrayNdx != NULL)
|
if (arrayNdx != NULL)
|
||||||
return ReportIndicatorNotArray(xkb->dpy, led, field);
|
return ReportIndicatorNotArray(xkb->dpy, led, field);
|
||||||
if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (XPointer) xkb))
|
if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (char *) xkb))
|
||||||
return ReportIndicatorBadType(xkb->dpy, led, field,
|
return ReportIndicatorBadType(xkb->dpy, led, field,
|
||||||
"modifier mask");
|
"modifier mask");
|
||||||
led->real_mods = rtrn.uval & 0xff;
|
led->real_mods = rtrn.uval & 0xff;
|
||||||
|
@ -223,7 +223,7 @@ SetIndicatorMapField(LEDInfo * led,
|
||||||
if (arrayNdx != NULL)
|
if (arrayNdx != NULL)
|
||||||
return ReportIndicatorNotArray(xkb->dpy, led, field);
|
return ReportIndicatorNotArray(xkb->dpy, led, field);
|
||||||
if (!ExprResolveMask
|
if (!ExprResolveMask
|
||||||
(value, &rtrn, SimpleLookup, (XPointer) groupNames))
|
(value, &rtrn, SimpleLookup, (char *) groupNames))
|
||||||
return ReportIndicatorBadType(xkb->dpy, led, field, "group mask");
|
return ReportIndicatorBadType(xkb->dpy, led, field, "group mask");
|
||||||
led->groups = rtrn.uval;
|
led->groups = rtrn.uval;
|
||||||
led->defs.defined |= _LED_Groups;
|
led->defs.defined |= _LED_Groups;
|
||||||
|
@ -234,7 +234,7 @@ SetIndicatorMapField(LEDInfo * led,
|
||||||
if (arrayNdx != NULL)
|
if (arrayNdx != NULL)
|
||||||
return ReportIndicatorNotArray(xkb->dpy, led, field);
|
return ReportIndicatorNotArray(xkb->dpy, led, field);
|
||||||
if (!ExprResolveMask
|
if (!ExprResolveMask
|
||||||
(value, &rtrn, SimpleLookup, (XPointer) ctrlNames))
|
(value, &rtrn, SimpleLookup, (char *) ctrlNames))
|
||||||
return ReportIndicatorBadType(xkb->dpy, led, field,
|
return ReportIndicatorBadType(xkb->dpy, led, field,
|
||||||
"controls mask");
|
"controls mask");
|
||||||
led->ctrls = rtrn.uval;
|
led->ctrls = rtrn.uval;
|
||||||
|
@ -258,7 +258,7 @@ SetIndicatorMapField(LEDInfo * led,
|
||||||
if (arrayNdx != NULL)
|
if (arrayNdx != NULL)
|
||||||
return ReportIndicatorNotArray(xkb->dpy, led, field);
|
return ReportIndicatorNotArray(xkb->dpy, led, field);
|
||||||
if (!ExprResolveMask(value, &rtrn, SimpleLookup,
|
if (!ExprResolveMask(value, &rtrn, SimpleLookup,
|
||||||
(XPointer) modComponentNames))
|
(char *) modComponentNames))
|
||||||
{
|
{
|
||||||
return ReportIndicatorBadType(xkb->dpy, led, field,
|
return ReportIndicatorBadType(xkb->dpy, led, field,
|
||||||
"mask of modifier state components");
|
"mask of modifier state components");
|
||||||
|
@ -270,7 +270,7 @@ SetIndicatorMapField(LEDInfo * led,
|
||||||
if (arrayNdx != NULL)
|
if (arrayNdx != NULL)
|
||||||
return ReportIndicatorNotArray(xkb->dpy, led, field);
|
return ReportIndicatorNotArray(xkb->dpy, led, field);
|
||||||
if (!ExprResolveMask(value, &rtrn, SimpleLookup,
|
if (!ExprResolveMask(value, &rtrn, SimpleLookup,
|
||||||
(XPointer) groupComponentNames))
|
(char *) groupComponentNames))
|
||||||
{
|
{
|
||||||
return ReportIndicatorBadType(xkb->dpy, led, field,
|
return ReportIndicatorBadType(xkb->dpy, led, field,
|
||||||
"mask of group state components");
|
"mask of group state components");
|
||||||
|
|
|
@ -689,7 +689,7 @@ SetMapEntry(KeyTypeInfo * type,
|
||||||
|
|
||||||
if (arrayNdx == NULL)
|
if (arrayNdx == NULL)
|
||||||
return ReportTypeShouldBeArray(type, "map entry");
|
return ReportTypeShouldBeArray(type, "map entry");
|
||||||
if (!ExprResolveModMask(arrayNdx, &rtrn, LookupVModMask, (XPointer) xkb))
|
if (!ExprResolveModMask(arrayNdx, &rtrn, LookupVModMask, (char *) xkb))
|
||||||
return ReportTypeBadType(type, "map entry", "modifier mask");
|
return ReportTypeBadType(type, "map entry", "modifier mask");
|
||||||
entry.mods.real_mods = rtrn.uval & 0xff; /* modifiers < 512 */
|
entry.mods.real_mods = rtrn.uval & 0xff; /* modifiers < 512 */
|
||||||
entry.mods.vmods = (rtrn.uval >> 8) & 0xffff; /* modifiers > 512 */
|
entry.mods.vmods = (rtrn.uval >> 8) & 0xffff; /* modifiers > 512 */
|
||||||
|
@ -709,7 +709,7 @@ SetMapEntry(KeyTypeInfo * type,
|
||||||
entry.mods.real_mods &= type->mask;
|
entry.mods.real_mods &= type->mask;
|
||||||
entry.mods.vmods &= type->vmask;
|
entry.mods.vmods &= type->vmask;
|
||||||
}
|
}
|
||||||
if (!ExprResolveInteger(value, &rtrn, SimpleLookup, (XPointer) lnames))
|
if (!ExprResolveInteger(value, &rtrn, SimpleLookup, (char *) lnames))
|
||||||
{
|
{
|
||||||
ERROR("Level specifications in a key type must be integer\n");
|
ERROR("Level specifications in a key type must be integer\n");
|
||||||
ACTION("Ignoring malformed level specification\n");
|
ACTION("Ignoring malformed level specification\n");
|
||||||
|
@ -736,7 +736,7 @@ SetPreserve(KeyTypeInfo * type,
|
||||||
|
|
||||||
if (arrayNdx == NULL)
|
if (arrayNdx == NULL)
|
||||||
return ReportTypeShouldBeArray(type, "preserve entry");
|
return ReportTypeShouldBeArray(type, "preserve entry");
|
||||||
if (!ExprResolveModMask(arrayNdx, &rtrn, LookupVModMask, (XPointer) xkb))
|
if (!ExprResolveModMask(arrayNdx, &rtrn, LookupVModMask, (char *) xkb))
|
||||||
return ReportTypeBadType(type, "preserve entry", "modifier mask");
|
return ReportTypeBadType(type, "preserve entry", "modifier mask");
|
||||||
new.defs = type->defs;
|
new.defs = type->defs;
|
||||||
new.defs.next = NULL;
|
new.defs.next = NULL;
|
||||||
|
@ -756,7 +756,7 @@ SetPreserve(KeyTypeInfo * type,
|
||||||
if (warningLevel > 0)
|
if (warningLevel > 0)
|
||||||
INFO1("%s\n", PreserveIndexTxt(type, xkb, &new));
|
INFO1("%s\n", PreserveIndexTxt(type, xkb, &new));
|
||||||
}
|
}
|
||||||
if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (XPointer) xkb))
|
if (!ExprResolveModMask(value, &rtrn, LookupVModMask, (char *) xkb))
|
||||||
{
|
{
|
||||||
ERROR("Preserve value in a key type is not a modifier mask\n");
|
ERROR("Preserve value in a key type is not a modifier mask\n");
|
||||||
ACTION2("Ignoring preserve[%s] in type %s\n",
|
ACTION2("Ignoring preserve[%s] in type %s\n",
|
||||||
|
@ -845,7 +845,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
|
||||||
|
|
||||||
if (arrayNdx == NULL)
|
if (arrayNdx == NULL)
|
||||||
return ReportTypeShouldBeArray(type, "level name");
|
return ReportTypeShouldBeArray(type, "level name");
|
||||||
if (!ExprResolveInteger(arrayNdx, &rtrn, SimpleLookup, (XPointer) lnames))
|
if (!ExprResolveInteger(arrayNdx, &rtrn, SimpleLookup, (char *) lnames))
|
||||||
return ReportTypeBadType(type, "level name", "integer");
|
return ReportTypeBadType(type, "level name", "integer");
|
||||||
if ((rtrn.ival < 1) || (rtrn.ival > XkbMaxShiftLevel + 1))
|
if ((rtrn.ival < 1) || (rtrn.ival > XkbMaxShiftLevel + 1))
|
||||||
{
|
{
|
||||||
|
@ -893,7 +893,7 @@ SetKeyTypeField(KeyTypeInfo * type,
|
||||||
ACTION("Illegal array subscript ignored\n");
|
ACTION("Illegal array subscript ignored\n");
|
||||||
}
|
}
|
||||||
/* get modifier mask for current type */
|
/* get modifier mask for current type */
|
||||||
if (!ExprResolveModMask(value, &tmp, LookupVModMask, (XPointer) xkb))
|
if (!ExprResolveModMask(value, &tmp, LookupVModMask, (char *) xkb))
|
||||||
{
|
{
|
||||||
ERROR("Key type mask field must be a modifier mask\n");
|
ERROR("Key type mask field must be a modifier mask\n");
|
||||||
ACTION("Key type definition ignored\n");
|
ACTION("Key type definition ignored\n");
|
||||||
|
|
|
@ -223,7 +223,7 @@ MergeNewField(unsigned field,
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
XPointer
|
char *
|
||||||
ClearCommonInfo(CommonInfo * cmn)
|
ClearCommonInfo(CommonInfo * cmn)
|
||||||
{
|
{
|
||||||
if (cmn != NULL)
|
if (cmn != NULL)
|
||||||
|
@ -238,7 +238,7 @@ ClearCommonInfo(CommonInfo * cmn)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
XPointer
|
char *
|
||||||
AddCommonInfo(CommonInfo * old, CommonInfo * new)
|
AddCommonInfo(CommonInfo * old, CommonInfo * new)
|
||||||
{
|
{
|
||||||
CommonInfo *first;
|
CommonInfo *first;
|
||||||
|
@ -252,9 +252,9 @@ AddCommonInfo(CommonInfo * old, CommonInfo * new)
|
||||||
if (old)
|
if (old)
|
||||||
{
|
{
|
||||||
old->next = new;
|
old->next = new;
|
||||||
return (XPointer) first;
|
return (char *) first;
|
||||||
}
|
}
|
||||||
return (XPointer) new;
|
return (char *) new;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
|
@ -47,10 +47,10 @@ extern Bool MergeNewField(unsigned /* field */ ,
|
||||||
unsigned * /* pCollide */
|
unsigned * /* pCollide */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern XPointer ClearCommonInfo(CommonInfo * /* cmn */
|
extern char * ClearCommonInfo(CommonInfo * /* cmn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern XPointer AddCommonInfo(CommonInfo * /* old */ ,
|
extern char * AddCommonInfo(CommonInfo * /* old */ ,
|
||||||
CommonInfo * /* new */
|
CommonInfo * /* new */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -910,7 +910,7 @@ GetGroupIndex(KeyInfo * key,
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
if (!ExprResolveInteger
|
if (!ExprResolveInteger
|
||||||
(arrayNdx, &tmp, SimpleLookup, (XPointer) groupNames))
|
(arrayNdx, &tmp, SimpleLookup, (char *) groupNames))
|
||||||
{
|
{
|
||||||
ERROR2("Illegal group index for %s of key %s\n", name,
|
ERROR2("Illegal group index for %s of key %s\n", name,
|
||||||
longText(key->name, XkbMessage));
|
longText(key->name, XkbMessage));
|
||||||
|
@ -1138,7 +1138,7 @@ SetSymbolsField(KeyInfo * key,
|
||||||
key->defs.defined |= _Key_Type_Dflt;
|
key->defs.defined |= _Key_Type_Dflt;
|
||||||
}
|
}
|
||||||
else if (!ExprResolveInteger(arrayNdx, &ndx, SimpleLookup,
|
else if (!ExprResolveInteger(arrayNdx, &ndx, SimpleLookup,
|
||||||
(XPointer) groupNames))
|
(char *) groupNames))
|
||||||
{
|
{
|
||||||
ERROR1("Illegal group index for type of key %s\n",
|
ERROR1("Illegal group index for type of key %s\n",
|
||||||
longText(key->name, XkbMessage));
|
longText(key->name, XkbMessage));
|
||||||
|
@ -1167,7 +1167,7 @@ SetSymbolsField(KeyInfo * key,
|
||||||
(uStrCaseCmp(field, "virtualmods") == 0) ||
|
(uStrCaseCmp(field, "virtualmods") == 0) ||
|
||||||
(uStrCaseCmp(field, "virtualmodifiers") == 0))
|
(uStrCaseCmp(field, "virtualmodifiers") == 0))
|
||||||
{
|
{
|
||||||
ok = ExprResolveModMask(value, &tmp, LookupVModMask, (XPointer) xkb);
|
ok = ExprResolveModMask(value, &tmp, LookupVModMask, (char *) xkb);
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
key->vmodmap = (tmp.uval >> 8);
|
key->vmodmap = (tmp.uval >> 8);
|
||||||
|
@ -1197,7 +1197,7 @@ SetSymbolsField(KeyInfo * key,
|
||||||
if (uStrCaseCmp(field, "permanentradiogroup") == 0)
|
if (uStrCaseCmp(field, "permanentradiogroup") == 0)
|
||||||
permanent = True;
|
permanent = True;
|
||||||
ok = ExprResolveInteger(value, &tmp, SimpleLookup,
|
ok = ExprResolveInteger(value, &tmp, SimpleLookup,
|
||||||
(XPointer) rgEntries);
|
(char *) rgEntries);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
ERROR1("Illegal radio group specification for %s\n",
|
ERROR1("Illegal radio group specification for %s\n",
|
||||||
|
@ -1336,7 +1336,7 @@ SetSymbolsField(KeyInfo * key,
|
||||||
(uStrCaseCmp(field, "redirectgroups") == 0))
|
(uStrCaseCmp(field, "redirectgroups") == 0))
|
||||||
{
|
{
|
||||||
if (!ExprResolveInteger
|
if (!ExprResolveInteger
|
||||||
(value, &tmp, SimpleLookup, (XPointer) groupNames))
|
(value, &tmp, SimpleLookup, (char *) groupNames))
|
||||||
{
|
{
|
||||||
ERROR1("Illegal group index for redirect of key %s\n",
|
ERROR1("Illegal group index for redirect of key %s\n",
|
||||||
longText(key->name, XkbMessage));
|
longText(key->name, XkbMessage));
|
||||||
|
@ -1375,7 +1375,7 @@ SetGroupName(SymbolsInfo * info, ExprDef * arrayNdx, ExprDef * value)
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
if (!ExprResolveInteger
|
if (!ExprResolveInteger
|
||||||
(arrayNdx, &tmp, SimpleLookup, (XPointer) groupNames))
|
(arrayNdx, &tmp, SimpleLookup, (char *) groupNames))
|
||||||
{
|
{
|
||||||
ERROR("Illegal index in group name definition\n");
|
ERROR("Illegal index in group name definition\n");
|
||||||
ACTION("Definition with non-integer array index ignored\n");
|
ACTION("Definition with non-integer array index ignored\n");
|
||||||
|
@ -1457,7 +1457,7 @@ HandleSymbolsVar(VarDef * stmt, XkbcDescPtr xkb, SymbolsInfo * info)
|
||||||
|| (uStrCaseCmp(field.str, "redirectgroups") == 0)))
|
|| (uStrCaseCmp(field.str, "redirectgroups") == 0)))
|
||||||
{
|
{
|
||||||
if (!ExprResolveInteger(stmt->value, &tmp,
|
if (!ExprResolveInteger(stmt->value, &tmp,
|
||||||
SimpleLookup, (XPointer) groupNames))
|
SimpleLookup, (char *) groupNames))
|
||||||
{
|
{
|
||||||
ERROR("Illegal group index for global groupsRedirect\n");
|
ERROR("Illegal group index for global groupsRedirect\n");
|
||||||
ACTION("Definition with non-integer group ignored\n");
|
ACTION("Definition with non-integer group ignored\n");
|
||||||
|
|
|
@ -167,7 +167,7 @@ HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
|
||||||
* undefined.
|
* undefined.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
LookupVModIndex(XPointer priv,
|
LookupVModIndex(char * priv,
|
||||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
register int i;
|
register int i;
|
||||||
|
@ -213,7 +213,7 @@ LookupVModIndex(XPointer priv,
|
||||||
* undefined.
|
* undefined.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
LookupVModMask(XPointer priv,
|
LookupVModMask(char * priv,
|
||||||
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
Atom elem, Atom field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
if (LookupVModIndex(priv, elem, field, type, val_rtrn))
|
if (LookupVModIndex(priv, elem, field, type, val_rtrn))
|
||||||
|
@ -232,7 +232,7 @@ FindKeypadVMod(XkbcDescPtr xkb)
|
||||||
ExprResult rtrn;
|
ExprResult rtrn;
|
||||||
|
|
||||||
name = XkbInternAtom(xkb->dpy, "NumLock", False);
|
name = XkbInternAtom(xkb->dpy, "NumLock", False);
|
||||||
if ((xkb) && LookupVModIndex((XPointer) xkb, None, name, TypeInt, &rtrn))
|
if ((xkb) && LookupVModIndex((char *) xkb, None, name, TypeInt, &rtrn))
|
||||||
{
|
{
|
||||||
return rtrn.ival;
|
return rtrn.ival;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,14 +53,14 @@ extern Bool ApplyVModDefs(VModInfo * /* info */ ,
|
||||||
XkbcDescPtr /* xkb */
|
XkbcDescPtr /* xkb */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int LookupVModIndex(XPointer /* priv */ ,
|
extern int LookupVModIndex(char * /* priv */ ,
|
||||||
Atom /* elem */ ,
|
Atom /* elem */ ,
|
||||||
Atom /* field */ ,
|
Atom /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int LookupVModMask(XPointer /* priv */ ,
|
extern int LookupVModMask(char * /* priv */ ,
|
||||||
Atom /* elem */ ,
|
Atom /* elem */ ,
|
||||||
Atom /* field */ ,
|
Atom /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
|
|
Loading…
Reference in New Issue