aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/xkb.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-22 15:20:09 +0200
committermarha <marha@users.sourceforge.net>2011-09-22 15:20:09 +0200
commitc1e6c7428a8d2c1b60ffac7df7a3f56c300fa983 (patch)
tree8874978d314129a4f47ee575b076c2d8eb1a8738 /xorg-server/xkb/xkb.c
parent37466741e35c5eb3b204863a5023bf8d192efc06 (diff)
downloadvcxsrv-c1e6c7428a8d2c1b60ffac7df7a3f56c300fa983.tar.gz
vcxsrv-c1e6c7428a8d2c1b60ffac7df7a3f56c300fa983.tar.bz2
vcxsrv-c1e6c7428a8d2c1b60ffac7df7a3f56c300fa983.zip
libxtrans libX11 libX11 libXext mesa xserver git update 22 sep 2011
Diffstat (limited to 'xorg-server/xkb/xkb.c')
-rw-r--r--xorg-server/xkb/xkb.c413
1 files changed, 181 insertions, 232 deletions
diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c
index 9c66955f4..ac0b4278f 100644
--- a/xorg-server/xkb/xkb.c
+++ b/xorg-server/xkb/xkb.c
@@ -158,7 +158,6 @@ ProcXkbUseExtension(ClientPtr client)
{
REQUEST(xkbUseExtensionReq);
xkbUseExtensionReply rep;
- register int n;
int supported;
REQUEST_SIZE_MATCH(xkbUseExtensionReq);
@@ -189,9 +188,9 @@ ProcXkbUseExtension(ClientPtr client)
rep.serverMajor = SERVER_XKB_MAJOR_VERSION;
rep.serverMinor = SERVER_XKB_MINOR_VERSION;
if ( client->swapped ) {
- swaps(&rep.sequenceNumber, n);
- swaps(&rep.serverMajor, n);
- swaps(&rep.serverMinor, n);
+ swaps(&rep.sequenceNumber);
+ swaps(&rep.serverMajor);
+ swaps(&rep.serverMinor);
}
WriteToClient(client,SIZEOF(xkbUseExtensionReply), (char *)&rep);
return Success;
@@ -574,9 +573,8 @@ ProcXkbGetState(ClientPtr client)
rep.compatState = xkb->compat_state;
rep.ptrBtnState = xkb->ptr_buttons;
if (client->swapped) {
- register int n;
- swaps(&rep.sequenceNumber,n);
- swaps(&rep.ptrBtnState,n);
+ swaps(&rep.sequenceNumber);
+ swaps(&rep.ptrBtnState);
}
WriteToClient(client, SIZEOF(xkbGetStateReply), (char *)&rep);
return Success;
@@ -658,7 +656,6 @@ ProcXkbGetControls(ClientPtr client)
xkbGetControlsReply rep;
XkbControlsPtr xkb;
DeviceIntPtr dev;
- register int n;
REQUEST(xkbGetControlsReq);
REQUEST_SIZE_MATCH(xkbGetControlsReq);
@@ -701,26 +698,26 @@ ProcXkbGetControls(ClientPtr client)
rep.axOptions = xkb->ax_options;
memcpy(rep.perKeyRepeat,xkb->per_key_repeat,XkbPerKeyBitArraySize);
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length,n);
- swaps(&rep.internalVMods, n);
- swaps(&rep.ignoreLockVMods, n);
- swapl(&rep.enabledCtrls, n);
- swaps(&rep.repeatDelay, n);
- swaps(&rep.repeatInterval, n);
- swaps(&rep.slowKeysDelay, n);
- swaps(&rep.debounceDelay, n);
- swaps(&rep.mkDelay, n);
- swaps(&rep.mkInterval, n);
- swaps(&rep.mkTimeToMax, n);
- swaps(&rep.mkMaxSpeed, n);
- swaps(&rep.mkCurve, n);
- swaps(&rep.axTimeout, n);
- swapl(&rep.axtCtrlsMask, n);
- swapl(&rep.axtCtrlsValues, n);
- swaps(&rep.axtOptsMask, n);
- swaps(&rep.axtOptsValues, n);
- swaps(&rep.axOptions, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swaps(&rep.internalVMods);
+ swaps(&rep.ignoreLockVMods);
+ swapl(&rep.enabledCtrls);
+ swaps(&rep.repeatDelay);
+ swaps(&rep.repeatInterval);
+ swaps(&rep.slowKeysDelay);
+ swaps(&rep.debounceDelay);
+ swaps(&rep.mkDelay);
+ swaps(&rep.mkInterval);
+ swaps(&rep.mkTimeToMax);
+ swaps(&rep.mkMaxSpeed);
+ swaps(&rep.mkCurve);
+ swaps(&rep.axTimeout);
+ swapl(&rep.axtCtrlsMask);
+ swapl(&rep.axtCtrlsValues);
+ swaps(&rep.axtOptsMask);
+ swaps(&rep.axtOptsValues);
+ swaps(&rep.axOptions);
}
WriteToClient(client, SIZEOF(xkbGetControlsReply), (char *)&rep);
return Success;
@@ -999,8 +996,7 @@ XkbWriteKeyTypes( XkbDescPtr xkb,
wire->nMapEntries = type->map_count;
wire->preserve = (type->preserve!=NULL);
if (client->swapped) {
- register int n;
- swaps(&wire->virtualMods,n);
+ swaps(&wire->virtualMods);
}
buf= (char *)&wire[1];
@@ -1016,8 +1012,7 @@ XkbWriteKeyTypes( XkbDescPtr xkb,
wire->realMods= entry->mods.real_mods;
wire->virtualMods= entry->mods.vmods;
if (client->swapped) {
- register int n;
- swaps(&wire->virtualMods,n);
+ swaps(&wire->virtualMods);
}
}
buf= (char *)wire;
@@ -1031,8 +1026,7 @@ XkbWriteKeyTypes( XkbDescPtr xkb,
pwire->realMods= preserve->real_mods;
pwire->virtualMods= preserve->vmods;
if (client->swapped) {
- register int n;
- swaps(&pwire->virtualMods,n);
+ swaps(&pwire->virtualMods);
}
}
buf= (char *)pwire;
@@ -1112,10 +1106,10 @@ register unsigned i;
pSym = &xkb->map->syms[symMap->offset];
memcpy((char *)buf,(char *)pSym,outMap->nSyms*4);
if (client->swapped) {
- register int n,nSyms= outMap->nSyms;
- swaps(&outMap->nSyms,n);
+ register int nSyms= outMap->nSyms;
+ swaps(&outMap->nSyms);
while (nSyms-->0) {
- swapl(buf,n);
+ swapl((int *)buf);
buf+= 4;
}
}
@@ -1402,12 +1396,11 @@ char *desc,*start;
len, (unsigned long)(desc-start));
}
if (client->swapped) {
- register int n;
- swaps(&rep->sequenceNumber,n);
- swapl(&rep->length,n);
- swaps(&rep->present,n);
- swaps(&rep->totalSyms,n);
- swaps(&rep->totalActs,n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swaps(&rep->present);
+ swaps(&rep->totalSyms);
+ swaps(&rep->totalActs);
}
WriteToClient(client, (i=SIZEOF(xkbGetMapReply)), (char *)rep);
WriteToClient(client, len, start);
@@ -1589,8 +1582,7 @@ register xkbKeyTypeWireDesc *wire = *wireRtrn;
for (i=0;i<req->nTypes;i++) {
unsigned width;
if (client->swapped) {
- register int s;
- swaps(&wire->virtualMods,s);
+ swaps(&wire->virtualMods);
}
n= i+req->firstType;
width= wire->numLevels;
@@ -1616,8 +1608,7 @@ register xkbKeyTypeWireDesc *wire = *wireRtrn;
preWire= (xkbModsWireDesc *)&mapWire[wire->nMapEntries];
for (n=0;n<wire->nMapEntries;n++) {
if (client->swapped) {
- register int s;
- swaps(&mapWire[n].virtualMods,s);
+ swaps(&mapWire[n].virtualMods);
}
if (mapWire[n].realMods&(~wire->realMods)) {
*nMapsRtrn= _XkbErrCode4(0x06,n,mapWire[n].realMods,
@@ -1635,8 +1626,7 @@ register xkbKeyTypeWireDesc *wire = *wireRtrn;
}
if (wire->preserve) {
if (client->swapped) {
- register int s;
- swaps(&preWire[n].virtualMods,s);
+ swaps(&preWire[n].virtualMods);
}
if (preWire[n].realMods&(~mapWire[n].realMods)) {
*nMapsRtrn= _XkbErrCode4(0x09,n,preWire[n].realMods,
@@ -1686,7 +1676,7 @@ xkbSymMapWireDesc* wire = *wireRtrn;
KeySym *pSyms;
register unsigned nG;
if (client->swapped) {
- swaps(&wire->nSyms,nG);
+ swaps(&wire->nSyms);
}
nG = XkbNumGroups(wire->groupInfo);
if (nG>XkbNumKbdGroups) {
@@ -2066,9 +2056,8 @@ unsigned first,last;
newSyms[s]= pSyms[s];
}
if (client->swapped) {
- int n;
for (s=0;s<wire->nSyms;s++) {
- swapl(&newSyms[s],n);
+ swapl(&newSyms[s]);
}
}
}
@@ -2654,8 +2643,7 @@ int size;
wire->flags= sym->flags;
memcpy((char*)&wire->act,(char*)&sym->act,sz_xkbActionWireDesc);
if (client->swapped) {
- register int n;
- swapl(&wire->sym,n);
+ swapl(&wire->sym);
}
}
if (rep->groups) {
@@ -2666,8 +2654,7 @@ int size;
grp->realMods= compat->groups[i].real_mods;
grp->virtualMods= compat->groups[i].vmods;
if (client->swapped) {
- register int n;
- swaps(&grp->virtualMods,n);
+ swaps(&grp->virtualMods);
}
grp++;
}
@@ -2680,12 +2667,11 @@ int size;
else data= NULL;
if (client->swapped) {
- register int n;
- swaps(&rep->sequenceNumber,n);
- swapl(&rep->length,n);
- swaps(&rep->firstSI,n);
- swaps(&rep->nSI,n);
- swaps(&rep->nTotalSI,n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swaps(&rep->firstSI);
+ swaps(&rep->nSI);
+ swaps(&rep->nTotalSI);
}
WriteToClient(client, SIZEOF(xkbGetCompatMapReply), (char *)rep);
@@ -2802,8 +2788,7 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
sym = &compat->sym_interpret[req->firstSI];
for (i=0;i<req->nSI;i++,wire++) {
if (client->swapped) {
- int n;
- swapl(&wire->sym,n);
+ swapl(&wire->sym);
}
if (wire->sym == NoSymbol && wire->match == XkbSI_AnyOfOrNone &&
(wire->mods & 0xff) == 0xff &&
@@ -2841,8 +2826,7 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) {
if (req->groups & bit) {
if (client->swapped) {
- int n;
- swaps(&wire->virtualMods,n);
+ swaps(&wire->virtualMods);
}
compat->groups[i].mask= wire->realMods;
compat->groups[i].real_mods= wire->realMods;
@@ -2962,7 +2946,6 @@ ProcXkbGetIndicatorState(ClientPtr client)
xkbGetIndicatorStateReply rep;
XkbSrvLedInfoPtr sli;
DeviceIntPtr dev;
- register int i;
REQUEST(xkbGetIndicatorStateReq);
REQUEST_SIZE_MATCH(xkbGetIndicatorStateReq);
@@ -2984,8 +2967,8 @@ ProcXkbGetIndicatorState(ClientPtr client)
rep.state = sli->effectiveState;
if (client->swapped) {
- swaps(&rep.sequenceNumber,i);
- swapl(&rep.state,i);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.state);
}
WriteToClient(client, SIZEOF(xkbGetIndicatorStateReply), (char *)&rep);
return Success;
@@ -3037,9 +3020,8 @@ register unsigned bit;
wire->virtualMods= indicators->maps[i].mods.vmods;
wire->ctrls= indicators->maps[i].ctrls;
if (client->swapped) {
- register int n;
- swaps(&wire->virtualMods,n);
- swapl(&wire->ctrls,n);
+ swaps(&wire->virtualMods);
+ swapl(&wire->ctrls);
}
wire++;
}
@@ -3055,10 +3037,10 @@ register unsigned bit;
}
else map = NULL;
if (client->swapped) {
- swaps(&rep->sequenceNumber,i);
- swapl(&rep->length,i);
- swapl(&rep->which,i);
- swapl(&rep->realIndicators,i);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swapl(&rep->which);
+ swapl(&rep->realIndicators);
}
WriteToClient(client, SIZEOF(xkbGetIndicatorMapReply), (char *)rep);
if (map) {
@@ -3174,9 +3156,8 @@ ProcXkbSetIndicatorMap(ClientPtr client)
for (i=0,bit=1;i<XkbNumIndicators;i++,bit<<=1) {
if (stuff->which&bit) {
if (client->swapped) {
- int n;
- swaps(&from->virtualMods,n);
- swapl(&from->ctrls,n);
+ swaps(&from->virtualMods);
+ swapl(&from->ctrls);
}
CHK_MASK_LEGAL(i,from->whichGroups,XkbIM_UseAnyGroup);
CHK_MASK_LEGAL(i,from->whichMods,XkbIM_UseAnyMods);
@@ -3277,12 +3258,11 @@ ProcXkbGetNamedIndicator(ClientPtr client)
rep.supported= TRUE;
}
if ( client->swapped ) {
- register int n;
- swapl(&rep.length,n);
- swaps(&rep.sequenceNumber,n);
- swapl(&rep.indicator,n);
- swaps(&rep.virtualMods,n);
- swapl(&rep.ctrls,n);
+ swapl(&rep.length);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.indicator);
+ swaps(&rep.virtualMods);
+ swapl(&rep.ctrls);
}
WriteToClient(client,SIZEOF(xkbGetNamedIndicatorReply), (char *)&rep);
@@ -3529,8 +3509,7 @@ Atom *atm;
if (atoms[i]!=None) {
*atm= atoms[i];
if (swap) {
- register int n;
- swapl(atm,n);
+ swapl(atm);
}
atm++;
}
@@ -3649,16 +3628,15 @@ XkbSendNames(ClientPtr client,XkbDescPtr xkb,xkbGetNamesReply *rep)
register unsigned i,length,which;
char * start;
char * desc;
-register int n;
length= rep->length*4;
which= rep->which;
if (client->swapped) {
- swaps(&rep->sequenceNumber,n);
- swapl(&rep->length,n);
- swapl(&rep->which,n);
- swaps(&rep->virtualMods,n);
- swapl(&rep->indicators,n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swapl(&rep->which);
+ swaps(&rep->virtualMods);
+ swapl(&rep->indicators);
}
start = desc = calloc(1, length);
@@ -3668,21 +3646,21 @@ register int n;
if (which&XkbKeycodesNameMask) {
*((CARD32 *)desc)= xkb->names->keycodes;
if (client->swapped) {
- swapl(desc,n);
+ swapl((int *)desc);
}
desc+= 4;
}
if (which&XkbGeometryNameMask) {
*((CARD32 *)desc)= xkb->names->geometry;
if (client->swapped) {
- swapl(desc,n);
+ swapl((int *)desc);
}
desc+= 4;
}
if (which&XkbSymbolsNameMask) {
*((CARD32 *)desc)= xkb->names->symbols;
if (client->swapped) {
- swapl(desc,n);
+ swapl((int *)desc);
}
desc+= 4;
}
@@ -3690,21 +3668,21 @@ register int n;
register CARD32 *atm= (CARD32 *)desc;
atm[0]= (CARD32)xkb->names->phys_symbols;
if (client->swapped) {
- swapl(&atm[0],n);
+ swapl(&atm[0]);
}
desc+= 4;
}
if (which&XkbTypesNameMask) {
*((CARD32 *)desc)= (CARD32)xkb->names->types;
if (client->swapped) {
- swapl(desc,n);
+ swapl((int *)desc);
}
desc+= 4;
}
if (which&XkbCompatNameMask) {
*((CARD32 *)desc)= (CARD32)xkb->names->compat;
if (client->swapped) {
- swapl(desc,n);
+ swapl((int *)desc);
}
desc+= 4;
}
@@ -3715,7 +3693,7 @@ register int n;
for (i=0;i<xkb->map->num_types;i++,atm++,type++) {
*atm= (CARD32)type->name;
if (client->swapped) {
- swapl(atm,n);
+ swapl(atm);
}
}
desc= (char *)atm;
@@ -3736,7 +3714,7 @@ register int n;
for (l=0;l<type->num_levels;l++,atm++) {
*atm= type->level_names[l];
if (client->swapped) {
- swapl(atm,n);
+ swapl(atm);
}
}
desc+= type->num_levels*4;
@@ -3772,7 +3750,7 @@ register int n;
for (i=0;i<rep->nRadioGroups;i++,atm++) {
*atm= (CARD32)xkb->names->radio_groups[i];
if (client->swapped) {
- swapl(atm,n);
+ swapl(atm);
}
}
desc+= rep->nRadioGroups*4;
@@ -3835,8 +3813,7 @@ register int i;
for (i=0;i<nAtoms;i++,wire++) {
if (swapped) {
- register int n;
- swapl(wire,n);
+ swapl(wire);
}
if ((((Atom)*wire)!=None)&&(!ValidAtom((Atom)*wire))) {
*pError= ((Atom)*wire);
@@ -3856,8 +3833,7 @@ register unsigned i,bit;
if ((present&bit)==0)
continue;
if (swapped) {
- register int n;
- swapl(wire,n);
+ swapl(wire);
}
if ((((Atom)*wire)!=None)&&(!ValidAtom(((Atom)*wire)))) {
*pError= (Atom)*wire;
@@ -4347,8 +4323,7 @@ XkbWriteCountedString(char *wire,char *str,Bool swap)
pLen= (CARD16 *)wire;
*pLen= len;
if (swap) {
- register int n;
- swaps(pLen,n);
+ swaps(pLen);
}
paddedLen= pad_to_int32(sizeof(len)+len)-sizeof(len);
strncpy(&wire[sizeof(len)],str,paddedLen);
@@ -4465,8 +4440,7 @@ xkbShapeWireDesc * shapeWire;
else shapeWire->approxNdx= XkbNoShape;
shapeWire->pad= 0;
if (swap) {
- register int n;
- swapl(&shapeWire->name,n);
+ swapl(&shapeWire->name);
}
wire= (char *)&shapeWire[1];
for (o=0,ol=shape->outlines;o<shape->num_outlines;o++,ol++) {
@@ -4483,9 +4457,8 @@ xkbShapeWireDesc * shapeWire;
ptWire[p].x= pt->x;
ptWire[p].y= pt->y;
if (swap) {
- register int n;
- swaps(&ptWire[p].x,n);
- swaps(&ptWire[p].y,n);
+ swaps(&ptWire[p].x);
+ swaps(&ptWire[p].y);
}
}
wire= (char *)&ptWire[ol->num_points];
@@ -4528,10 +4501,9 @@ xkbDoodadWireDesc * doodadWire;
doodadWire->any.top= doodad->any.top;
doodadWire->any.left= doodad->any.left;
if (swap) {
- register int n;
- swapl(&doodadWire->any.name,n);
- swaps(&doodadWire->any.top,n);
- swaps(&doodadWire->any.left,n);
+ swapl(&doodadWire->any.name);
+ swaps(&doodadWire->any.top);
+ swaps(&doodadWire->any.left);
}
switch (doodad->any.type) {
case XkbOutlineDoodad:
@@ -4540,8 +4512,7 @@ xkbDoodadWireDesc * doodadWire;
doodadWire->shape.colorNdx= doodad->shape.color_ndx;
doodadWire->shape.shapeNdx= doodad->shape.shape_ndx;
if (swap) {
- register int n;
- swaps(&doodadWire->shape.angle,n);
+ swaps(&doodadWire->shape.angle);
}
break;
case XkbTextDoodad:
@@ -4550,10 +4521,9 @@ xkbDoodadWireDesc * doodadWire;
doodadWire->text.height= doodad->text.height;
doodadWire->text.colorNdx= doodad->text.color_ndx;
if (swap) {
- register int n;
- swaps(&doodadWire->text.angle,n);
- swaps(&doodadWire->text.width,n);
- swaps(&doodadWire->text.height,n);
+ swaps(&doodadWire->text.angle);
+ swaps(&doodadWire->text.width);
+ swaps(&doodadWire->text.height);
}
wire= XkbWriteCountedString(wire,doodad->text.text,swap);
wire= XkbWriteCountedString(wire,doodad->text.font,swap);
@@ -4593,8 +4563,7 @@ xkbOverlayWireDesc * olWire;
olWire->pad1= 0;
olWire->pad2= 0;
if (swap) {
- register int n;
- swapl(&olWire->name,n);
+ swapl(&olWire->name);
}
wire= (char *)&olWire[1];
for (r=0,row=ol->rows;r<ol->num_rows;r++,row++) {
@@ -4673,13 +4642,12 @@ xkbSectionWireDesc * sectionWire;
sectionWire->nOverlays= section->num_overlays;
sectionWire->pad= 0;
if (swap) {
- register int n;
- swapl(&sectionWire->name,n);
- swaps(&sectionWire->top,n);
- swaps(&sectionWire->left,n);
- swaps(&sectionWire->width,n);
- swaps(&sectionWire->height,n);
- swaps(&sectionWire->angle,n);
+ swapl(&sectionWire->name);
+ swaps(&sectionWire->top);
+ swaps(&sectionWire->left);
+ swaps(&sectionWire->width);
+ swaps(&sectionWire->height);
+ swaps(&sectionWire->angle);
}
wire= (char *)&sectionWire[1];
if (section->rows) {
@@ -4694,9 +4662,8 @@ xkbSectionWireDesc * sectionWire;
rowWire->vertical= row->vertical;
rowWire->pad= 0;
if (swap) {
- register int n;
- swaps(&rowWire->top,n);
- swaps(&rowWire->left,n);
+ swaps(&rowWire->top);
+ swaps(&rowWire->left);
}
wire= (char *)&rowWire[1];
if (row->keys) {
@@ -4710,8 +4677,7 @@ xkbSectionWireDesc * sectionWire;
keyWire[k].shapeNdx= key->shape_ndx;
keyWire[k].colorNdx= key->color_ndx;
if (swap) {
- register int n;
- swaps(&keyWire[k].gap,n);
+ swaps(&keyWire[k].gap);
}
}
wire= (char *)&keyWire[row->num_keys];
@@ -4813,18 +4779,17 @@ XkbSendGeometry( ClientPtr client,
start= NULL;
}
if (client->swapped) {
- register int n;
- swaps(&rep->sequenceNumber,n);
- swapl(&rep->length,n);
- swapl(&rep->name,n);
- swaps(&rep->widthMM,n);
- swaps(&rep->heightMM,n);
- swaps(&rep->nProperties,n);
- swaps(&rep->nColors,n);
- swaps(&rep->nShapes,n);
- swaps(&rep->nSections,n);
- swaps(&rep->nDoodads,n);
- swaps(&rep->nKeyAliases,n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swapl(&rep->name);
+ swaps(&rep->widthMM);
+ swaps(&rep->heightMM);
+ swaps(&rep->nProperties);
+ swaps(&rep->nColors);
+ swaps(&rep->nShapes);
+ swaps(&rep->nSections);
+ swaps(&rep->nDoodads);
+ swaps(&rep->nKeyAliases);
}
WriteToClient(client, SIZEOF(xkbGetGeometryReply), (char *)rep);
if (len>0)
@@ -4876,8 +4841,7 @@ CARD16 len,*plen;
wire= *wire_inout;
plen= (CARD16 *)wire;
if (swap) {
- register int n;
- swaps(plen,n);
+ swaps(plen);
}
len= *plen;
str= malloc(len+1);
@@ -4903,11 +4867,10 @@ XkbDoodadPtr doodad;
dWire= (xkbDoodadWireDesc *)(*wire_inout);
wire= (char *)&dWire[1];
if (client->swapped) {
- register int n;
- swapl(&dWire->any.name,n);
- swaps(&dWire->any.top,n);
- swaps(&dWire->any.left,n);
- swaps(&dWire->any.angle,n);
+ swapl(&dWire->any.name);
+ swaps(&dWire->any.top);
+ swaps(&dWire->any.left);
+ swaps(&dWire->any.angle);
}
CHK_ATOM_ONLY(dWire->any.name);
doodad= XkbAddGeomDoodad(geom,section,dWire->any.name);
@@ -4941,9 +4904,8 @@ XkbDoodadPtr doodad;
return BadMatch;
}
if (client->swapped) {
- register int n;
- swaps(&dWire->text.width,n);
- swaps(&dWire->text.height,n);
+ swaps(&dWire->text.width);
+ swaps(&dWire->text.height);
}
doodad->text.width= dWire->text.width;
doodad->text.height= dWire->text.height;
@@ -5009,8 +4971,7 @@ xkbOverlayRowWireDesc * rWire;
wire= *wire_inout;
olWire= (xkbOverlayWireDesc *)wire;
if (client->swapped) {
- register int n;
- swapl(&olWire->name,n);
+ swapl(&olWire->name);
}
CHK_ATOM_ONLY(olWire->name);
ol= XkbAddGeomOverlay(section,olWire->name,olWire->nRows);
@@ -5062,13 +5023,12 @@ XkbSectionPtr section;
register int r;
xkbRowWireDesc * rWire;
if (client->swapped) {
- register int n;
- swapl(&sWire->name,n);
- swaps(&sWire->top,n);
- swaps(&sWire->left,n);
- swaps(&sWire->width,n);
- swaps(&sWire->height,n);
- swaps(&sWire->angle,n);
+ swapl(&sWire->name);
+ swaps(&sWire->top);
+ swaps(&sWire->left);
+ swaps(&sWire->width);
+ swaps(&sWire->height);
+ swaps(&sWire->angle);
}
CHK_ATOM_ONLY(sWire->name);
section= XkbAddGeomSection(geom,sWire->name,sWire->nRows,
@@ -5087,9 +5047,8 @@ XkbSectionPtr section;
XkbRowPtr row;
xkbKeyWireDesc * kWire;
if (client->swapped) {
- register int n;
- swaps(&rWire->top,n);
- swaps(&rWire->left,n);
+ swaps(&rWire->top);
+ swaps(&rWire->left);
}
row= XkbAddGeomRow(section,rWire->nKeys);
if (!row)
@@ -5184,9 +5143,8 @@ char * wire;
pt->x= ptWire[p].x;
pt->y= ptWire[p].y;
if (client->swapped) {
- register int n;
- swaps(&pt->x,n);
- swaps(&pt->y,n);
+ swaps(&pt->x);
+ swaps(&pt->y);
}
}
ol->num_points= olWire->nPoints;
@@ -5453,12 +5411,11 @@ ProcXkbPerClientFlags(ClientPtr client)
rep.autoCtrls= rep.autoCtrlValues= 0;
}
if ( client->swapped ) {
- register int n;
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.supported,n);
- swapl(&rep.value,n);
- swapl(&rep.autoCtrls,n);
- swapl(&rep.autoCtrlValues,n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.supported);
+ swapl(&rep.value);
+ swapl(&rep.autoCtrls);
+ swapl(&rep.autoCtrlValues);
}
WriteToClient(client,SIZEOF(xkbPerClientFlagsReply), (char *)&rep);
return Success;
@@ -5576,16 +5533,15 @@ ProcXkbListComponents(ClientPtr client)
if (list.nTotal>list.maxRtrn)
rep.extra = (list.nTotal-list.maxRtrn);
if (client->swapped) {
- register int n;
- swaps(&rep.sequenceNumber,n);
- swapl(&rep.length,n);
- swaps(&rep.nKeymaps,n);
- swaps(&rep.nKeycodes,n);
- swaps(&rep.nTypes,n);
- swaps(&rep.nCompatMaps,n);
- swaps(&rep.nSymbols,n);
- swaps(&rep.nGeometries,n);
- swaps(&rep.extra,n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swaps(&rep.nKeymaps);
+ swaps(&rep.nKeycodes);
+ swaps(&rep.nTypes);
+ swaps(&rep.nCompatMaps);
+ swaps(&rep.nSymbols);
+ swaps(&rep.nGeometries);
+ swaps(&rep.extra);
}
WriteToClient(client,SIZEOF(xkbListComponentsReply),(char *)&rep);
if (list.nPool && list.pool) {
@@ -5849,11 +5805,10 @@ ProcXkbGetKbdByName(ClientPtr client)
reported= rep.reported;
if ( client->swapped ) {
- register int n;
- swaps(&rep.sequenceNumber,n);
- swapl(&rep.length,n);
- swaps(&rep.found,n);
- swaps(&rep.reported,n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swaps(&rep.found);
+ swaps(&rep.reported);
}
WriteToClient(client,SIZEOF(xkbGetKbdByNameReply), (char *)&rep);
if (reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask))
@@ -6038,13 +5993,12 @@ int length;
wire.physIndicators= sli->physIndicators;
wire.state= sli->effectiveState;
if (client->swapped) {
- register int n;
- swaps(&wire.ledClass,n);
- swaps(&wire.ledID,n);
- swapl(&wire.namesPresent,n);
- swapl(&wire.mapsPresent,n);
- swapl(&wire.physIndicators,n);
- swapl(&wire.state,n);
+ swaps(&wire.ledClass);
+ swaps(&wire.ledID);
+ swapl(&wire.namesPresent);
+ swapl(&wire.mapsPresent);
+ swapl(&wire.physIndicators);
+ swapl(&wire.state);
}
WriteToClient(client,SIZEOF(xkbDeviceLedsWireDesc),(char *)&wire);
length+= SIZEOF(xkbDeviceLedsWireDesc);
@@ -6056,8 +6010,7 @@ int length;
if (sli->namesPresent&bit) {
awire= (CARD32)sli->names[i];
if (client->swapped) {
- register int n;
- swapl(&awire,n);
+ swapl(&awire);
}
WriteToClient(client,4,(char *)&awire);
length+= 4;
@@ -6077,9 +6030,8 @@ int length;
iwire.virtualMods= sli->maps[i].mods.vmods;
iwire.ctrls= sli->maps[i].ctrls;
if (client->swapped) {
- register int n;
- swaps(&iwire.virtualMods,n);
- swapl(&iwire.ctrls,n);
+ swaps(&iwire.virtualMods);
+ swapl(&iwire.ctrls);
}
WriteToClient(client,SIZEOF(xkbIndicatorMapWireDesc),
(char *)&iwire);
@@ -6232,14 +6184,15 @@ char * str;
length= rep.length*4;
nDeviceLedFBs = rep.nDeviceLedFBs;
if (client->swapped) {
- register int n;
- swaps(&rep.sequenceNumber,n);
- swapl(&rep.length,n);
- swaps(&rep.present,n);
- swaps(&rep.supported,n);
- swaps(&rep.unsupported,n);
- swaps(&rep.nDeviceLedFBs,n);
- swapl(&rep.type,n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swaps(&rep.present);
+ swaps(&rep.supported);
+ swaps(&rep.unsupported);
+ swaps(&rep.nDeviceLedFBs);
+ swaps(&rep.dfltKbdFB);
+ swaps(&rep.dfltLedFB);
+ swapl(&rep.devType);
}
WriteToClient(client,SIZEOF(xkbGetDeviceInfoReply), (char *)&rep);
@@ -6286,12 +6239,11 @@ XkbSrvLedInfoPtr sli;
ledWire= (xkbDeviceLedsWireDesc *)wire;
for (i=0;i<num;i++) {
if (client->swapped) {
- register int n;
- swaps(&ledWire->ledClass,n);
- swaps(&ledWire->ledID,n);
- swapl(&ledWire->namesPresent,n);
- swapl(&ledWire->mapsPresent,n);
- swapl(&ledWire->physIndicators,n);
+ swaps(&ledWire->ledClass);
+ swaps(&ledWire->ledID);
+ swapl(&ledWire->namesPresent);
+ swapl(&ledWire->mapsPresent);
+ swapl(&ledWire->physIndicators);
}
sli= XkbFindSrvLedInfo(dev,ledWire->ledClass,ledWire->ledID,
@@ -6314,8 +6266,7 @@ XkbSrvLedInfoPtr sli;
if (nNames>0) {
for (n=0;n<nNames;n++) {
if (client->swapped) {
- register int t;
- swapl(atomWire,t);
+ swapl(atomWire);
}
CHK_ATOM_OR_NONE3(((Atom)(*atomWire)),client->errorValue,
*status_rtrn,NULL);
@@ -6326,9 +6277,8 @@ XkbSrvLedInfoPtr sli;
if (nMaps>0) {
for (n=0;n<nMaps;n++) {
if (client->swapped) {
- register int t;
- swaps(&mapWire->virtualMods,t);
- swapl(&mapWire->ctrls,t);
+ swaps(&mapWire->virtualMods);
+ swapl(&mapWire->ctrls);
}
CHK_MASK_LEGAL3(0x21,mapWire->whichGroups,
XkbIM_UseAnyGroup,
@@ -6649,12 +6599,11 @@ int rc;
rep.supportedFlags = ~0;
rep.supportedCtrls = ~0;
if ( client->swapped ) {
- register int n;
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.currentFlags, n);
- swapl(&rep.currentCtrls, n);
- swapl(&rep.supportedFlags, n);
- swapl(&rep.supportedCtrls, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.currentFlags);
+ swapl(&rep.currentCtrls);
+ swapl(&rep.supportedFlags);
+ swapl(&rep.supportedCtrls);
}
WriteToClient(client,SIZEOF(xkbSetDebuggingFlagsReply), (char *)&rep);
return Success;