Rename Xkbc*Action to struct xkb_*_action

master
Kristian Høgsberg 2010-06-30 13:31:21 -04:00
parent 399d4bd678
commit 9258cc3dca
6 changed files with 89 additions and 88 deletions

View File

@ -65,50 +65,51 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Action structures used in the server */ /* Action structures used in the server */
#define XkbcAnyActionDataSize 18 #define XkbcAnyActionDataSize 18
typedef struct _XkbcAnyAction { struct xkb_any_action {
unsigned char type; unsigned char type;
unsigned char pad[XkbcAnyActionDataSize]; unsigned char pad[XkbcAnyActionDataSize];
} XkbcAnyAction; };
typedef struct _XkbcModAction { struct xkb_mod_action {
unsigned char type; unsigned char type;
uint8_t flags; uint8_t flags;
uint8_t real_mods; uint8_t real_mods;
uint32_t mask; uint32_t mask;
uint32_t vmods; uint32_t vmods;
} XkbcModAction; };
typedef struct _XkbcGroupAction { struct xkb_group_action {
unsigned char type; unsigned char type;
unsigned char flags; unsigned char flags;
int16_t group; int16_t group;
} XkbcGroupAction; };
typedef struct _XkbcISOAction { struct xkb_iso_action {
unsigned char type; unsigned char type;
uint8_t flags; uint8_t flags;
int16_t group; int16_t group;
uint32_t mask; uint32_t mask;
uint32_t vmods; uint32_t vmods;
uint8_t real_mods; uint8_t real_mods;
uint8_t affect;
} XkbcISOAction; uint8_t affect;
};
typedef struct _XkbcCtrlsAction { struct xkb_controls_action {
unsigned char type; unsigned char type;
uint8_t flags; uint8_t flags;
uint32_t ctrls; uint32_t ctrls;
} XkbcCtrlsAction; };
typedef struct _XkbcDeviceBtnAction { struct xkb_device_button_action {
unsigned char type; unsigned char type;
uint8_t flags; uint8_t flags;
uint16_t device; uint16_t device;
uint16_t button; uint16_t button;
uint8_t count; uint8_t count;
} XkbcDeviceBtnAction; };
typedef struct _XkbcDeviceValuatorAction { struct xkb_device_valuator_action {
unsigned char type; unsigned char type;
uint8_t v1_what; uint8_t v1_what;
uint16_t device; uint16_t device;
@ -117,37 +118,37 @@ typedef struct _XkbcDeviceValuatorAction {
uint16_t v2_index; uint16_t v2_index;
int16_t v2_value; int16_t v2_value;
uint8_t v2_what; uint8_t v2_what;
} XkbcDeviceValuatorAction; };
typedef struct _XkbcPtrDfltAction { struct xkb_pointer_default_action {
unsigned char type; unsigned char type;
uint8_t flags; uint8_t flags;
uint8_t affect; uint8_t affect;
uint8_t value; uint8_t value;
} XkbcPtrDfltAction; };
typedef struct _XkbcSwitchScreenAction { struct xkb_switch_screen_action {
unsigned char type; unsigned char type;
uint8_t flags; uint8_t flags;
uint8_t screen; uint8_t screen;
} XkbcSwitchScreenAction; };
typedef union _XkbcAction { union xkb_action {
XkbcAnyAction any; struct xkb_any_action any;
XkbcModAction mods; struct xkb_mod_action mods;
XkbcGroupAction group; struct xkb_group_action group;
XkbcISOAction iso; struct xkb_iso_action iso;
XkbcCtrlsAction ctrls; struct xkb_controls_action ctrls;
XkbcDeviceBtnAction devbtn; struct xkb_device_button_action devbtn;
XkbcDeviceValuatorAction devval; struct xkb_device_valuator_action devval;
XkbcPtrDfltAction dflt; struct xkb_pointer_default_action dflt;
XkbcSwitchScreenAction screen; struct xkb_switch_screen_action screen;
XkbRedirectKeyAction redirect; /* XXX wholly unnecessary? */ XkbRedirectKeyAction redirect; /* XXX wholly unnecessary? */
XkbPtrAction ptr; /* XXX delete for DeviceValuator */ XkbPtrAction ptr; /* XXX delete for DeviceValuator */
XkbPtrBtnAction btn; /* XXX delete for DeviceBtn */ XkbPtrBtnAction btn; /* XXX delete for DeviceBtn */
XkbMessageAction msg; /* XXX just delete */ XkbMessageAction msg; /* XXX just delete */
unsigned char type; unsigned char type;
} XkbcAction; };
typedef struct _XkbcMods { typedef struct _XkbcMods {
uint32_t mask; /* effective mods */ uint32_t mask; /* effective mods */
@ -177,7 +178,7 @@ typedef struct _XkbcSymInterpretRec {
unsigned char match; unsigned char match;
uint8_t mods; /* XXX real or virt? */ uint8_t mods; /* XXX real or virt? */
uint32_t virtual_mod; uint32_t virtual_mod;
XkbcAnyAction act; struct xkb_any_action act;
} XkbcSymInterpretRec, *XkbcSymInterpretPtr; } XkbcSymInterpretRec, *XkbcSymInterpretPtr;
typedef struct _XkbcCompatMapRec { typedef struct _XkbcCompatMapRec {
@ -211,7 +212,7 @@ typedef struct _XkbcServerMapRec {
unsigned char * explicit; unsigned char * explicit;
#endif #endif
XkbcAction *acts; union xkb_action *acts;
XkbBehavior *behaviors; XkbBehavior *behaviors;
unsigned short *key_acts; unsigned short *key_acts;
unsigned char *explicits; unsigned char *explicits;

View File

@ -168,7 +168,7 @@ XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions)
nNewActions = 1; nNewActions = 1;
if (!map->acts) { if (!map->acts) {
map->acts = _XkbTypedCalloc(nNewActions + 1, XkbcAction); map->acts = _XkbTypedCalloc(nNewActions + 1, union xkb_action);
if (!map->acts) if (!map->acts)
return BadAlloc; return BadAlloc;
map->num_acts = 1; map->num_acts = 1;
@ -176,10 +176,10 @@ XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions)
} }
else if ((map->size_acts - map->num_acts) < nNewActions) { else if ((map->size_acts - map->num_acts) < nNewActions) {
unsigned need; unsigned need;
XkbcAction *prev_acts = map->acts; union xkb_action *prev_acts = map->acts;
need = map->num_acts + nNewActions; need = map->num_acts + nNewActions;
map->acts = _XkbTypedRealloc(map->acts, need, XkbcAction); map->acts = _XkbTypedRealloc(map->acts, need, union xkb_action);
if (!map->acts) { if (!map->acts) {
_XkbFree(prev_acts); _XkbFree(prev_acts);
map->num_acts = map->size_acts = 0; map->num_acts = map->size_acts = 0;
@ -188,7 +188,7 @@ XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions)
map->size_acts = need; map->size_acts = need;
bzero(&map->acts[map->num_acts], bzero(&map->acts[map->num_acts],
(map->size_acts - map->num_acts) * sizeof(XkbcAction)); (map->size_acts - map->num_acts) * sizeof(union xkb_action));
} }
if (!map->key_acts) { if (!map->key_acts) {
@ -815,11 +815,11 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
return Success; return Success;
} }
XkbcAction * union xkb_action *
XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed) XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed)
{ {
int i, nActs; int i, nActs;
XkbcAction *newActs; union xkb_action *newActs;
if (needed == 0) { if (needed == 0) {
xkb->server->key_acts[key] = 0; xkb->server->key_acts[key] = 0;
@ -838,7 +838,7 @@ XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed)
} }
xkb->server->size_acts = xkb->server->num_acts + needed + 8; xkb->server->size_acts = xkb->server->num_acts + needed + 8;
newActs = _XkbTypedCalloc(xkb->server->size_acts, XkbcAction); newActs = _XkbTypedCalloc(xkb->server->size_acts, union xkb_action);
if (!newActs) if (!newActs)
return NULL; return NULL;
newActs[0].type = XkbSA_NoAction; newActs[0].type = XkbSA_NoAction;
@ -859,10 +859,10 @@ XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed)
if (nCopy > 0) if (nCopy > 0)
memcpy(&newActs[nActs], XkbKeyActionsPtr(xkb, i), memcpy(&newActs[nActs], XkbKeyActionsPtr(xkb, i),
nCopy * sizeof(XkbcAction)); nCopy * sizeof(union xkb_action));
if (nCopy < nKeyActs) if (nCopy < nKeyActs)
bzero(&newActs[nActs + nCopy], bzero(&newActs[nActs + nCopy],
(nKeyActs - nCopy) * sizeof(XkbcAction)); (nKeyActs - nCopy) * sizeof(union xkb_action));
xkb->server->key_acts[i] = nActs; xkb->server->key_acts[i] = nActs;
nActs += nKeyActs; nActs += nKeyActs;

View File

@ -89,7 +89,7 @@ extern int
XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC, XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
XkbChangesPtr changes); XkbChangesPtr changes);
extern XkbcAction * extern union xkb_action *
XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed); XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed);
extern void extern void

View File

@ -334,7 +334,7 @@ ReportNotFound(unsigned action, unsigned field, const char *what, char *bad)
static Bool static Bool
HandleNoAction(XkbcDescPtr xkb, HandleNoAction(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
return ReportIllegal(action->type, field); return ReportIllegal(action->type, field);
@ -392,14 +392,14 @@ CheckModifierField(XkbcDescPtr xkb,
static Bool static Bool
HandleSetLatchMods(XkbcDescPtr xkb, HandleSetLatchMods(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
XkbcModAction *act; struct xkb_mod_action *act;
unsigned rtrn; unsigned rtrn;
unsigned t1, t2; unsigned t1, t2;
act = (XkbcModAction *) action; act = (struct xkb_mod_action *) action;
if (array_ndx != NULL) if (array_ndx != NULL)
{ {
switch (field) switch (field)
@ -437,13 +437,13 @@ HandleSetLatchMods(XkbcDescPtr xkb,
static Bool static Bool
HandleLockMods(XkbcDescPtr xkb, HandleLockMods(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
XkbcModAction *act; struct xkb_mod_action *act;
unsigned t1, t2; unsigned t1, t2;
act = (XkbcModAction *) action; act = (struct xkb_mod_action *) action;
if ((array_ndx != NULL) && (field == F_Modifiers)) if ((array_ndx != NULL) && (field == F_Modifiers))
return ReportActionNotArray(action->type, field); return ReportActionNotArray(action->type, field);
switch (field) switch (field)
@ -512,7 +512,7 @@ CheckGroupField(unsigned action,
static Bool static Bool
HandleSetLatchGroup(XkbcDescPtr xkb, HandleSetLatchGroup(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
XkbGroupAction *act; XkbGroupAction *act;
@ -557,7 +557,7 @@ HandleSetLatchGroup(XkbcDescPtr xkb,
static Bool static Bool
HandleLockGroup(XkbcDescPtr xkb, HandleLockGroup(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
XkbGroupAction *act; XkbGroupAction *act;
@ -583,7 +583,7 @@ HandleLockGroup(XkbcDescPtr xkb,
static Bool static Bool
HandleMovePtr(XkbcDescPtr xkb, HandleMovePtr(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
@ -648,7 +648,7 @@ static LookupEntry lockWhich[] = {
static Bool static Bool
HandlePtrBtn(XkbcDescPtr xkb, HandlePtrBtn(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
@ -710,7 +710,7 @@ static LookupEntry ptrDflts[] = {
static Bool static Bool
HandleSetPtrDflt(XkbcDescPtr xkb, HandleSetPtrDflt(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
@ -783,15 +783,15 @@ static LookupEntry isoNames[] = {
static Bool static Bool
HandleISOLock(XkbcDescPtr xkb, HandleISOLock(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
XkbcISOAction *act; struct xkb_iso_action *act;
unsigned flags, mods; unsigned flags, mods;
int group; int group;
act = (XkbcISOAction *) action; act = (struct xkb_iso_action *) action;
switch (field) switch (field)
{ {
case F_Modifiers: case F_Modifiers:
@ -830,7 +830,7 @@ HandleISOLock(XkbcDescPtr xkb,
static Bool static Bool
HandleSwitchScreen(XkbcDescPtr xkb, HandleSwitchScreen(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
@ -922,13 +922,13 @@ LookupEntry ctrlNames[] = {
static Bool static Bool
HandleSetLockControls(XkbcDescPtr xkb, HandleSetLockControls(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
XkbcCtrlsAction *act; struct xkb_controls_action *act;
act = (XkbcCtrlsAction *) action; act = (struct xkb_controls_action *) action;
if (field == F_Controls) if (field == F_Controls)
{ {
if (array_ndx != NULL) if (array_ndx != NULL)
@ -954,7 +954,7 @@ static LookupEntry evNames[] = {
static Bool static Bool
HandleActionMessage(XkbcDescPtr xkb, HandleActionMessage(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
@ -1032,7 +1032,7 @@ HandleActionMessage(XkbcDescPtr xkb,
static Bool static Bool
HandleRedirectKey(XkbcDescPtr xkb, HandleRedirectKey(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
@ -1083,7 +1083,7 @@ HandleRedirectKey(XkbcDescPtr xkb,
static Bool static Bool
HandleDeviceBtn(XkbcDescPtr xkb, HandleDeviceBtn(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
@ -1153,7 +1153,7 @@ HandleDeviceBtn(XkbcDescPtr xkb,
static Bool static Bool
HandleDeviceValuator(XkbcDescPtr xkb, HandleDeviceValuator(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
#if 0 #if 0
@ -1168,7 +1168,7 @@ HandleDeviceValuator(XkbcDescPtr xkb,
static Bool static Bool
HandlePrivate(XkbcDescPtr xkb, HandlePrivate(XkbcDescPtr xkb,
XkbcAnyAction * action, struct xkb_any_action * action,
unsigned field, ExprDef * array_ndx, ExprDef * value) unsigned field, ExprDef * array_ndx, ExprDef * value)
{ {
ExprResult rtrn; ExprResult rtrn;
@ -1237,7 +1237,7 @@ HandlePrivate(XkbcDescPtr xkb,
} }
typedef Bool(*actionHandler) (XkbcDescPtr /* xkb */ , typedef Bool(*actionHandler) (XkbcDescPtr /* xkb */ ,
XkbcAnyAction * /* action */ , struct xkb_any_action * /* action */ ,
unsigned /* field */ , unsigned /* field */ ,
ExprDef * /* array_ndx */ , ExprDef * /* array_ndx */ ,
ExprDef * /* value */ ExprDef * /* value */
@ -1271,7 +1271,7 @@ static actionHandler handleAction[XkbSA_NumActions + 1] = {
/***====================================================================***/ /***====================================================================***/
static void static void
ApplyActionFactoryDefaults(XkbcAction * action) ApplyActionFactoryDefaults(union xkb_action * action)
{ {
if (action->type == XkbSA_SetPtrDflt) if (action->type == XkbSA_SetPtrDflt)
{ /* increment default button */ { /* increment default button */
@ -1290,7 +1290,7 @@ ApplyActionFactoryDefaults(XkbcAction * action)
int int
HandleActionDef(ExprDef * def, HandleActionDef(ExprDef * def,
XkbcDescPtr xkb, XkbcDescPtr xkb,
XkbcAnyAction * action, unsigned mergeMode, ActionInfo * info) struct xkb_any_action * action, unsigned mergeMode, ActionInfo * info)
{ {
ExprDef *arg; ExprDef *arg;
register char *str; register char *str;
@ -1319,7 +1319,7 @@ HandleActionDef(ExprDef * def,
action->type = hndlrType = tmp; action->type = hndlrType = tmp;
if (action->type != XkbSA_NoAction) if (action->type != XkbSA_NoAction)
{ {
ApplyActionFactoryDefaults((XkbcAction *) action); ApplyActionFactoryDefaults((union xkb_action *) action);
while (info) while (info)
{ {
if ((info->action == XkbSA_NoAction) if ((info->action == XkbSA_NoAction)

View File

@ -66,7 +66,7 @@ typedef struct _ActionInfo
extern int HandleActionDef(ExprDef * /* def */ , extern int HandleActionDef(ExprDef * /* def */ ,
XkbcDescPtr /* xkb */ , XkbcDescPtr /* xkb */ ,
XkbcAnyAction * /* action */ , struct xkb_any_action * /* action */ ,
unsigned /* mergeMode */ , unsigned /* mergeMode */ ,
ActionInfo * /* info */ ActionInfo * /* info */
); );

View File

@ -71,7 +71,7 @@ typedef struct _KeyInfo
unsigned char actsDefined; unsigned char actsDefined;
short numLevels[XkbNumKbdGroups]; short numLevels[XkbNumKbdGroups];
uint32_t *syms[XkbNumKbdGroups]; uint32_t *syms[XkbNumKbdGroups];
XkbcAction *acts[XkbNumKbdGroups]; union xkb_action *acts[XkbNumKbdGroups];
uint32_t types[XkbNumKbdGroups]; uint32_t types[XkbNumKbdGroups];
unsigned repeat; unsigned repeat;
XkbBehavior behavior; XkbBehavior behavior;
@ -190,14 +190,14 @@ CopyKeyInfo(KeyInfo * old, KeyInfo * new, Bool clearOld)
} }
if (old->acts[i] != NULL) if (old->acts[i] != NULL)
{ {
new->acts[i] = uTypedCalloc(width, XkbcAction); new->acts[i] = uTypedCalloc(width, union xkb_action);
if (!new->acts[i]) if (!new->acts[i])
{ {
new->acts[i] = NULL; new->acts[i] = NULL;
return False; return False;
} }
memcpy((char *) new->acts[i], (char *) old->acts[i], memcpy((char *) new->acts[i], (char *) old->acts[i],
width * sizeof(XkbcAction)); width * sizeof(union xkb_action));
} }
} }
} }
@ -324,7 +324,7 @@ ResizeKeyGroup(KeyInfo * key,
{ {
key->acts[group] = uTypedRecalloc(key->acts[group], key->acts[group] = uTypedRecalloc(key->acts[group],
key->numLevels[group], newWidth, key->numLevels[group], newWidth,
XkbcAction); union xkb_action);
if (!key->acts[group]) if (!key->acts[group])
return False; return False;
} }
@ -337,7 +337,7 @@ MergeKeyGroups(SymbolsInfo * info,
KeyInfo * into, KeyInfo * from, unsigned group) KeyInfo * into, KeyInfo * from, unsigned group)
{ {
uint32_t *resultSyms; uint32_t *resultSyms;
XkbcAction *resultActs; union xkb_action *resultActs;
int resultWidth; int resultWidth;
register int i; register int i;
Bool report, clobber; Bool report, clobber;
@ -370,7 +370,7 @@ MergeKeyGroups(SymbolsInfo * info,
} }
if ((resultActs == NULL) && (into->acts[group] || from->acts[group])) if ((resultActs == NULL) && (into->acts[group] || from->acts[group]))
{ {
resultActs = uTypedCalloc(resultWidth, XkbcAction); resultActs = uTypedCalloc(resultWidth, union xkb_action);
if (!resultActs) if (!resultActs)
{ {
WSGO("Could not allocate actions for group merge\n"); WSGO("Could not allocate actions for group merge\n");
@ -419,7 +419,7 @@ MergeKeyGroups(SymbolsInfo * info,
} }
if (resultActs != NULL) if (resultActs != NULL)
{ {
XkbcAction *fromAct, *toAct; union xkb_action *fromAct, *toAct;
fromAct = (from->acts[group] ? &from->acts[group][i] : NULL); fromAct = (from->acts[group] ? &from->acts[group][i] : NULL);
toAct = (into->acts[group] ? &into->acts[group][i] : NULL); toAct = (into->acts[group] ? &into->acts[group][i] : NULL);
if (((fromAct == NULL) || (fromAct->type == XkbSA_NoAction)) if (((fromAct == NULL) || (fromAct->type == XkbSA_NoAction))
@ -434,7 +434,7 @@ MergeKeyGroups(SymbolsInfo * info,
} }
else else
{ {
XkbcAction *use, *ignore; union xkb_action *use, *ignore;
if (clobber) if (clobber)
{ {
use = fromAct; use = fromAct;
@ -993,7 +993,7 @@ AddActionsToKey(KeyInfo * key,
register int i; register int i;
unsigned ndx, nActs; unsigned ndx, nActs;
ExprDef *act; ExprDef *act;
XkbcAnyAction *toAct; struct xkb_any_action *toAct;
if (!GetGroupIndex(key, arrayNdx, ACTIONS, &ndx)) if (!GetGroupIndex(key, arrayNdx, ACTIONS, &ndx))
return False; return False;
@ -1035,7 +1035,7 @@ AddActionsToKey(KeyInfo * key,
} }
key->actsDefined |= (1 << ndx); key->actsDefined |= (1 << ndx);
toAct = (XkbcAnyAction *) key->acts[ndx]; toAct = (struct xkb_any_action *) key->acts[ndx];
act = value->value.child; act = value->value.child;
for (i = 0; i < nActs; i++, toAct++) for (i = 0; i < nActs; i++, toAct++)
{ {
@ -1568,7 +1568,7 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
key->syms[i] = (uint32_t *) NULL; key->syms[i] = (uint32_t *) NULL;
if (key->acts[i] != NULL) if (key->acts[i] != NULL)
free(key->acts[i]); free(key->acts[i]);
key->acts[i] = (XkbcAction *) NULL; key->acts[i] = (union xkb_action *) NULL;
key->types[i] = (uint32_t) 0; key->types[i] = (uint32_t) 0;
} }
} }
@ -1579,7 +1579,7 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
key->syms[group] = key->syms[0]; key->syms[group] = key->syms[0];
key->syms[0] = (uint32_t *) NULL; key->syms[0] = (uint32_t *) NULL;
key->acts[group] = key->acts[0]; key->acts[group] = key->acts[0];
key->acts[0] = (XkbcAction *) NULL; key->acts[0] = (union xkb_action *) NULL;
key->types[group] = key->types[0]; key->types[group] = key->types[0];
key->types[0] = (uint32_t) 0; key->types[0] = (uint32_t) 0;
return True; return True;
@ -1876,11 +1876,11 @@ PrepareKeyDef(KeyInfo * key)
} }
if ((key->actsDefined & 1) && key->acts[0]) if ((key->actsDefined & 1) && key->acts[0])
{ {
key->acts[i] = uTypedCalloc(width, XkbcAction); key->acts[i] = uTypedCalloc(width, union xkb_action);
if (key->acts[i] == NULL) if (key->acts[i] == NULL)
continue; continue;
memcpy((void *) key->acts[i], (void *) key->acts[0], memcpy((void *) key->acts[i], (void *) key->acts[0],
width * sizeof(XkbcAction)); width * sizeof(union xkb_action));
key->actsDefined |= 1 << i; key->actsDefined |= 1 << i;
} }
if ((key->symsDefined & 1) && key->syms[0]) if ((key->symsDefined & 1) && key->syms[0])
@ -1919,7 +1919,7 @@ PrepareKeyDef(KeyInfo * key)
if ((key->acts[i] != key->acts[0]) && if ((key->acts[i] != key->acts[0]) &&
(key->acts[i] == NULL || key->acts[0] == NULL || (key->acts[i] == NULL || key->acts[0] == NULL ||
memcmp((void *) key->acts[i], (void *) key->acts[0], memcmp((void *) key->acts[i], (void *) key->acts[0],
sizeof(XkbcAction) * key->numLevels[0]))) sizeof(union xkb_action) * key->numLevels[0])))
{ {
identical = False; identical = False;
break; break;
@ -1935,7 +1935,7 @@ PrepareKeyDef(KeyInfo * key)
key->syms[i] = (uint32_t *) NULL; key->syms[i] = (uint32_t *) NULL;
if (key->acts[i] != NULL) if (key->acts[i] != NULL)
free(key->acts[i]); free(key->acts[i]);
key->acts[i] = (XkbcAction *) NULL; key->acts[i] = (union xkb_action *) NULL;
key->types[i] = (uint32_t) 0; key->types[i] = (uint32_t) 0;
} }
key->symsDefined &= 1; key->symsDefined &= 1;
@ -1958,7 +1958,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
XkbcKeyTypePtr type; XkbcKeyTypePtr type;
Bool haveActions, autoType, useAlias; Bool haveActions, autoType, useAlias;
uint32_t *outSyms; uint32_t *outSyms;
XkbcAction *outActs; union xkb_action *outActs;
unsigned types[XkbNumKbdGroups]; unsigned types[XkbNumKbdGroups];
useAlias = (start_from == 0); useAlias = (start_from == 0);