diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2018-02-15 21:25:27 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2018-02-26 00:58:46 +0100 |
commit | b0abdf7bd8284b1edf39c13e1863ecc420fd68e4 (patch) | |
tree | 191171d5cfdee1851ad3b5246be6363f9d1f3445 /nx-X11/programs/Xserver/Xi/getkmap.c | |
parent | 7aca428ffe10b2cffca8fe01962aef421a5a5645 (diff) | |
download | nx-libs-b0abdf7bd8284b1edf39c13e1863ecc420fd68e4.tar.gz nx-libs-b0abdf7bd8284b1edf39c13e1863ecc420fd68e4.tar.bz2 nx-libs-b0abdf7bd8284b1edf39c13e1863ecc420fd68e4.zip |
Xi: reformat
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/getkmap.c')
-rw-r--r-- | nx-X11/programs/Xserver/Xi/getkmap.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/nx-X11/programs/Xserver/Xi/getkmap.c b/nx-X11/programs/Xserver/Xi/getkmap.c index 2ce98923c..419d1080f 100644 --- a/nx-X11/programs/Xserver/Xi/getkmap.c +++ b/nx-X11/programs/Xserver/Xi/getkmap.c @@ -99,35 +99,28 @@ ProcXGetDeviceKeyMapping(register ClientPtr client) REQUEST_SIZE_MATCH(xGetDeviceKeyMappingReq); dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - { + if (dev == NULL) { SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadDevice); return Success; } - if (dev->key == NULL) - { - SendErrorToClient (client, IReqCode, X_GetDeviceKeyMapping, 0, - BadMatch); + if (dev->key == NULL) { + SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadMatch); return Success; } k = &dev->key->curKeySyms; if ((stuff->firstKeyCode < k->minKeyCode) || - (stuff->firstKeyCode > k->maxKeyCode)) - { + (stuff->firstKeyCode > k->maxKeyCode)) { client->errorValue = stuff->firstKeyCode; - SendErrorToClient (client, IReqCode, X_GetDeviceKeyMapping, 0, - BadValue); + SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadValue); return Success; } - if (stuff->firstKeyCode + stuff->count > k->maxKeyCode + 1) - { + if (stuff->firstKeyCode + stuff->count > k->maxKeyCode + 1) { client->errorValue = stuff->count; - SendErrorToClient (client, IReqCode, X_GetDeviceKeyMapping, 0, - BadValue); + SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadValue); return Success; } @@ -139,8 +132,7 @@ ProcXGetDeviceKeyMapping(register ClientPtr client) WriteReplyToClient(client, sizeof(xGetDeviceKeyMappingReply), &rep); client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; - WriteSwappedDataToClient( - client, + WriteSwappedDataToClient(client, k->mapWidth * stuff->count * sizeof(KeySym), &k->map[(stuff->firstKeyCode - k->minKeyCode) * k->mapWidth]); |