From 5bfafee5087bcbc37b7f8db246b20d7a4bba5731 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 8 Feb 2018 23:44:10 +0100 Subject: Xi: Adapt include sections to match Xorg 7.1 --- nx-X11/programs/Xserver/Xi/getkmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/getkmap.c') diff --git a/nx-X11/programs/Xserver/Xi/getkmap.c b/nx-X11/programs/Xserver/Xi/getkmap.c index 84f8a10a8..0e7dbe136 100644 --- a/nx-X11/programs/Xserver/Xi/getkmap.c +++ b/nx-X11/programs/Xserver/Xi/getkmap.c @@ -55,13 +55,13 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ #include #include #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ +#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "swaprep.h" -- cgit v1.2.3 From 41a0ba729fb67efdc5f7bd50f73f145cf5d8a153 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sun, 11 Feb 2018 22:01:11 +0100 Subject: Xi: reformat code, ansify --- nx-X11/programs/Xserver/Xi/getkmap.c | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/getkmap.c') diff --git a/nx-X11/programs/Xserver/Xi/getkmap.c b/nx-X11/programs/Xserver/Xi/getkmap.c index 0e7dbe136..c410df355 100644 --- a/nx-X11/programs/Xserver/Xi/getkmap.c +++ b/nx-X11/programs/Xserver/Xi/getkmap.c @@ -77,11 +77,11 @@ SOFTWARE. int SProcXGetDeviceKeyMapping(client) register ClientPtr client; - { +{ REQUEST(xGetDeviceKeyMappingReq); swaps(&stuff->length); - return(ProcXGetDeviceKeyMapping(client)); - } + return (ProcXGetDeviceKeyMapping(client)); +} /*********************************************************************** * @@ -92,29 +92,29 @@ SProcXGetDeviceKeyMapping(client) int ProcXGetDeviceKeyMapping(client) register ClientPtr client; - { +{ xGetDeviceKeyMappingReply rep; DeviceIntPtr dev; - KeySymsPtr k; + KeySymsPtr k; REQUEST(xGetDeviceKeyMappingReq); REQUEST_SIZE_MATCH(xGetDeviceKeyMappingReq); - dev = LookupDeviceIntRec (stuff->deviceid); + dev = LookupDeviceIntRec(stuff->deviceid); if (dev == NULL) { - SendErrorToClient (client, IReqCode, X_GetDeviceKeyMapping, 0, - BadDevice); + SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, + BadDevice); return Success; - } + } if (dev->key == NULL) { SendErrorToClient (client, IReqCode, X_GetDeviceKeyMapping, 0, BadMatch); return Success; - } - k = &dev->key->curKeySyms; + } + k = &dev->key->curKeySyms; if ((stuff->firstKeyCode < k->minKeyCode) || (stuff->firstKeyCode > k->maxKeyCode)) @@ -123,7 +123,7 @@ ProcXGetDeviceKeyMapping(client) SendErrorToClient (client, IReqCode, X_GetDeviceKeyMapping, 0, BadValue); return Success; - } + } if (stuff->firstKeyCode + stuff->count > k->maxKeyCode + 1) { @@ -131,24 +131,24 @@ ProcXGetDeviceKeyMapping(client) SendErrorToClient (client, IReqCode, X_GetDeviceKeyMapping, 0, BadValue); return Success; - } + } rep.repType = X_Reply; rep.RepType = X_GetDeviceKeyMapping; rep.sequenceNumber = client->sequence; rep.keySymsPerKeyCode = k->mapWidth; - rep.length = (k->mapWidth * stuff->count); /* KeySyms are 4 bytes */ + rep.length = (k->mapWidth * stuff->count); /* KeySyms are 4 bytes */ WriteReplyToClient(client, sizeof(xGetDeviceKeyMappingReply), &rep); - client->pSwapReplyFunc = (ReplySwapPtr)CopySwap32Write; + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; WriteSwappedDataToClient( client, - k->mapWidth * stuff->count * sizeof(KeySym), - &k->map[(stuff->firstKeyCode - k->minKeyCode) * - k->mapWidth]); + k->mapWidth * stuff->count * sizeof(KeySym), + &k->map[(stuff->firstKeyCode - k->minKeyCode) * + k->mapWidth]); return Success; - } +} /*********************************************************************** * @@ -162,9 +162,9 @@ SRepXGetDeviceKeyMapping (client, size, rep) ClientPtr client; int size; xGetDeviceKeyMappingReply *rep; - { +{ swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); - } +} -- cgit v1.2.3 From 7aca428ffe10b2cffca8fe01962aef421a5a5645 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 15 Feb 2018 15:14:14 +0100 Subject: Xi: ansify function prototypes --- nx-X11/programs/Xserver/Xi/getkmap.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/getkmap.c') diff --git a/nx-X11/programs/Xserver/Xi/getkmap.c b/nx-X11/programs/Xserver/Xi/getkmap.c index c410df355..2ce98923c 100644 --- a/nx-X11/programs/Xserver/Xi/getkmap.c +++ b/nx-X11/programs/Xserver/Xi/getkmap.c @@ -75,8 +75,7 @@ SOFTWARE. */ int -SProcXGetDeviceKeyMapping(client) - register ClientPtr client; +SProcXGetDeviceKeyMapping(register ClientPtr client) { REQUEST(xGetDeviceKeyMappingReq); swaps(&stuff->length); @@ -90,8 +89,7 @@ SProcXGetDeviceKeyMapping(client) */ int -ProcXGetDeviceKeyMapping(client) - register ClientPtr client; +ProcXGetDeviceKeyMapping(register ClientPtr client) { xGetDeviceKeyMappingReply rep; DeviceIntPtr dev; @@ -158,13 +156,10 @@ ProcXGetDeviceKeyMapping(client) */ void -SRepXGetDeviceKeyMapping (client, size, rep) - ClientPtr client; - int size; - xGetDeviceKeyMappingReply *rep; +SRepXGetDeviceKeyMapping(ClientPtr client, int size, + xGetDeviceKeyMappingReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } - -- cgit v1.2.3 From b0abdf7bd8284b1edf39c13e1863ecc420fd68e4 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 15 Feb 2018 21:25:27 +0100 Subject: Xi: reformat --- nx-X11/programs/Xserver/Xi/getkmap.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/getkmap.c') 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]); -- cgit v1.2.3