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/closedev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/closedev.c') diff --git a/nx-X11/programs/Xserver/Xi/closedev.c b/nx-X11/programs/Xserver/Xi/closedev.c index 2ba90d0d1..b5b80f4f5 100644 --- a/nx-X11/programs/Xserver/Xi/closedev.c +++ b/nx-X11/programs/Xserver/Xi/closedev.c @@ -55,16 +55,16 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ -#include "scrnintstr.h" /* screen structure */ +#include /* for inputstr.h */ +#include /* Request macro */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ +#include "scrnintstr.h" /* screen structure */ #include #include #include "XIstubs.h" #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ +#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "closedev.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/closedev.c | 54 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/closedev.c') diff --git a/nx-X11/programs/Xserver/Xi/closedev.c b/nx-X11/programs/Xserver/Xi/closedev.c index b5b80f4f5..29a4130a1 100644 --- a/nx-X11/programs/Xserver/Xi/closedev.c +++ b/nx-X11/programs/Xserver/Xi/closedev.c @@ -78,12 +78,12 @@ SOFTWARE. int SProcXCloseDevice(client) register ClientPtr client; - { +{ REQUEST(xCloseDeviceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCloseDeviceReq); - return(ProcXCloseDevice(client)); - } + return (ProcXCloseDevice(client)); +} /*********************************************************************** * @@ -94,23 +94,23 @@ SProcXCloseDevice(client) int ProcXCloseDevice(client) register ClientPtr client; - { - int i; - WindowPtr pWin, p1; - DeviceIntPtr d; +{ + int i; + WindowPtr pWin, p1; + DeviceIntPtr d; REQUEST(xCloseDeviceReq); REQUEST_SIZE_MATCH(xCloseDeviceReq); - d = LookupDeviceIntRec (stuff->deviceid); + d = LookupDeviceIntRec(stuff->deviceid); if (d == NULL) { SendErrorToClient(client, IReqCode, X_CloseDevice, 0, BadDevice); - return Success; - } + return Success; + } if (d->grab && SameClient(d->grab, client)) - (*d->DeactivateGrab)(d); /* release active grab */ + (*d->DeactivateGrab) (d); /* release active grab */ /* Remove event selections from all windows for events from this device and selected by this client. @@ -119,14 +119,14 @@ ProcXCloseDevice(client) for (i=0; iroot; - DeleteDeviceEvents (d, pWin, client); + DeleteDeviceEvents(d, pWin, client); p1 = pWin->firstChild; - DeleteEventsFromChildren (d, p1, client); - } + DeleteEventsFromChildren(d, p1, client); + } - CloseInputDevice (d, client); + CloseInputDevice(d, client); return Success; - } +} /*********************************************************************** * @@ -140,17 +140,17 @@ DeleteEventsFromChildren(dev, p1, client) DeviceIntPtr dev; WindowPtr p1; ClientPtr client; - { +{ WindowPtr p2; while (p1) { - p2 = p1->firstChild; - DeleteDeviceEvents (dev, p1, client); + p2 = p1->firstChild; + DeleteDeviceEvents(dev, p1, client); DeleteEventsFromChildren(dev, p2, client); p1 = p1->nextSib; - } } +} /*********************************************************************** * @@ -164,15 +164,15 @@ DeleteDeviceEvents (dev, pWin, client) DeviceIntPtr dev; WindowPtr pWin; ClientPtr client; - { - InputClientsPtr others; - OtherInputMasks *pOthers; - GrabPtr grab, next; +{ + InputClientsPtr others; + OtherInputMasks *pOthers; + GrabPtr grab, next; if ((pOthers = wOtherInputMasks(pWin)) != 0) for (others=pOthers->inputClients; others; others = others->next) - if (SameClient(others,client)) + if (SameClient(others, client)) others->mask[dev->id] = NoEventMask; for (grab = wPassiveGrabs(pWin); grab; grab=next) @@ -180,6 +180,6 @@ DeleteDeviceEvents (dev, pWin, client) next = grab->next; if ((grab->device == dev) && (client->clientAsMask == CLIENT_BITS(grab->resource))) - FreeResource (grab->resource, RT_NONE); - } + FreeResource(grab->resource, RT_NONE); } +} -- 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/closedev.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/closedev.c') diff --git a/nx-X11/programs/Xserver/Xi/closedev.c b/nx-X11/programs/Xserver/Xi/closedev.c index 29a4130a1..48a743aca 100644 --- a/nx-X11/programs/Xserver/Xi/closedev.c +++ b/nx-X11/programs/Xserver/Xi/closedev.c @@ -76,8 +76,7 @@ SOFTWARE. */ int -SProcXCloseDevice(client) - register ClientPtr client; +SProcXCloseDevice(register ClientPtr client) { REQUEST(xCloseDeviceReq); swaps(&stuff->length); @@ -92,8 +91,7 @@ SProcXCloseDevice(client) */ int -ProcXCloseDevice(client) - register ClientPtr client; +ProcXCloseDevice(register ClientPtr client) { int i; WindowPtr pWin, p1; @@ -136,10 +134,7 @@ ProcXCloseDevice(client) */ void -DeleteEventsFromChildren(dev, p1, client) - DeviceIntPtr dev; - WindowPtr p1; - ClientPtr client; +DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client) { WindowPtr p2; @@ -160,10 +155,7 @@ DeleteEventsFromChildren(dev, p1, client) */ void -DeleteDeviceEvents (dev, pWin, client) - DeviceIntPtr dev; - WindowPtr pWin; - ClientPtr client; +DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) { InputClientsPtr others; OtherInputMasks *pOthers; -- 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/closedev.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'nx-X11/programs/Xserver/Xi/closedev.c') diff --git a/nx-X11/programs/Xserver/Xi/closedev.c b/nx-X11/programs/Xserver/Xi/closedev.c index 48a743aca..b41474e70 100644 --- a/nx-X11/programs/Xserver/Xi/closedev.c +++ b/nx-X11/programs/Xserver/Xi/closedev.c @@ -101,8 +101,7 @@ ProcXCloseDevice(register ClientPtr client) REQUEST_SIZE_MATCH(xCloseDeviceReq); d = LookupDeviceIntRec(stuff->deviceid); - if (d == NULL) - { + if (d == NULL) { SendErrorToClient(client, IReqCode, X_CloseDevice, 0, BadDevice); return Success; } @@ -111,11 +110,10 @@ ProcXCloseDevice(register ClientPtr client) (*d->DeactivateGrab) (d); /* release active grab */ /* Remove event selections from all windows for events from this device - and selected by this client. - Delete passive grabs from all windows for this device. */ + * and selected by this client. + * Delete passive grabs from all windows for this device. */ - for (i=0; iroot; DeleteDeviceEvents(d, pWin, client); p1 = pWin->firstChild; @@ -138,8 +136,7 @@ DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client) { WindowPtr p2; - while (p1) - { + while (p1) { p2 = p1->firstChild; DeleteDeviceEvents(dev, p1, client); DeleteEventsFromChildren(dev, p2, client); @@ -162,13 +159,11 @@ DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) GrabPtr grab, next; if ((pOthers = wOtherInputMasks(pWin)) != 0) - for (others=pOthers->inputClients; others; - others = others->next) + for (others = pOthers->inputClients; others; others = others->next) if (SameClient(others, client)) others->mask[dev->id] = NoEventMask; - for (grab = wPassiveGrabs(pWin); grab; grab=next) - { + for (grab = wPassiveGrabs(pWin); grab; grab = next) { next = grab->next; if ((grab->device == dev) && (client->clientAsMask == CLIENT_BITS(grab->resource))) -- cgit v1.2.3