From 63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 16 Mar 2016 11:11:43 +0100 Subject: Rename region macros to eliminate screen argument This is a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole nx-X11/programs/Xserver tree: $ cd nx-X11/programs/Xserver && ( git ls-files | grep -v '^fix-' | xargs ./fix-region; ) And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. v1: Keith Packard (X.Org xserver commit: 2dc138922b7588515d5f2447e4b9dcdc0bef15e0) v2: Mike Gabriel (apply fix-region script to nx-libs) --- nx-X11/programs/Xserver/hw/nxagent/NXpicture.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXpicture.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c index 9c438394a..725f5137e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c @@ -1537,7 +1537,7 @@ SetPictureClipRects (PicturePtr pPicture, RegionPtr clientClip; int result; - clientClip = RECTS_TO_REGION(pScreen, + clientClip = RegionFromRects( nRect, rects, CT_UNSORTED); if (!clientClip) return BadAlloc; @@ -1568,14 +1568,14 @@ SetPictureClipRegion (PicturePtr pPicture, if (pRegion) { type = CT_REGION; - clientClip = REGION_CREATE (pScreen, - REGION_EXTENTS(pScreen, pRegion), - REGION_NUM_RECTS(pRegion)); + clientClip = RegionCreate( + RegionExtents(pRegion), + RegionNumRects(pRegion)); if (!clientClip) return BadAlloc; - if (!REGION_COPY (pSCreen, clientClip, pRegion)) + if (!RegionCopy(clientClip, pRegion)) { - REGION_DESTROY (pScreen, clientClip); + RegionDestroy(clientClip); return BadAlloc; } } @@ -1685,9 +1685,9 @@ CopyPicture (PicturePtr pSrc, RegionPtr clientClip; RegionPtr srcClientClip = (RegionPtr)pSrc->clientClip; - clientClip = REGION_CREATE(pSrc->pDrawable->pScreen, - REGION_EXTENTS(pSrc->pDrawable->pScreen, srcClientClip), - REGION_NUM_RECTS(srcClientClip)); + clientClip = RegionCreate( + RegionExtents(srcClientClip), + RegionNumRects(srcClientClip)); (*ps->ChangePictureClip)(pDst, CT_REGION, clientClip, 0); } break; -- cgit v1.2.3 From 23d3821f0a9ab8c8581feae26a0b8e6d61f8b78d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 21 Mar 2016 11:55:31 +0100 Subject: hw/nxagent/NXpicture.c: Don't declare anything in empty function nxagentReconnectPictFormat. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends the following compiler warnings: ``` NXpicture.c: In function ‘nxagentReconnectPictFormat’: NXpicture.c:2148:9: warning: variable ‘pBool’ set but not used [-Wunused-but-set-variable] Bool *pBool; ^ NXpicture.c:2147:17: warning: variable ‘pFormat’ set but not used [-Wunused-but-set-variable] PictFormatPtr pFormat; ^ ``` --- nx-X11/programs/Xserver/hw/nxagent/NXpicture.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXpicture.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c index 725f5137e..67cd5d6ed 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c @@ -2144,12 +2144,6 @@ Bool nxagentReconnectAllPictFormat(void *p) void nxagentReconnectPictFormat(void *p0, XID x1, void *p2) { - PictFormatPtr pFormat; - Bool *pBool; - - pFormat = (PictFormatPtr)p0; - pBool = (Bool*)p2; - #if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_PICTFORMAT_DEBUG) fprintf(stderr, "nxagentReconnectPictFormat.\n"); #endif -- cgit v1.2.3