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/chgkmap.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/chgkmap.c')
-rw-r--r-- | nx-X11/programs/Xserver/Xi/chgkmap.c | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/nx-X11/programs/Xserver/Xi/chgkmap.c b/nx-X11/programs/Xserver/Xi/chgkmap.c index 8d5199848..604fcd9cf 100644 --- a/nx-X11/programs/Xserver/Xi/chgkmap.c +++ b/nx-X11/programs/Xserver/Xi/chgkmap.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 "exevents.h" #include "exglobals.h" @@ -75,9 +75,8 @@ SOFTWARE. */ int -SProcXChangeDeviceKeyMapping(client) - register ClientPtr client; - { +SProcXChangeDeviceKeyMapping(register ClientPtr client) +{ unsigned int count; REQUEST(xChangeDeviceKeyMappingReq); @@ -86,8 +85,8 @@ SProcXChangeDeviceKeyMapping(client) count = stuff->keyCodes * stuff->keySymsPerKeyCode; REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); SwapLongs((CARD32 *) (&stuff[1]), count); - return(ProcXChangeDeviceKeyMapping(client)); - } + return (ProcXChangeDeviceKeyMapping(client)); +} /*********************************************************************** * @@ -96,10 +95,9 @@ SProcXChangeDeviceKeyMapping(client) */ int -ProcXChangeDeviceKeyMapping(client) - register ClientPtr client; - { - int ret; +ProcXChangeDeviceKeyMapping(register ClientPtr client) +{ + int ret; unsigned len; DeviceIntPtr dev; unsigned int count; @@ -110,21 +108,19 @@ ProcXChangeDeviceKeyMapping(client) count = stuff->keyCodes * stuff->keySymsPerKeyCode; REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); - dev = LookupDeviceIntRec (stuff->deviceid); - if (dev == NULL) - { - SendErrorToClient (client, IReqCode, X_ChangeDeviceKeyMapping, 0, - BadDevice); + dev = LookupDeviceIntRec(stuff->deviceid); + if (dev == NULL) { + SendErrorToClient(client, IReqCode, X_ChangeDeviceKeyMapping, 0, + BadDevice); return Success; - } - len = stuff->length - (sizeof(xChangeDeviceKeyMappingReq) >> 2); + } + len = stuff->length - (sizeof(xChangeDeviceKeyMappingReq) >> 2); - ret = ChangeKeyMapping (client, dev, len, DeviceMappingNotify, - stuff->firstKeyCode, stuff->keyCodes, stuff->keySymsPerKeyCode, - (KeySym *)&stuff[1]); + ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify, + stuff->firstKeyCode, stuff->keyCodes, + stuff->keySymsPerKeyCode, (KeySym *) & stuff[1]); if (ret != Success) - SendErrorToClient (client, IReqCode, X_ChangeDeviceKeyMapping, 0, - ret); + SendErrorToClient(client, IReqCode, X_ChangeDeviceKeyMapping, 0, ret); return Success; - } +} |