diff options
author | Mihai Moldovan <ionic@ionic.de> | 2018-02-26 01:00:54 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2018-02-26 01:00:54 +0100 |
commit | 05152b788ab184f45df1f64182791c88a09dc6f9 (patch) | |
tree | 4232012c65ee251fef529950a420689154778847 /nx-X11/programs/Xserver/Xi/getbmap.c | |
parent | e247900edd20c140faf42ba0759bf59cbd2f75ae (diff) | |
parent | 4598c0c3d215f7f2237a9ccee3a143025f2af005 (diff) | |
download | nx-libs-05152b788ab184f45df1f64182791c88a09dc6f9.tar.gz nx-libs-05152b788ab184f45df1f64182791c88a09dc6f9.tar.bz2 nx-libs-05152b788ab184f45df1f64182791c88a09dc6f9.zip |
Merge branch 'uli42-pr/update_xi' into arctica-3.6.x
Attributes GH PR #644: https://github.com/ArcticaProject/nx-libs/pull/644
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/getbmap.c')
-rw-r--r-- | nx-X11/programs/Xserver/Xi/getbmap.c | 67 |
1 files changed, 30 insertions, 37 deletions
diff --git a/nx-X11/programs/Xserver/Xi/getbmap.c b/nx-X11/programs/Xserver/Xi/getbmap.c index af497869c..696685b61 100644 --- a/nx-X11/programs/Xserver/Xi/getbmap.c +++ b/nx-X11/programs/Xserver/Xi/getbmap.c @@ -55,13 +55,13 @@ SOFTWARE. #include <dix-config.h> #endif -#include <nx-X11/X.h> /* for inputstr.h */ -#include <nx-X11/Xproto.h> /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ +#include <nx-X11/X.h> /* for inputstr.h */ +#include <nx-X11/Xproto.h> /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ #include <nx-X11/extensions/XI.h> #include <nx-X11/extensions/XIproto.h> #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ +#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "getbmap.h" @@ -73,13 +73,12 @@ SOFTWARE. */ int -SProcXGetDeviceButtonMapping(client) - register ClientPtr client; - { +SProcXGetDeviceButtonMapping(register ClientPtr client) +{ REQUEST(xGetDeviceButtonMappingReq); swaps(&stuff->length); - return(ProcXGetDeviceButtonMapping(client)); - } + return (ProcXGetDeviceButtonMapping(client)); +} /*********************************************************************** * @@ -88,12 +87,11 @@ SProcXGetDeviceButtonMapping(client) */ int -ProcXGetDeviceButtonMapping (client) - register ClientPtr client; - { - DeviceIntPtr dev; - xGetDeviceButtonMappingReply rep; - ButtonClassPtr b; +ProcXGetDeviceButtonMapping(register ClientPtr client) +{ + DeviceIntPtr dev; + xGetDeviceButtonMappingReply rep; + ButtonClassPtr b; REQUEST(xGetDeviceButtonMappingReq); REQUEST_SIZE_MATCH(xGetDeviceButtonMappingReq); @@ -104,28 +102,25 @@ ProcXGetDeviceButtonMapping (client) rep.length = 0; rep.sequenceNumber = client->sequence; - dev = LookupDeviceIntRec (stuff->deviceid); - if (dev == NULL) - { - SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0, - BadDevice); + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0, + BadDevice); return Success; - } + } b = dev->button; - if (b == NULL) - { - SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0, - BadMatch); + if (b == NULL) { + SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0, + BadMatch); return Success; - } + } rep.nElts = b->numButtons; - rep.length = (rep.nElts + (4-1))/4; - WriteReplyToClient (client, sizeof (xGetDeviceButtonMappingReply), &rep); - WriteToClient(client, rep.nElts, - (char *)&b->map[1]); + rep.length = (rep.nElts + (4 - 1)) / 4; + WriteReplyToClient(client, sizeof(xGetDeviceButtonMappingReply), &rep); + WriteToClient(client, rep.nElts, &b->map[1]); return Success; - } +} /*********************************************************************** * @@ -135,12 +130,10 @@ ProcXGetDeviceButtonMapping (client) */ void -SRepXGetDeviceButtonMapping (client, size, rep) - ClientPtr client; - int size; - xGetDeviceButtonMappingReply *rep; - { +SRepXGetDeviceButtonMapping(ClientPtr client, int size, + xGetDeviceButtonMappingReply * rep) +{ swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); - } +} |