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/getprop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/getprop.c') diff --git a/nx-X11/programs/Xserver/Xi/getprop.c b/nx-X11/programs/Xserver/Xi/getprop.c index 569efcd1f..42acf39e8 100644 --- a/nx-X11/programs/Xserver/Xi/getprop.c +++ b/nx-X11/programs/Xserver/Xi/getprop.c @@ -55,14 +55,14 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structs */ +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structs */ #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/getprop.c | 84 ++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/getprop.c') diff --git a/nx-X11/programs/Xserver/Xi/getprop.c b/nx-X11/programs/Xserver/Xi/getprop.c index 42acf39e8..e8bd19854 100644 --- a/nx-X11/programs/Xserver/Xi/getprop.c +++ b/nx-X11/programs/Xserver/Xi/getprop.c @@ -68,8 +68,8 @@ SOFTWARE. #include "getprop.h" -extern XExtEventInfo EventInfo[]; -extern int ExtEventIndex; +extern XExtEventInfo EventInfo[]; +extern int ExtEventIndex; /*********************************************************************** * @@ -80,13 +80,13 @@ extern int ExtEventIndex; int SProcXGetDeviceDontPropagateList(client) register ClientPtr client; - { +{ REQUEST(xGetDeviceDontPropagateListReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq); swapl(&stuff->window); - return(ProcXGetDeviceDontPropagateList(client)); - } + return (ProcXGetDeviceDontPropagateList(client)); +} /*********************************************************************** * @@ -97,13 +97,13 @@ SProcXGetDeviceDontPropagateList(client) int ProcXGetDeviceDontPropagateList (client) register ClientPtr client; - { - CARD16 count = 0; - int i; - XEventClass *buf = NULL, *tbuf; - WindowPtr pWin; - xGetDeviceDontPropagateListReply rep; - OtherInputMasks *others; +{ + CARD16 count = 0; + int i; + XEventClass *buf = NULL, *tbuf; + WindowPtr pWin; + xGetDeviceDontPropagateListReply rep; + OtherInputMasks *others; REQUEST(xGetDeviceDontPropagateListReq); REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq); @@ -114,44 +114,44 @@ ProcXGetDeviceDontPropagateList (client) rep.length = 0; rep.count = 0; - pWin = (WindowPtr) LookupWindow (stuff->window, client); + pWin = (WindowPtr) LookupWindow(stuff->window, client); if (!pWin) { client->errorValue = stuff->window; - SendErrorToClient(client, IReqCode, X_GetDeviceDontPropagateList, 0, - BadWindow); + SendErrorToClient(client, IReqCode, X_GetDeviceDontPropagateList, 0, + BadWindow); return Success; - } + } if ((others = wOtherInputMasks(pWin)) != 0) { - for (i=0; idontPropagateMask[i], i, - &count, COUNT); + for (i = 0; i < EMASKSIZE; i++) + tbuf = ClassFromMask(NULL, others->dontPropagateMask[i], i, + &count, COUNT); if (count) { rep.count = count; - buf = (XEventClass *) malloc (rep.count * sizeof(XEventClass)); - rep.length = (rep.count * sizeof (XEventClass) + 3) >> 2; + buf = (XEventClass *) malloc(rep.count * sizeof(XEventClass)); + rep.length = (rep.count * sizeof(XEventClass) + 3) >> 2; tbuf = buf; - for (i=0; idontPropagateMask[i], i, - NULL, CREATE); - } + for (i = 0; i < EMASKSIZE; i++) + tbuf = ClassFromMask(tbuf, others->dontPropagateMask[i], i, + NULL, CREATE); } + } WriteReplyToClient (client, sizeof (xGetDeviceDontPropagateListReply), &rep); if (count) { - client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write; - WriteSwappedDataToClient( client, count * sizeof(XEventClass), buf); - free (buf); - } - return Success; + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; + WriteSwappedDataToClient(client, count * sizeof(XEventClass), buf); + free(buf); } + return Success; +} /*********************************************************************** * @@ -167,25 +167,25 @@ XEventClass int maskndx; CARD16 *count; int mode; - { - int i,j; - int id = maskndx; - Mask tmask = 0x80000000; +{ + int i, j; + int id = maskndx; + Mask tmask = 0x80000000; - for (i=0; i<32; i++,tmask>>=1) + for (i = 0; i < 32; i++, tmask >>= 1) if (tmask & mask) { - for (j=0; jsequenceNumber); swapl(&rep->length); swaps(&rep->count); 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/getprop.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/getprop.c') diff --git a/nx-X11/programs/Xserver/Xi/getprop.c b/nx-X11/programs/Xserver/Xi/getprop.c index e8bd19854..c8b148972 100644 --- a/nx-X11/programs/Xserver/Xi/getprop.c +++ b/nx-X11/programs/Xserver/Xi/getprop.c @@ -78,8 +78,7 @@ extern int ExtEventIndex; */ int -SProcXGetDeviceDontPropagateList(client) - register ClientPtr client; +SProcXGetDeviceDontPropagateList(register ClientPtr client) { REQUEST(xGetDeviceDontPropagateListReq); swaps(&stuff->length); @@ -95,8 +94,7 @@ SProcXGetDeviceDontPropagateList(client) */ int -ProcXGetDeviceDontPropagateList (client) - register ClientPtr client; +ProcXGetDeviceDontPropagateList(register ClientPtr client) { CARD16 count = 0; int i; @@ -161,12 +159,8 @@ ProcXGetDeviceDontPropagateList (client) */ XEventClass -*ClassFromMask (buf, mask, maskndx, count, mode) - XEventClass *buf; - Mask mask; - int maskndx; - CARD16 *count; - int mode; + * ClassFromMask(XEventClass * buf, Mask mask, int maskndx, CARD16 * count, + int mode) { int i, j; int id = maskndx; @@ -195,10 +189,8 @@ XEventClass */ void -SRepXGetDeviceDontPropagateList (client, size, rep) - ClientPtr client; - int size; - xGetDeviceDontPropagateListReply *rep; +SRepXGetDeviceDontPropagateList(ClientPtr client, int size, + xGetDeviceDontPropagateListReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); -- 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/getprop.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/getprop.c') diff --git a/nx-X11/programs/Xserver/Xi/getprop.c b/nx-X11/programs/Xserver/Xi/getprop.c index c8b148972..77075c92b 100644 --- a/nx-X11/programs/Xserver/Xi/getprop.c +++ b/nx-X11/programs/Xserver/Xi/getprop.c @@ -113,21 +113,18 @@ ProcXGetDeviceDontPropagateList(register ClientPtr client) rep.count = 0; pWin = (WindowPtr) LookupWindow(stuff->window, client); - if (!pWin) - { + if (!pWin) { client->errorValue = stuff->window; SendErrorToClient(client, IReqCode, X_GetDeviceDontPropagateList, 0, BadWindow); return Success; } - if ((others = wOtherInputMasks(pWin)) != 0) - { + if ((others = wOtherInputMasks(pWin)) != 0) { for (i = 0; i < EMASKSIZE; i++) tbuf = ClassFromMask(NULL, others->dontPropagateMask[i], i, &count, COUNT); - if (count) - { + if (count) { rep.count = count; buf = (XEventClass *) malloc(rep.count * sizeof(XEventClass)); rep.length = (rep.count * sizeof(XEventClass) + 3) >> 2; @@ -139,11 +136,9 @@ ProcXGetDeviceDontPropagateList(register ClientPtr client) } } - WriteReplyToClient (client, sizeof (xGetDeviceDontPropagateListReply), - &rep); + WriteReplyToClient(client, sizeof(xGetDeviceDontPropagateListReply), &rep); - if (count) - { + if (count) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, count * sizeof(XEventClass), buf); free(buf); @@ -167,11 +162,9 @@ XEventClass Mask tmask = 0x80000000; for (i = 0; i < 32; i++, tmask >>= 1) - if (tmask & mask) - { + if (tmask & mask) { for (j = 0; j < ExtEventIndex; j++) - if (EventInfo[j].mask == tmask) - { + if (EventInfo[j].mask == tmask) { if (mode == COUNT) (*count)++; else -- cgit v1.2.3