aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/xiquerydevice.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-22 15:42:49 +0200
committermarha <marha@users.sourceforge.net>2011-09-22 15:42:49 +0200
commit46d4f558531910ca1f3297da85b99334d6de2921 (patch)
tree60c37077eb160948fe317a17ec4c19bef679aa35 /xorg-server/Xi/xiquerydevice.c
parent0bf6df93b9fdbb7902bf1014d605c6876a3ad035 (diff)
parentc1e6c7428a8d2c1b60ffac7df7a3f56c300fa983 (diff)
downloadvcxsrv-46d4f558531910ca1f3297da85b99334d6de2921.tar.gz
vcxsrv-46d4f558531910ca1f3297da85b99334d6de2921.tar.bz2
vcxsrv-46d4f558531910ca1f3297da85b99334d6de2921.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/Xext/dpms.c xorg-server/Xext/saver.c xorg-server/Xext/security.c xorg-server/Xext/shape.c xorg-server/Xext/sync.c xorg-server/Xi/opendev.c xorg-server/fb/wfbrename.h xorg-server/glx/glxserver.h xorg-server/hw/xwin/winwindowswm.c xorg-server/mi/miarc.c xorg-server/mi/miwideline.c xorg-server/os/io.c xorg-server/render/mipict.c
Diffstat (limited to 'xorg-server/Xi/xiquerydevice.c')
-rw-r--r--xorg-server/Xi/xiquerydevice.c66
1 files changed, 29 insertions, 37 deletions
diff --git a/xorg-server/Xi/xiquerydevice.c b/xorg-server/Xi/xiquerydevice.c
index a768d499c..902eb918c 100644
--- a/xorg-server/Xi/xiquerydevice.c
+++ b/xorg-server/Xi/xiquerydevice.c
@@ -52,12 +52,10 @@ static void SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info);
int
SProcXIQueryDevice(ClientPtr client)
{
- char n;
-
REQUEST(xXIQueryDeviceReq);
- swaps(&stuff->length, n);
- swaps(&stuff->deviceid, n);
+ swaps(&stuff->length);
+ swaps(&stuff->deviceid);
return ProcXIQueryDevice(client);
}
@@ -166,11 +164,9 @@ ProcXIQueryDevice(ClientPtr client)
void
SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply *rep)
{
- char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
- swaps(&rep->num_devices, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swaps(&rep->num_devices);
/* Device info is already swapped, see ProcXIQueryDevice */
@@ -278,17 +274,16 @@ ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState)
static void
SwapButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info)
{
- char n;
Atom *btn;
int i;
- swaps(&info->type, n);
- swaps(&info->length, n);
- swaps(&info->sourceid, n);
+ swaps(&info->type);
+ swaps(&info->length);
+ swaps(&info->sourceid);
for (i = 0, btn = (Atom*)&info[1]; i < info->num_buttons; i++, btn++)
- swaps(btn, n);
+ swapl(btn);
- swaps(&info->num_buttons, n);
+ swaps(&info->num_buttons);
}
/**
@@ -317,17 +312,16 @@ ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info)
static void
SwapKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info)
{
- char n;
uint32_t *key;
int i;
- swaps(&info->type, n);
- swaps(&info->length, n);
- swaps(&info->sourceid, n);
+ swaps(&info->type);
+ swaps(&info->length);
+ swaps(&info->sourceid);
for (i = 0, key = (uint32_t*)&info[1]; i < info->num_keycodes; i++, key++)
- swapl(key, n);
+ swapl(key);
- swaps(&info->num_keycodes, n);
+ swaps(&info->num_keycodes);
}
/**
@@ -364,16 +358,15 @@ ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber,
static void
SwapValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info)
{
- char n;
- swaps(&info->type, n);
- swaps(&info->length, n);
- swapl(&info->label, n);
- swapl(&info->min.integral, n);
- swapl(&info->min.frac, n);
- swapl(&info->max.integral, n);
- swapl(&info->max.frac, n);
- swaps(&info->number, n);
- swaps(&info->sourceid, n);
+ swaps(&info->type);
+ swaps(&info->length);
+ swapl(&info->label);
+ swapl(&info->min.integral);
+ swapl(&info->min.frac);
+ swapl(&info->max.integral);
+ swapl(&info->max.frac);
+ swaps(&info->number);
+ swaps(&info->sourceid);
}
int GetDeviceUse(DeviceIntPtr dev, uint16_t *attachment)
@@ -471,7 +464,6 @@ ListDeviceClasses(ClientPtr client, DeviceIntPtr dev,
static void
SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info)
{
- char n;
char *any = (char*)&info[1];
int i;
@@ -497,10 +489,10 @@ SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info)
any += len * 4;
}
- swaps(&info->deviceid, n);
- swaps(&info->use, n);
- swaps(&info->attachment, n);
- swaps(&info->num_classes, n);
- swaps(&info->name_len, n);
+ swaps(&info->deviceid);
+ swaps(&info->use);
+ swaps(&info->attachment);
+ swaps(&info->num_classes);
+ swaps(&info->name_len);
}