diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-06-29 01:36:31 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-04 16:36:59 +0200 |
commit | 286d83260216e8e53db701eed5c785aae1c716bf (patch) | |
tree | 3b27e6dd17a7d4d00266819545ae97defa11cf81 /nx-X11/programs/Xserver/Xext | |
parent | d1d859dfdec4b4665e06401383ab71926e4e731c (diff) | |
download | nx-libs-286d83260216e8e53db701eed5c785aae1c716bf.tar.gz nx-libs-286d83260216e8e53db701eed5c785aae1c716bf.tar.bz2 nx-libs-286d83260216e8e53db701eed5c785aae1c716bf.zip |
Use internal temp variable for swap macros. Make swaps/swapl type safe (introducing wrong_size check at build time).
While working on this changeset, various spots got discovered where
swapl or swaps was used on a wrong type, where byte swapping calls had
been forgotten or done on the wrong variable.
This backport at least includes changes from the following X.org
commits, listed in non-chronological order:
commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8
Author: Matt Turner <mattst88@gmail.com>
Date: Thu Aug 4 15:35:41 2011 -0400
Use internal temp variable for swap macros
Also, fix whitespace, mainly around
swaps(&rep.sequenceNumber)
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
commit 9edcae78c46286baff42e74bfe26f6ae4d00fe01
Author: Matt Turner <mattst88@gmail.com>
Date: Wed Sep 21 17:14:16 2011 -0400
Use correct swap{l,s} (or none at all for CARD8)
Swapping the wrong size was never caught because swap{l,s} are macros.
It's clear in the case of Xext/xres.c, that the author believed
client_major/minor to be CARD16 from looking at the code in the first
hunk.
v2: dmx.c fixes from Keith.
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
commit dab064fa5e0b1f5c67222562ad5367005832cba1
Author: Andrea Canciani <ranma42@gmail.com>
Date: Tue Nov 2 20:10:32 2010 +0100
render: Fix byteswapping of gradient stops
The function swapStops repeatedly swaps the color components as
CARD16, but incorrectly steps over them as if they were CARD32.
This causes half of the stops not to be swapped at all and some
unrelated data be swapped instead.
Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
commit 54770c980cd2b91a8377f975a58ed69def5cfa42
Author: Matt Turner <mattst88@gmail.com>
Date: Tue Aug 16 16:59:07 2011 -0400
Cast char* buffers to swap functions
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
commit 6844bd2e63490870bab3c469eec6030354ef2865
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Wed Jan 9 19:52:00 2008 -0800
More Xv extension byte swapping fixes
commit e46f6ddeccd082b2d507a1e8b57ea30e6b0a2c83
Author: Michel Dänzer <michel@tungstengraphics.com>
Date: Wed Jan 16 14:24:22 2008 +0100
Yet another Xv extension byte swapping fix.
Diffstat (limited to 'nx-X11/programs/Xserver/Xext')
-rw-r--r-- | nx-X11/programs/Xserver/Xext/bigreq.c | 7 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/dpms.c | 60 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/panoramiX.c | 55 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/panoramiXSwap.c | 18 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/saver.c | 56 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/security.c | 37 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/shape.c | 105 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/shm.c | 107 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/sync.c | 132 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xcmisc.c | 36 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xf86bigfont.c | 70 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xres.c | 62 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xtest.c | 29 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xtest1di.c | 78 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xvdisp.c | 406 |
15 files changed, 534 insertions, 724 deletions
diff --git a/nx-X11/programs/Xserver/Xext/bigreq.c b/nx-X11/programs/Xserver/Xext/bigreq.c index eba552cfe..a43031d7e 100644 --- a/nx-X11/programs/Xserver/Xext/bigreq.c +++ b/nx-X11/programs/Xserver/Xext/bigreq.c @@ -85,10 +85,9 @@ ProcBigReqDispatch (client) { REQUEST(xBigReqEnableReq); xBigReqEnableReply rep; - register int n; if (client->swapped) { - swaps(&stuff->length, n); + swaps(&stuff->length); } if (stuff->brReqType != X_BigReqEnable) return BadRequest; @@ -100,8 +99,8 @@ ProcBigReqDispatch (client) rep.sequenceNumber = client->sequence; rep.max_request_size = maxBigRequestSize; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.max_request_size, n); + swaps(&rep.sequenceNumber); + swapl(&rep.max_request_size); } WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep); return(client->noClientException); diff --git a/nx-X11/programs/Xserver/Xext/dpms.c b/nx-X11/programs/Xserver/Xext/dpms.c index fc40193e4..f88e1656e 100644 --- a/nx-X11/programs/Xserver/Xext/dpms.c +++ b/nx-X11/programs/Xserver/Xext/dpms.c @@ -105,7 +105,6 @@ ProcDPMSGetVersion(client) { /* REQUEST(xDPMSGetVersionReq); */ xDPMSGetVersionReply rep; - register int n; REQUEST_SIZE_MATCH(xDPMSGetVersionReq); @@ -115,9 +114,9 @@ ProcDPMSGetVersion(client) rep.majorVersion = DPMSMajorVersion; rep.minorVersion = DPMSMinorVersion; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xDPMSGetVersionReply), (char *)&rep); return(client->noClientException); @@ -128,7 +127,6 @@ ProcDPMSCapable(register ClientPtr client) { /* REQUEST(xDPMSCapableReq); */ xDPMSCapableReply rep; - register int n; REQUEST_SIZE_MATCH(xDPMSCapableReq); @@ -138,7 +136,7 @@ ProcDPMSCapable(register ClientPtr client) rep.capable = DPMSCapableFlag; if (client->swapped) { - swaps(&rep.sequenceNumber, n); + swaps(&rep.sequenceNumber); } WriteToClient(client, sizeof(xDPMSCapableReply), (char *)&rep); return(client->noClientException); @@ -150,7 +148,6 @@ ProcDPMSGetTimeouts(client) { /* REQUEST(xDPMSGetTimeoutsReq); */ xDPMSGetTimeoutsReply rep; - register int n; REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq); @@ -162,10 +159,10 @@ ProcDPMSGetTimeouts(client) rep.off = DPMSOffTime / MILLI_PER_SECOND; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swaps(&rep.standby, n); - swaps(&rep.suspend, n); - swaps(&rep.off, n); + swaps(&rep.sequenceNumber); + swaps(&rep.standby); + swaps(&rep.suspend); + swaps(&rep.off); } WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), (char *)&rep); return(client->noClientException); @@ -265,7 +262,6 @@ ProcDPMSInfo(register ClientPtr client) { /* REQUEST(xDPMSInfoReq); */ xDPMSInfoReply rep; - register int n; REQUEST_SIZE_MATCH(xDPMSInfoReq); @@ -276,8 +272,8 @@ ProcDPMSInfo(register ClientPtr client) rep.state = DPMSEnabled; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swaps(&rep.power_level, n); + swaps(&rep.sequenceNumber); + swaps(&rep.power_level); } WriteToClient(client, sizeof(xDPMSInfoReply), (char *)&rep); return(client->noClientException); @@ -316,13 +312,12 @@ static int SProcDPMSGetVersion(client) register ClientPtr client; { - register int n; REQUEST(xDPMSGetVersionReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSGetVersionReq); - swaps(&stuff->majorVersion, n); - swaps(&stuff->minorVersion, n); + swaps(&stuff->majorVersion); + swaps(&stuff->minorVersion); return ProcDPMSGetVersion(client); } @@ -330,9 +325,8 @@ static int SProcDPMSCapable(register ClientPtr client) { REQUEST(xDPMSCapableReq); - register int n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSCapableReq); return ProcDPMSCapable(client); @@ -343,9 +337,8 @@ SProcDPMSGetTimeouts(client) register ClientPtr client; { REQUEST(xDPMSGetTimeoutsReq); - register int n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq); return ProcDPMSGetTimeouts(client); @@ -356,14 +349,13 @@ SProcDPMSSetTimeouts(client) register ClientPtr client; { REQUEST(xDPMSSetTimeoutsReq); - register int n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq); - swaps(&stuff->standby, n); - swaps(&stuff->suspend, n); - swaps(&stuff->off, n); + swaps(&stuff->standby); + swaps(&stuff->suspend); + swaps(&stuff->off); return ProcDPMSSetTimeouts(client); } @@ -372,9 +364,8 @@ SProcDPMSEnable(client) register ClientPtr client; { REQUEST(xDPMSEnableReq); - register int n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSEnableReq); return ProcDPMSEnable(client); @@ -385,9 +376,8 @@ SProcDPMSDisable(client) register ClientPtr client; { REQUEST(xDPMSDisableReq); - register int n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSDisableReq); return ProcDPMSDisable(client); @@ -398,12 +388,11 @@ SProcDPMSForceLevel(client) register ClientPtr client; { REQUEST(xDPMSForceLevelReq); - register int n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSForceLevelReq); - swaps(&stuff->level, n); + swaps(&stuff->level); return ProcDPMSForceLevel(client); } @@ -413,9 +402,8 @@ SProcDPMSInfo(client) register ClientPtr client; { REQUEST(xDPMSInfoReq); - register int n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSInfoReq); return ProcDPMSInfo(client); diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c index c00d003a5..322204763 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.c +++ b/nx-X11/programs/Xserver/Xext/panoramiX.c @@ -936,7 +936,6 @@ ProcPanoramiXQueryVersion (ClientPtr client) { /* REQUEST(xPanoramiXQueryVersionReq); */ xPanoramiXQueryVersionReply rep; - register int n; REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); rep.type = X_Reply; @@ -945,10 +944,10 @@ ProcPanoramiXQueryVersion (ClientPtr client) rep.majorVersion = SERVER_PANORAMIX_MAJOR_VERSION; rep.minorVersion = SERVER_PANORAMIX_MINOR_VERSION; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); } WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep); return (client->noClientException); @@ -960,7 +959,6 @@ ProcPanoramiXGetState(ClientPtr client) REQUEST(xPanoramiXGetStateReq); WindowPtr pWin; xPanoramiXGetStateReply rep; - register int n; REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); pWin = LookupWindow (stuff->window, client); @@ -971,9 +969,9 @@ ProcPanoramiXGetState(ClientPtr client) rep.sequenceNumber = client->sequence; rep.state = !noPanoramiXExtension; if (client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swaps (&rep.state, n); + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl ((int* )&rep.state); } WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep); return client->noClientException; @@ -986,7 +984,6 @@ ProcPanoramiXGetScreenCount(ClientPtr client) REQUEST(xPanoramiXGetScreenCountReq); WindowPtr pWin; xPanoramiXGetScreenCountReply rep; - register int n; REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); pWin = LookupWindow (stuff->window, client); @@ -997,9 +994,9 @@ ProcPanoramiXGetScreenCount(ClientPtr client) rep.sequenceNumber = client->sequence; rep.ScreenCount = PanoramiXNumScreens; if (client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swaps (&rep.ScreenCount, n); + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl ((int* )&rep.ScreenCount); } WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), (char *) &rep); return client->noClientException; @@ -1011,7 +1008,6 @@ ProcPanoramiXGetScreenSize(ClientPtr client) REQUEST(xPanoramiXGetScreenSizeReq); WindowPtr pWin; xPanoramiXGetScreenSizeReply rep; - register int n; REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); pWin = LookupWindow (stuff->window, client); @@ -1024,10 +1020,10 @@ ProcPanoramiXGetScreenSize(ClientPtr client) rep.width = panoramiXdataPtr[stuff->screen].width; rep.height = panoramiXdataPtr[stuff->screen].height; if (client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swaps (&rep.width, n); - swaps (&rep.height, n); + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl (&rep.width); + swapl (&rep.height); } WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), (char *) &rep); return client->noClientException; @@ -1047,10 +1043,9 @@ ProcXineramaIsActive(ClientPtr client) rep.sequenceNumber = client->sequence; rep.state = !noPanoramiXExtension; if (client->swapped) { - register int n; - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.state, n); + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl (&rep.state); } WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep); return client->noClientException; @@ -1070,10 +1065,9 @@ ProcXineramaQueryScreens(ClientPtr client) rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens; rep.length = rep.number * sz_XineramaScreenInfo >> 2; if (client->swapped) { - register int n; - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.number, n); + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl (&rep.number); } WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep); @@ -1088,11 +1082,10 @@ ProcXineramaQueryScreens(ClientPtr client) scratch.height = panoramiXdataPtr[i].height; if(client->swapped) { - register int n; - swaps (&scratch.x_org, n); - swaps (&scratch.y_org, n); - swaps (&scratch.width, n); - swaps (&scratch.height, n); + swaps (&scratch.x_org); + swaps (&scratch.y_org); + swaps (&scratch.width); + swaps (&scratch.height); } WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch); } diff --git a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c index 76346fa34..5ea3bf3a6 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c @@ -57,9 +57,8 @@ static int SProcPanoramiXQueryVersion (ClientPtr client) { REQUEST(xPanoramiXQueryVersionReq); - register int n; - swaps(&stuff->length,n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); return ProcPanoramiXQueryVersion(client); } @@ -68,9 +67,8 @@ static int SProcPanoramiXGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); - register int n; - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); return ProcPanoramiXGetState(client); } @@ -79,9 +77,8 @@ static int SProcPanoramiXGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); - register int n; - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); return ProcPanoramiXGetScreenCount(client); } @@ -90,9 +87,8 @@ static int SProcPanoramiXGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); - register int n; - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); return ProcPanoramiXGetScreenSize(client); } @@ -102,9 +98,8 @@ static int SProcXineramaIsActive(ClientPtr client) { REQUEST(xXineramaIsActiveReq); - register int n; - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH(xXineramaIsActiveReq); return ProcXineramaIsActive(client); } @@ -114,9 +109,8 @@ static int SProcXineramaQueryScreens(ClientPtr client) { REQUEST(xXineramaQueryScreensReq); - register int n; - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); return ProcXineramaQueryScreens(client); } diff --git a/nx-X11/programs/Xserver/Xext/saver.c b/nx-X11/programs/Xserver/Xext/saver.c index f9a86899f..1f78be9c8 100644 --- a/nx-X11/programs/Xserver/Xext/saver.c +++ b/nx-X11/programs/Xserver/Xext/saver.c @@ -490,9 +490,9 @@ SScreenSaverNotifyEvent (from, to) to->type = from->type; to->state = from->state; cpswaps (from->sequenceNumber, to->sequenceNumber); - cpswapl (from->timestamp, to->timestamp); - cpswapl (from->root, to->root); - cpswapl (from->window, to->window); + cpswapl (from->timestamp, to->timestamp); + cpswapl (from->root, to->root); + cpswapl (from->window, to->window); to->kind = from->kind; to->forced = from->forced; } @@ -704,8 +704,8 @@ ProcScreenSaverQueryVersion (client) rep.majorVersion = SERVER_SAVER_MAJOR_VERSION; rep.minorVersion = SERVER_SAVER_MINOR_VERSION; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); } WriteToClient(client, sizeof (xScreenSaverQueryVersionReply), (char *)&rep); return (client->noClientException); @@ -772,12 +772,12 @@ ProcScreenSaverQueryInfo (client) rep.kind = ScreenSaverInternal; if (client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.window, n); - swapl (&rep.tilOrSince, n); - swapl (&rep.idle, n); - swapl (&rep.eventMask, n); + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl (&rep.window); + swapl (&rep.tilOrSince); + swapl (&rep.idle); + swapl (&rep.eventMask); } WriteToClient(client, sizeof (xScreenSaverQueryInfoReply), (char *)&rep); return (client->noClientException); @@ -1331,7 +1331,7 @@ SProcScreenSaverQueryVersion (client) REQUEST(xScreenSaverQueryVersionReq); int n; - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq); return ProcScreenSaverQueryVersion (client); } @@ -1343,9 +1343,9 @@ SProcScreenSaverQueryInfo (client) REQUEST(xScreenSaverQueryInfoReq); int n; - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq); - swapl (&stuff->drawable, n); + swapl (&stuff->drawable); return ProcScreenSaverQueryInfo (client); } @@ -1356,10 +1356,10 @@ SProcScreenSaverSelectInput (client) REQUEST(xScreenSaverSelectInputReq); int n; - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq); - swapl (&stuff->drawable, n); - swapl (&stuff->eventMask, n); + swapl (&stuff->drawable); + swapl (&stuff->eventMask); return ProcScreenSaverSelectInput (client); } @@ -1370,16 +1370,16 @@ SProcScreenSaverSetAttributes (client) REQUEST(xScreenSaverSetAttributesReq); int n; - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq); - swapl (&stuff->drawable, n); - swaps (&stuff->x, n); - swaps (&stuff->y, n); - swaps (&stuff->width, n); - swaps (&stuff->height, n); - swaps (&stuff->borderWidth, n); - swapl (&stuff->visualID, n); - swapl (&stuff->mask, n); + swapl (&stuff->drawable); + swaps (&stuff->x); + swaps (&stuff->y); + swaps (&stuff->width); + swaps (&stuff->height); + swaps (&stuff->borderWidth); + swapl (&stuff->visualID); + swapl (&stuff->mask); SwapRestL(stuff); return ProcScreenSaverSetAttributes (client); } @@ -1391,9 +1391,9 @@ SProcScreenSaverUnsetAttributes (client) REQUEST(xScreenSaverUnsetAttributesReq); int n; - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq); - swapl (&stuff->drawable, n); + swapl (&stuff->drawable); return ProcScreenSaverUnsetAttributes (client); } diff --git a/nx-X11/programs/Xserver/Xext/security.c b/nx-X11/programs/Xserver/Xext/security.c index a68cbf998..14fa1ce0e 100644 --- a/nx-X11/programs/Xserver/Xext/security.c +++ b/nx-X11/programs/Xserver/Xext/security.c @@ -491,10 +491,9 @@ ProcSecurityQueryVersion( rep.minorVersion = SERVER_SECURITY_MINOR_VERSION; if(client->swapped) { - register char n; - swaps(&rep.sequenceNumber, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); } (void)WriteToClient(client, SIZEOF(xSecurityQueryVersionReply), (char *)&rep); @@ -709,11 +708,10 @@ ProcSecurityGenerateAuthorization( if (client->swapped) { - register char n; - swapl(&rep.length, n); - swaps(&rep.sequenceNumber, n); - swapl(&rep.authId, n); - swaps(&rep.dataLength, n); + swapl(&rep.length); + swaps(&rep.sequenceNumber); + swapl(&rep.authId); + swaps(&rep.dataLength); } WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply), @@ -788,12 +786,11 @@ SProcSecurityQueryVersion( ClientPtr client) { REQUEST(xSecurityQueryVersionReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xSecurityQueryVersionReq); - swaps(&stuff->majorVersion, n); - swaps(&stuff->minorVersion,n); + swaps(&stuff->majorVersion); + swaps(&stuff->minorVersion); return ProcSecurityQueryVersion(client); } /* SProcSecurityQueryVersion */ @@ -803,16 +800,15 @@ SProcSecurityGenerateAuthorization( ClientPtr client) { REQUEST(xSecurityGenerateAuthorizationReq); - register char n; CARD32 *values; unsigned long nvalues; int values_offset; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq); - swaps(&stuff->nbytesAuthProto, n); - swaps(&stuff->nbytesAuthData, n); - swapl(&stuff->valueMask, n); + swaps(&stuff->nbytesAuthProto); + swaps(&stuff->nbytesAuthData); + swapl(&stuff->valueMask); values_offset = ((stuff->nbytesAuthProto + (unsigned)3) >> 2) + ((stuff->nbytesAuthData + (unsigned)3) >> 2); if (values_offset > @@ -830,11 +826,10 @@ SProcSecurityRevokeAuthorization( ClientPtr client) { REQUEST(xSecurityRevokeAuthorizationReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq); - swapl(&stuff->authId, n); + swapl(&stuff->authId); return ProcSecurityRevokeAuthorization(client); } /* SProcSecurityRevokeAuthorization */ diff --git a/nx-X11/programs/Xserver/Xext/shape.c b/nx-X11/programs/Xserver/Xext/shape.c index b929dded0..07fa62018 100644 --- a/nx-X11/programs/Xserver/Xext/shape.c +++ b/nx-X11/programs/Xserver/Xext/shape.c @@ -289,7 +289,6 @@ ProcShapeQueryVersion (client) register ClientPtr client; { xShapeQueryVersionReply rep; - register int n; REQUEST_SIZE_MATCH (xShapeQueryVersionReq); memset(&rep, 0, sizeof(xShapeQueryVersionReply)); @@ -299,10 +298,10 @@ ProcShapeQueryVersion (client) rep.majorVersion = SERVER_SHAPE_MAJOR_VERSION; rep.minorVersion = SERVER_SHAPE_MINOR_VERSION; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); } WriteToClient(client, sizeof (xShapeQueryVersionReply), (char *)&rep); return (client->noClientException); @@ -714,7 +713,6 @@ ProcShapeQueryExtents (client) WindowPtr pWin; xShapeQueryExtentsReply rep; BoxRec extents, *pExtents; - register int n; RegionPtr region; REQUEST_SIZE_MATCH (xShapeQueryExtentsReq); @@ -756,16 +754,16 @@ ProcShapeQueryExtents (client) rep.widthClipShape = extents.x2 - extents.x1; rep.heightClipShape = extents.y2 - extents.y1; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.xBoundingShape, n); - swaps(&rep.yBoundingShape, n); - swaps(&rep.widthBoundingShape, n); - swaps(&rep.heightBoundingShape, n); - swaps(&rep.xClipShape, n); - swaps(&rep.yClipShape, n); - swaps(&rep.widthClipShape, n); - swaps(&rep.heightClipShape, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.xBoundingShape); + swaps(&rep.yBoundingShape); + swaps(&rep.widthBoundingShape); + swaps(&rep.heightBoundingShape); + swaps(&rep.xClipShape); + swaps(&rep.yClipShape); + swaps(&rep.widthClipShape); + swaps(&rep.heightClipShape); } WriteToClient(client, sizeof (xShapeQueryExtentsReply), (char *)&rep); return (client->noClientException); @@ -998,7 +996,6 @@ ProcShapeInputSelected (client) ShapeEventPtr pShapeEvent, *pHead; int enabled; xShapeInputSelectedReply rep; - register int n; REQUEST_SIZE_MATCH (xShapeInputSelectedReq); pWin = LookupWindow (stuff->window, client); @@ -1023,8 +1020,8 @@ ProcShapeInputSelected (client) rep.sequenceNumber = client->sequence; rep.enabled = enabled; if (client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); + swaps (&rep.sequenceNumber); + swapl (&rep.length); } WriteToClient (client, sizeof (xShapeInputSelectedReply), (char *) &rep); return (client->noClientException); @@ -1040,7 +1037,6 @@ ProcShapeGetRectangles (client) xRectangle *rects; int nrects, i; RegionPtr region; - register int n; REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); pWin = LookupWindow (stuff->window, client); @@ -1105,9 +1101,9 @@ ProcShapeGetRectangles (client) rep.ordering = YXBanded; rep.nrects = nrects; if (client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.nrects, n); + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl (&rep.nrects); SwapShorts ((short *)rects, (unsigned long)nrects * 4); } WriteToClient (client, sizeof (rep), (char *) &rep); @@ -1185,10 +1181,9 @@ static int SProcShapeQueryVersion (client) register ClientPtr client; { - register int n; REQUEST (xShapeQueryVersionReq); - swaps (&stuff->length, n); + swaps (&stuff->length); return ProcShapeQueryVersion (client); } @@ -1196,14 +1191,13 @@ static int SProcShapeRectangles (client) register ClientPtr client; { - register char n; REQUEST (xShapeRectanglesReq); - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); - swapl (&stuff->dest, n); - swaps (&stuff->xOff, n); - swaps (&stuff->yOff, n); + swapl (&stuff->dest); + swaps (&stuff->xOff); + swaps (&stuff->yOff); SwapRestS(stuff); return ProcShapeRectangles (client); } @@ -1212,15 +1206,14 @@ static int SProcShapeMask (client) register ClientPtr client; { - register char n; REQUEST (xShapeMaskReq); - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH (xShapeMaskReq); - swapl (&stuff->dest, n); - swaps (&stuff->xOff, n); - swaps (&stuff->yOff, n); - swapl (&stuff->src, n); + swapl (&stuff->dest); + swaps (&stuff->xOff); + swaps (&stuff->yOff); + swapl (&stuff->src); return ProcShapeMask (client); } @@ -1228,15 +1221,14 @@ static int SProcShapeCombine (client) register ClientPtr client; { - register char n; REQUEST (xShapeCombineReq); - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH (xShapeCombineReq); - swapl (&stuff->dest, n); - swaps (&stuff->xOff, n); - swaps (&stuff->yOff, n); - swapl (&stuff->src, n); + swapl (&stuff->dest); + swaps (&stuff->xOff); + swaps (&stuff->yOff); + swapl (&stuff->src); return ProcShapeCombine (client); } @@ -1244,14 +1236,13 @@ static int SProcShapeOffset (client) register ClientPtr client; { - register char n; REQUEST (xShapeOffsetReq); - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH (xShapeOffsetReq); - swapl (&stuff->dest, n); - swaps (&stuff->xOff, n); - swaps (&stuff->yOff, n); + swapl (&stuff->dest); + swaps (&stuff->xOff); + swaps (&stuff->yOff); return ProcShapeOffset (client); } @@ -1259,12 +1250,11 @@ static int SProcShapeQueryExtents (client) register ClientPtr client; { - register char n; REQUEST (xShapeQueryExtentsReq); - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH (xShapeQueryExtentsReq); - swapl (&stuff->window, n); + swapl (&stuff->window); return ProcShapeQueryExtents (client); } @@ -1272,12 +1262,11 @@ static int SProcShapeSelectInput (client) register ClientPtr client; { - register char n; REQUEST (xShapeSelectInputReq); - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH (xShapeSelectInputReq); - swapl (&stuff->window, n); + swapl (&stuff->window); return ProcShapeSelectInput (client); } @@ -1285,12 +1274,11 @@ static int SProcShapeInputSelected (client) register ClientPtr client; { - register int n; REQUEST (xShapeInputSelectedReq); - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH (xShapeInputSelectedReq); - swapl (&stuff->window, n); + swapl (&stuff->window); return ProcShapeInputSelected (client); } @@ -1299,11 +1287,10 @@ SProcShapeGetRectangles (client) register ClientPtr client; { REQUEST(xShapeGetRectanglesReq); - register char n; - swaps (&stuff->length, n); + swaps (&stuff->length); REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); - swapl (&stuff->window, n); + swapl (&stuff->window); return ProcShapeGetRectangles (client); } diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c index af529e46f..902bee7a1 100644 --- a/nx-X11/programs/Xserver/Xext/shm.c +++ b/nx-X11/programs/Xserver/Xext/shm.c @@ -346,7 +346,6 @@ ProcShmQueryVersion(client) register ClientPtr client; { xShmQueryVersionReply rep; - register int n; REQUEST_SIZE_MATCH(xShmQueryVersionReq); memset(&rep, 0, sizeof(xShmQueryVersionReply)); @@ -360,12 +359,12 @@ ProcShmQueryVersion(client) rep.uid = geteuid(); rep.gid = getegid(); if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - swaps(&rep.uid, n); - swaps(&rep.gid, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); + swaps(&rep.uid); + swaps(&rep.gid); } WriteToClient(client, sizeof(xShmQueryVersionReply), (char *)&rep); return (client->noClientException); @@ -712,11 +711,10 @@ ProcPanoramiXShmGetImage(ClientPtr client) } if (client->swapped) { - register int n; - swaps(&xgi.sequenceNumber, n); - swapl(&xgi.length, n); - swapl(&xgi.visual, n); - swapl(&xgi.size, n); + swaps(&xgi.sequenceNumber); + swapl(&xgi.length); + swapl(&xgi.visual); + swapl(&xgi.size); } WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi); @@ -952,7 +950,6 @@ ProcShmGetImage(client) Mask plane = 0; xShmGetImageReply xgi; ShmDescPtr shmdesc; - int n; REQUEST(xShmGetImageReq); @@ -1043,10 +1040,10 @@ ProcShmGetImage(client) } if (client->swapped) { - swaps(&xgi.sequenceNumber, n); - swapl(&xgi.length, n); - swapl(&xgi.visual, n); - swapl(&xgi.size, n); + swaps(&xgi.sequenceNumber); + swapl(&xgi.length); + swapl(&xgi.visual); + swapl(&xgi.size); } WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi); @@ -1205,10 +1202,9 @@ static int SProcShmQueryVersion(client) register ClientPtr client; { - register int n; REQUEST(xShmQueryVersionReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return ProcShmQueryVersion(client); } @@ -1216,12 +1212,11 @@ static int SProcShmAttach(client) ClientPtr client; { - register int n; REQUEST(xShmAttachReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmAttachReq); - swapl(&stuff->shmseg, n); - swapl(&stuff->shmid, n); + swapl(&stuff->shmseg); + swapl(&stuff->shmid); return ProcShmAttach(client); } @@ -1229,11 +1224,10 @@ static int SProcShmDetach(client) ClientPtr client; { - register int n; REQUEST(xShmDetachReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmDetachReq); - swapl(&stuff->shmseg, n); + swapl(&stuff->shmseg); return ProcShmDetach(client); } @@ -1241,22 +1235,21 @@ static int SProcShmPutImage(client) ClientPtr client; { - register int n; REQUEST(xShmPutImageReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmPutImageReq); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->totalWidth, n); - swaps(&stuff->totalHeight, n); - swaps(&stuff->srcX, n); - swaps(&stuff->srcY, n); - swaps(&stuff->srcWidth, n); - swaps(&stuff->srcHeight, n); - swaps(&stuff->dstX, n); - swaps(&stuff->dstY, n); - swapl(&stuff->shmseg, n); - swapl(&stuff->offset, n); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->totalWidth); + swaps(&stuff->totalHeight); + swaps(&stuff->srcX); + swaps(&stuff->srcY); + swaps(&stuff->srcWidth); + swaps(&stuff->srcHeight); + swaps(&stuff->dstX); + swaps(&stuff->dstY); + swapl(&stuff->shmseg); + swapl(&stuff->offset); return ProcShmPutImage(client); } @@ -1264,18 +1257,17 @@ static int SProcShmGetImage(client) ClientPtr client; { - register int n; REQUEST(xShmGetImageReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmGetImageReq); - swapl(&stuff->drawable, n); - swaps(&stuff->x, n); - swaps(&stuff->y, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); - swapl(&stuff->planeMask, n); - swapl(&stuff->shmseg, n); - swapl(&stuff->offset, n); + swapl(&stuff->drawable); + swaps(&stuff->x); + swaps(&stuff->y); + swaps(&stuff->width); + swaps(&stuff->height); + swapl(&stuff->planeMask); + swapl(&stuff->shmseg); + swapl(&stuff->offset); return ProcShmGetImage(client); } @@ -1283,16 +1275,15 @@ static int SProcShmCreatePixmap(client) ClientPtr client; { - register int n; REQUEST(xShmCreatePixmapReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmCreatePixmapReq); - swapl(&stuff->pid, n); - swapl(&stuff->drawable, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); - swapl(&stuff->shmseg, n); - swapl(&stuff->offset, n); + swapl(&stuff->pid); + swapl(&stuff->drawable); + swaps(&stuff->width); + swaps(&stuff->height); + swapl(&stuff->shmseg); + swapl(&stuff->offset); return ProcShmCreatePixmap(client); } diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c index aab85666e..8899b7c17 100644 --- a/nx-X11/programs/Xserver/Xext/sync.c +++ b/nx-X11/programs/Xserver/Xext/sync.c @@ -1343,7 +1343,6 @@ ProcSyncInitialize(client) ClientPtr client; { xSyncInitializeReply rep; - int n; REQUEST_SIZE_MATCH(xSyncInitializeReq); @@ -1356,7 +1355,7 @@ ProcSyncInitialize(client) if (client->swapped) { - swaps(&rep.sequenceNumber, n); + swaps(&rep.sequenceNumber); } WriteToClient(client, sizeof(rep), (char *) &rep); return (client->noClientException); @@ -1397,10 +1396,9 @@ ProcSyncListSystemCounters(client) if (client->swapped) { - register char n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.nCounters, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.nCounters); } for (i = 0; i < SyncNumSystemCounters; i++) @@ -1417,11 +1415,10 @@ ProcSyncListSystemCounters(client) if (client->swapped) { - register char n; - swapl(&walklist->counter, n); - swapl(&walklist->resolution_hi, n); - swapl(&walklist->resolution_lo, n); - swaps(&walklist->name_length, n); + swapl(&walklist->counter); + swapl(&walklist->resolution_hi); + swapl(&walklist->resolution_lo); + swaps(&walklist->name_length); } pname_in_reply = ((char *)walklist) + sz_xSyncSystemCounter; @@ -1502,9 +1499,8 @@ ProcSyncGetPriority(client) if (client->swapped) { - register char n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.priority, n); + swaps(&rep.sequenceNumber); + swapl(&rep.priority); } WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep); @@ -1787,11 +1783,10 @@ ProcSyncQueryCounter(client) rep.value_lo = XSyncValueLow32(pCounter->value); if (client->swapped) { - register char n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.value_hi, n); - swapl(&rep.value_lo, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.value_hi); + swapl(&rep.value_lo); } WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep); return (client->noClientException); @@ -1969,15 +1964,14 @@ ProcSyncQueryAlarm(client) if (client->swapped) { - register char n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.counter, n); - swapl(&rep.wait_value_hi, n); - swapl(&rep.wait_value_lo, n); - swapl(&rep.test_type, n); - swapl(&rep.delta_hi, n); - swapl(&rep.delta_lo, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.counter); + swapl(&rep.wait_value_hi); + swapl(&rep.wait_value_lo); + swapl(&rep.test_type); + swapl(&rep.delta_hi); + swapl(&rep.delta_lo); } WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep); @@ -2058,9 +2052,8 @@ SProcSyncInitialize(client) ClientPtr client; { REQUEST(xSyncInitializeReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncInitializeReq); return ProcSyncInitialize(client); @@ -2071,9 +2064,8 @@ SProcSyncListSystemCounters(client) ClientPtr client; { REQUEST(xSyncListSystemCountersReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncListSystemCountersReq); return ProcSyncListSystemCounters(client); @@ -2084,13 +2076,12 @@ SProcSyncCreateCounter(client) ClientPtr client; { REQUEST(xSyncCreateCounterReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncCreateCounterReq); - swapl(&stuff->cid, n); - swapl(&stuff->initial_value_lo, n); - swapl(&stuff->initial_value_hi, n); + swapl(&stuff->cid); + swapl(&stuff->initial_value_lo); + swapl(&stuff->initial_value_hi); return ProcSyncCreateCounter(client); } @@ -2100,13 +2091,12 @@ SProcSyncSetCounter(client) ClientPtr client; { REQUEST(xSyncSetCounterReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncSetCounterReq); - swapl(&stuff->cid, n); - swapl(&stuff->value_lo, n); - swapl(&stuff->value_hi, n); + swapl(&stuff->cid); + swapl(&stuff->value_lo); + swapl(&stuff->value_hi); return ProcSyncSetCounter(client); } @@ -2116,13 +2106,12 @@ SProcSyncChangeCounter(client) ClientPtr client; { REQUEST(xSyncChangeCounterReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncChangeCounterReq); - swapl(&stuff->cid, n); - swapl(&stuff->value_lo, n); - swapl(&stuff->value_hi, n); + swapl(&stuff->cid); + swapl(&stuff->value_lo); + swapl(&stuff->value_hi); return ProcSyncChangeCounter(client); } @@ -2132,11 +2121,10 @@ SProcSyncQueryCounter(client) ClientPtr client; { REQUEST(xSyncQueryCounterReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncQueryCounterReq); - swapl(&stuff->counter, n); + swapl(&stuff->counter); return ProcSyncQueryCounter(client); } @@ -2146,11 +2134,10 @@ SProcSyncDestroyCounter(client) ClientPtr client; { REQUEST(xSyncDestroyCounterReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncDestroyCounterReq); - swapl(&stuff->counter, n); + swapl(&stuff->counter); return ProcSyncDestroyCounter(client); } @@ -2160,9 +2147,8 @@ SProcSyncAwait(client) ClientPtr client; { REQUEST(xSyncAwaitReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSyncAwaitReq); SwapRestL(stuff); @@ -2175,12 +2161,11 @@ SProcSyncCreateAlarm(client) ClientPtr client; { REQUEST(xSyncCreateAlarmReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq); - swapl(&stuff->id, n); - swapl(&stuff->valueMask, n); + swapl(&stuff->id); + swapl(&stuff->valueMask); SwapRestL(stuff); return ProcSyncCreateAlarm(client); @@ -2191,12 +2176,11 @@ SProcSyncChangeAlarm(client) ClientPtr client; { REQUEST(xSyncChangeAlarmReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); - swapl(&stuff->alarm, n); - swapl(&stuff->valueMask, n); + swapl(&stuff->alarm); + swapl(&stuff->valueMask); SwapRestL(stuff); return ProcSyncChangeAlarm(client); } @@ -2206,11 +2190,10 @@ SProcSyncQueryAlarm(client) ClientPtr client; { REQUEST(xSyncQueryAlarmReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncQueryAlarmReq); - swapl(&stuff->alarm, n); + swapl(&stuff->alarm); return ProcSyncQueryAlarm(client); } @@ -2220,11 +2203,10 @@ SProcSyncDestroyAlarm(client) ClientPtr client; { REQUEST(xSyncDestroyAlarmReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncDestroyAlarmReq); - swapl(&stuff->alarm, n); + swapl(&stuff->alarm); return ProcSyncDestroyAlarm(client); } @@ -2234,12 +2216,11 @@ SProcSyncSetPriority(client) ClientPtr client; { REQUEST(xSyncSetPriorityReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncSetPriorityReq); - swapl(&stuff->id, n); - swapl(&stuff->priority, n); + swapl(&stuff->id); + swapl(&stuff->priority); return ProcSyncSetPriority(client); } @@ -2249,11 +2230,10 @@ SProcSyncGetPriority(client) ClientPtr client; { REQUEST(xSyncGetPriorityReq); - register char n; - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncGetPriorityReq); - swapl(&stuff->id, n); + swapl(&stuff->id); return ProcSyncGetPriority(client); } diff --git a/nx-X11/programs/Xserver/Xext/xcmisc.c b/nx-X11/programs/Xserver/Xext/xcmisc.c index 7021ed47e..bca5bca34 100644 --- a/nx-X11/programs/Xserver/Xext/xcmisc.c +++ b/nx-X11/programs/Xserver/Xext/xcmisc.c @@ -98,7 +98,6 @@ ProcXCMiscGetVersion(client) register ClientPtr client; { xXCMiscGetVersionReply rep; - register int n; REQUEST_SIZE_MATCH(xXCMiscGetVersionReq); rep.type = X_Reply; @@ -107,9 +106,9 @@ ProcXCMiscGetVersion(client) rep.majorVersion = XCMiscMajorVersion; rep.minorVersion = XCMiscMinorVersion; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xXCMiscGetVersionReply), (char *)&rep); return(client->noClientException); @@ -120,7 +119,6 @@ ProcXCMiscGetXIDRange(client) register ClientPtr client; { xXCMiscGetXIDRangeReply rep; - register int n; XID min_id, max_id; REQUEST_SIZE_MATCH(xXCMiscGetXIDRangeReq); @@ -131,9 +129,9 @@ ProcXCMiscGetXIDRange(client) rep.start_id = min_id; rep.count = max_id - min_id + 1; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.start_id, n); - swapl(&rep.count, n); + swaps(&rep.sequenceNumber); + swapl(&rep.start_id); + swapl(&rep.count); } WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), (char *)&rep); return(client->noClientException); @@ -145,7 +143,6 @@ ProcXCMiscGetXIDList(client) { REQUEST(xXCMiscGetXIDListReq); xXCMiscGetXIDListReply rep; - register int n; XID *pids; unsigned int count; @@ -165,9 +162,9 @@ ProcXCMiscGetXIDList(client) rep.length = count; rep.count = count; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.count, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.count); } WriteToClient(client, sizeof(xXCMiscGetXIDListReply), (char *)&rep); if (count) @@ -201,13 +198,12 @@ static int SProcXCMiscGetVersion(client) register ClientPtr client; { - register int n; REQUEST(xXCMiscGetVersionReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXCMiscGetVersionReq); - swaps(&stuff->majorVersion, n); - swaps(&stuff->minorVersion, n); + swaps(&stuff->majorVersion); + swaps(&stuff->minorVersion); return ProcXCMiscGetVersion(client); } @@ -215,10 +211,9 @@ static int SProcXCMiscGetXIDRange(client) register ClientPtr client; { - register int n; REQUEST(xReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return ProcXCMiscGetXIDRange(client); } @@ -226,12 +221,11 @@ static int SProcXCMiscGetXIDList(client) register ClientPtr client; { - register int n; REQUEST(xXCMiscGetXIDListReq); REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq); - swaps(&stuff->length, n); - swapl(&stuff->count, n); + swaps(&stuff->length); + swapl(&stuff->count); return ProcXCMiscGetXIDList(client); } diff --git a/nx-X11/programs/Xserver/Xext/xf86bigfont.c b/nx-X11/programs/Xserver/Xext/xf86bigfont.c index a89005cde..18c96db13 100644 --- a/nx-X11/programs/Xserver/Xext/xf86bigfont.c +++ b/nx-X11/programs/Xserver/Xext/xf86bigfont.c @@ -375,14 +375,13 @@ ProcXF86BigfontQueryVersion( #endif ; /* may add more bits here in future versions */ if (client->swapped) { - char tmp; - swaps(&reply.sequenceNumber, tmp); - swapl(&reply.length, tmp); - swaps(&reply.majorVersion, tmp); - swaps(&reply.minorVersion, tmp); - swapl(&reply.uid, tmp); - swapl(&reply.gid, tmp); - swapl(&reply.signature, tmp); + swaps(&reply.sequenceNumber); + swapl(&reply.length); + swaps(&reply.majorVersion); + swaps(&reply.minorVersion); + swapl(&reply.uid); + swapl(&reply.gid); + swapl(&reply.signature); } WriteToClient(client, sizeof(xXF86BigfontQueryVersionReply), (char *)&reply); @@ -393,14 +392,12 @@ static void swapCharInfo( xCharInfo *pCI) { - char tmp; - - swaps(&pCI->leftSideBearing, tmp); - swaps(&pCI->rightSideBearing, tmp); - swaps(&pCI->characterWidth, tmp); - swaps(&pCI->ascent, tmp); - swaps(&pCI->descent, tmp); - swaps(&pCI->attributes, tmp); + swaps(&pCI->leftSideBearing); + swaps(&pCI->rightSideBearing); + swaps(&pCI->characterWidth); + swaps(&pCI->ascent); + swaps(&pCI->descent); + swaps(&pCI->attributes); } /* static CARD32 hashCI (xCharInfo *p); */ @@ -671,21 +668,20 @@ ProcXF86BigfontQueryFont( reply->shmid = shmid; reply->shmsegoffset = 0; if (client->swapped) { - char tmp; - swaps(&reply->sequenceNumber, tmp); - swapl(&reply->length, tmp); + swaps(&reply->sequenceNumber); + swapl(&reply->length); swapCharInfo(&reply->minBounds); swapCharInfo(&reply->maxBounds); - swaps(&reply->minCharOrByte2, tmp); - swaps(&reply->maxCharOrByte2, tmp); - swaps(&reply->defaultChar, tmp); - swaps(&reply->nFontProps, tmp); - swaps(&reply->fontAscent, tmp); - swaps(&reply->fontDescent, tmp); - swapl(&reply->nCharInfos, tmp); - swapl(&reply->nUniqCharInfos, tmp); - swapl(&reply->shmid, tmp); - swapl(&reply->shmsegoffset, tmp); + swaps(&reply->minCharOrByte2); + swaps(&reply->maxCharOrByte2); + swaps(&reply->defaultChar); + swaps(&reply->nFontProps); + swaps(&reply->fontAscent); + swaps(&reply->fontDescent); + swapl(&reply->nCharInfos); + swapl(&reply->nUniqCharInfos); + swapl(&reply->shmid); + swapl(&reply->shmsegoffset); } p = (char*) &reply[1]; { @@ -698,9 +694,8 @@ ProcXF86BigfontQueryFont( prFP->name = pFP->name; prFP->value = pFP->value; if (client->swapped) { - char tmp; - swapl(&prFP->name, tmp); - swapl(&prFP->value, tmp); + swapl(&prFP->name); + swapl(&prFP->value); } } p = (char*) prFP; @@ -719,8 +714,7 @@ ProcXF86BigfontQueryFont( for (j = 0; j < nCharInfos; j++, ps++) { *ps = pIndex2UniqIndex[j]; if (client->swapped) { - char tmp; - swaps(ps, tmp); + swaps(ps); } } } @@ -755,9 +749,8 @@ SProcXF86BigfontQueryVersion( ClientPtr client) { REQUEST(xXF86BigfontQueryVersionReq); - char tmp; - swaps(&stuff->length, tmp); + swaps(&stuff->length); return ProcXF86BigfontQueryVersion(client); } @@ -766,11 +759,10 @@ SProcXF86BigfontQueryFont( ClientPtr client) { REQUEST(xXF86BigfontQueryFontReq); - char tmp; - swaps(&stuff->length, tmp); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq); - swapl(&stuff->id, tmp); + swapl(&stuff->id); return ProcXF86BigfontQueryFont(client); } diff --git a/nx-X11/programs/Xserver/Xext/xres.c b/nx-X11/programs/Xserver/Xext/xres.c index 3d5ae162c..d78fa68e1 100644 --- a/nx-X11/programs/Xserver/Xext/xres.c +++ b/nx-X11/programs/Xserver/Xext/xres.c @@ -27,26 +27,19 @@ ProcXResQueryVersion (ClientPtr client) { REQUEST(xXResQueryVersionReq); xXResQueryVersionReply rep; - CARD16 client_major, client_minor; /* not used */ REQUEST_SIZE_MATCH (xXResQueryVersionReq); - client_major = stuff->client_major; - client_minor = stuff->client_minor; - (void) client_major; - (void) client_minor; - rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.server_major = SERVER_XRES_MAJOR_VERSION; rep.server_minor = SERVER_XRES_MINOR_VERSION; if (client->swapped) { - int n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.server_major, n); - swaps(&rep.server_minor, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.server_major); + swaps(&rep.server_minor); } WriteToClient(client, sizeof (xXResQueryVersionReply), (char *)&rep); return (client->noClientException); @@ -77,10 +70,9 @@ ProcXResQueryClients (ClientPtr client) rep.num_clients = num_clients; rep.length = rep.num_clients * sz_xXResClient >> 2; if (client->swapped) { - int n; - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.num_clients, n); + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl (&rep.num_clients); } WriteToClient (client, sizeof (xXResQueryClientsReply), (char *) &rep); @@ -92,9 +84,8 @@ ProcXResQueryClients (ClientPtr client) scratch.resource_mask = RESOURCE_ID_MASK; if(client->swapped) { - register int n; - swapl (&scratch.resource_base, n); - swapl (&scratch.resource_mask, n); + swapl (&scratch.resource_base); + swapl (&scratch.resource_mask); } WriteToClient (client, sz_xXResClient, (char *) &scratch); } @@ -150,10 +141,9 @@ ProcXResQueryClientResources (ClientPtr client) rep.num_types = num_types; rep.length = rep.num_types * sz_xXResType >> 2; if (client->swapped) { - int n; - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.num_types, n); + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl (&rep.num_types); } WriteToClient (client,sizeof(xXResQueryClientResourcesReply),(char*)&rep); @@ -173,9 +163,8 @@ ProcXResQueryClientResources (ClientPtr client) scratch.count = counts[i]; if(client->swapped) { - register int n; - swapl (&scratch.resource_type, n); - swapl (&scratch.count, n); + swapl (&scratch.resource_type); + swapl (&scratch.count); } WriteToClient (client, sz_xXResType, (char *) &scratch); } @@ -229,11 +218,10 @@ ProcXResQueryClientPixmapBytes (ClientPtr client) rep.bytes_overflow = 0; #endif if (client->swapped) { - int n; - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.bytes, n); - swapl (&rep.bytes_overflow, n); + swaps (&rep.sequenceNumber); + swapl (&rep.length); + swapl (&rep.bytes); + swapl (&rep.bytes_overflow); } WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),(char*)&rep); @@ -266,12 +254,7 @@ ProcResDispatch (ClientPtr client) static int SProcXResQueryVersion (ClientPtr client) { - REQUEST(xXResQueryVersionReq); - int n; - REQUEST_SIZE_MATCH (xXResQueryVersionReq); - swaps(&stuff->client_major,n); - swaps(&stuff->client_minor,n); return ProcXResQueryVersion(client); } @@ -279,10 +262,9 @@ static int SProcXResQueryClientResources (ClientPtr client) { REQUEST(xXResQueryClientResourcesReq); - int n; REQUEST_SIZE_MATCH (xXResQueryClientResourcesReq); - swaps(&stuff->xid,n); + swapl(&stuff->xid); return ProcXResQueryClientResources(client); } @@ -290,10 +272,9 @@ static int SProcXResQueryClientPixmapBytes (ClientPtr client) { REQUEST(xXResQueryClientPixmapBytesReq); - int n; REQUEST_SIZE_MATCH (xXResQueryClientPixmapBytesReq); - swaps(&stuff->xid,n); + swapl(&stuff->xid); return ProcXResQueryClientPixmapBytes(client); } @@ -301,9 +282,8 @@ static int SProcResDispatch (ClientPtr client) { REQUEST(xReq); - int n; - swaps(&stuff->length,n); + swaps(&stuff->length); switch (stuff->data) { case X_XResQueryVersion: diff --git a/nx-X11/programs/Xserver/Xext/xtest.c b/nx-X11/programs/Xserver/Xext/xtest.c index 565e8e8d7..7dd668fdb 100644 --- a/nx-X11/programs/Xserver/Xext/xtest.c +++ b/nx-X11/programs/Xserver/Xext/xtest.c @@ -121,7 +121,6 @@ ProcXTestGetVersion(client) register ClientPtr client; { xXTestGetVersionReply rep; - register int n; REQUEST_SIZE_MATCH(xXTestGetVersionReq); rep.type = X_Reply; @@ -130,8 +129,8 @@ ProcXTestGetVersion(client) rep.majorVersion = XTestMajorVersion; rep.minorVersion = XTestMinorVersion; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swaps(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep); return(client->noClientException); @@ -145,7 +144,6 @@ ProcXTestCompareCursor(client) xXTestCompareCursorReply rep; WindowPtr pWin; CursorPtr pCursor; - register int n; REQUEST_SIZE_MATCH(xXTestCompareCursorReq); pWin = (WindowPtr)LookupWindow(stuff->window, client); @@ -168,7 +166,7 @@ ProcXTestCompareCursor(client) rep.sequenceNumber = client->sequence; rep.same = (wCursor(pWin) == pCursor); if (client->swapped) { - swaps(&rep.sequenceNumber, n); + swaps(&rep.sequenceNumber); } WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep); return(client->noClientException); @@ -180,7 +178,7 @@ ProcXTestFakeInput(client) { REQUEST(xXTestFakeInputReq); int nev; - int n; + int n; xEvent *ev; DeviceIntPtr dev = NULL; WindowPtr root; @@ -285,7 +283,7 @@ ProcXTestFakeInput(client) if (client->swapped) { (void) XTestSwapFakeInput(client, (xReq *)stuff); - swaps(&stuff->length, n); + swaps(&stuff->length); } ResetCurrentRequest (client); client->sequence--; @@ -512,12 +510,11 @@ static int SProcXTestGetVersion(client) register ClientPtr client; { - register int n; REQUEST(xXTestGetVersionReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestGetVersionReq); - swaps(&stuff->minorVersion, n); + swaps(&stuff->minorVersion); return ProcXTestGetVersion(client); } @@ -525,13 +522,12 @@ static int SProcXTestCompareCursor(client) register ClientPtr client; { - register int n; REQUEST(xXTestCompareCursorReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestCompareCursorReq); - swapl(&stuff->window, n); - swapl(&stuff->cursor, n); + swapl(&stuff->window); + swapl(&stuff->cursor); return ProcXTestCompareCursor(client); } @@ -568,7 +564,7 @@ SProcXTestFakeInput(client) register int n; REQUEST(xReq); - swaps(&stuff->length, n); + swaps(&stuff->length); n = XTestSwapFakeInput(client, stuff); if (n != Success) return n; @@ -579,10 +575,9 @@ static int SProcXTestGrabControl(client) register ClientPtr client; { - register int n; REQUEST(xXTestGrabControlReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestGrabControlReq); return ProcXTestGrabControl(client); } diff --git a/nx-X11/programs/Xserver/Xext/xtest1di.c b/nx-X11/programs/Xserver/Xext/xtest1di.c index e7c3522ba..554f336b2 100644 --- a/nx-X11/programs/Xserver/Xext/xtest1di.c +++ b/nx-X11/programs/Xserver/Xext/xtest1di.c @@ -319,10 +319,6 @@ SProcTestFakeInput(client) register ClientPtr client; { /* - * used in the swaps and swapl macros for temporary storage space - */ - register char n; - /* * index counter */ int i; @@ -339,8 +335,8 @@ SProcTestFakeInput(client) /* * byte-swap the fields in the request */ - swaps(&stuff->length, n); - swapl(&stuff->ack, n); + swaps(&stuff->length); + swapl(&stuff->ack); /* * have to parse and then byte-swap the input action list here */ @@ -363,7 +359,7 @@ SProcTestFakeInput(client) /* * byte-swap the delay_time field */ - swaps(&(((XTestKeyInfo *) input_action_ptr)->delay_time), n); + swaps(&(((XTestKeyInfo *) input_action_ptr)->delay_time)); /* * advance to the next input action */ @@ -373,7 +369,7 @@ SProcTestFakeInput(client) /* * byte-swap the delay_time field */ - swaps(&(((XTestMotionInfo *) input_action_ptr)->delay_time), n); + swaps(&(((XTestMotionInfo *) input_action_ptr)->delay_time)); /* * advance to the next input action */ @@ -383,15 +379,15 @@ SProcTestFakeInput(client) /* * byte-swap the jumpx field */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpx), n); + swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpx)); /* * byte-swap the jumpy field */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpy), n); + swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpy)); /* * byte-swap the delay_time field */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->delay_time), n); + swaps(&(((XTestJumpInfo *) input_action_ptr)->delay_time)); /* * advance to the next input action */ @@ -409,7 +405,7 @@ SProcTestFakeInput(client) /* * byte-swap the delay_time field */ - swapl(&(((XTestDelayInfo *) input_action_ptr)->delay_time), n); + swapl(&(((XTestDelayInfo *) input_action_ptr)->delay_time)); /* * advance to the next input action */ @@ -440,17 +436,12 @@ static int SProcTestGetInput(client) register ClientPtr client; { - /* - * used in the swaps and swapl macros for temporary storage space - */ - register char n; - REQUEST(xTestGetInputReq); /* * byte-swap the fields in the request */ - swaps(&stuff->length, n); - swapl(&stuff->mode, n); + swaps(&stuff->length); + swapl(&stuff->mode); return(ProcTestGetInput(client)); } @@ -464,16 +455,11 @@ static int SProcTestStopInput(client) register ClientPtr client; { - /* - * used in the swaps and swapl macros for temporary storage space - */ - register char n; - REQUEST(xTestStopInputReq); /* * byte-swap the length field in the request */ - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcTestStopInput(client)); } @@ -487,16 +473,11 @@ static int SProcTestReset(client) register ClientPtr client; { - /* - * used in the swaps and swapl macros for temporary storage space - */ - register char n; - REQUEST(xTestResetReq); /* * byte-swap the length field in the request */ - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcTestReset(client)); } @@ -510,16 +491,11 @@ static int SProcTestQueryInputSize(client) register ClientPtr client; { - /* - * used in the swaps and swapl macros for temporary storage space - */ - register char n; - REQUEST(xTestQueryInputSizeReq); /* * byte-swap the length field in the request */ - swaps(&stuff->length, n); + swaps(&stuff->length); return(ProcTestQueryInputSize(client)); } @@ -781,10 +757,6 @@ SReplyXTestDispatch(client_ptr, size, reply_ptr) char *reply_ptr; { /* - * used in the swaps and swapl macros for temporary storage space - */ - register char n; - /* * pointer to xTestQueryInputSizeReply */ xTestQueryInputSizeReply *rep_ptr; @@ -793,9 +765,9 @@ SReplyXTestDispatch(client_ptr, size, reply_ptr) * there is only one reply in this extension, so byte-swap it */ rep_ptr = (xTestQueryInputSizeReply *) reply_ptr; - swaps(&(rep_ptr->sequenceNumber), n); - swapl(&(rep_ptr->length), n); - swapl(&(rep_ptr->size_return), n); + swaps(&(rep_ptr->sequenceNumber)); + swapl(&(rep_ptr->length)); + swapl(&(rep_ptr->size_return)); /* * now write the swapped reply to the client */ @@ -814,10 +786,6 @@ SEventXTestDispatch(from, to) xEvent *to; { /* - * used in the swaps and swapl macros for temporary storage space - */ - register char n; - /* * index counter */ int i; @@ -845,7 +813,7 @@ SEventXTestDispatch(from, to) /* * byte-swap the sequence number in the "to" event */ - swaps(&(((xTestInputActionEvent *) to)->sequenceNumber), n); + swaps(&(((xTestInputActionEvent *) to)->sequenceNumber)); /* * If the event is an xTestInputActionEvent, then it needs more * processing. Otherwise, it is an xTestFakeAckEvent, which @@ -886,7 +854,7 @@ SEventXTestDispatch(from, to) /* * byte-swap the delay_time field */ - swaps(&(((XTestKeyInfo *) input_action_ptr)->delay_time), n); + swaps(&(((XTestKeyInfo *) input_action_ptr)->delay_time)); /* * advance to the next input action */ @@ -896,7 +864,7 @@ SEventXTestDispatch(from, to) /* * byte-swap the delay_time field */ - swaps(&(((XTestMotionInfo *) input_action_ptr)->delay_time), n); + swaps(&(((XTestMotionInfo *) input_action_ptr)->delay_time)); /* * advance to the next input action */ @@ -906,15 +874,15 @@ SEventXTestDispatch(from, to) /* * byte-swap the jumpx field */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpx), n); + swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpx)); /* * byte-swap the jumpy field */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpy), n); + swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpy)); /* * byte-swap the delay_time field */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->delay_time), n); + swaps(&(((XTestJumpInfo *) input_action_ptr)->delay_time)); /* * advance to the next input action */ @@ -932,7 +900,7 @@ SEventXTestDispatch(from, to) /* * byte-swap the delay_time field */ - swapl(&(((XTestDelayInfo *) input_action_ptr)->delay_time), n); + swapl(&(((XTestDelayInfo *) input_action_ptr)->delay_time)); /* * advance to the next input action */ diff --git a/nx-X11/programs/Xserver/Xext/xvdisp.c b/nx-X11/programs/Xserver/Xext/xvdisp.c index e9250427d..905539c0b 100644 --- a/nx-X11/programs/Xserver/Xext/xvdisp.c +++ b/nx-X11/programs/Xserver/Xext/xvdisp.c @@ -1349,164 +1349,154 @@ ProcXvListImageFormats(ClientPtr client) static int SProcXvQueryExtension(ClientPtr client) { - register char n; REQUEST(xvQueryExtensionReq); REQUEST_SIZE_MATCH(xvQueryExtensionReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return ProcXvQueryExtension(client); } static int SProcXvQueryAdaptors(ClientPtr client) { - register char n; REQUEST(xvQueryAdaptorsReq); REQUEST_SIZE_MATCH(xvQueryAdaptorsReq); - swaps(&stuff->length, n); - swapl(&stuff->window, n); + swaps(&stuff->length); + swapl(&stuff->window); return ProcXvQueryAdaptors(client); } static int SProcXvQueryEncodings(ClientPtr client) { - register char n; REQUEST(xvQueryEncodingsReq); REQUEST_SIZE_MATCH(xvQueryEncodingsReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return ProcXvQueryEncodings(client); } static int SProcXvGrabPort(ClientPtr client) { - register char n; REQUEST(xvGrabPortReq); REQUEST_SIZE_MATCH(xvGrabPortReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->time, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->time); return ProcXvGrabPort(client); } static int SProcXvUngrabPort(ClientPtr client) { - register char n; REQUEST(xvUngrabPortReq); REQUEST_SIZE_MATCH(xvUngrabPortReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->time, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->time); return ProcXvUngrabPort(client); } static int SProcXvPutVideo(ClientPtr client) { - register char n; REQUEST(xvPutVideoReq); REQUEST_SIZE_MATCH(xvPutVideoReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return ProcXvPutVideo(client); } static int SProcXvPutStill(ClientPtr client) { - register char n; REQUEST(xvPutStillReq); REQUEST_SIZE_MATCH(xvPutStillReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return ProcXvPutStill(client); } static int SProcXvGetVideo(ClientPtr client) { - register char n; REQUEST(xvGetVideoReq); REQUEST_SIZE_MATCH(xvGetVideoReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return ProcXvGetVideo(client); } static int SProcXvGetStill(ClientPtr client) { - register char n; REQUEST(xvGetStillReq); REQUEST_SIZE_MATCH(xvGetStillReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return ProcXvGetStill(client); } static int SProcXvPutImage(ClientPtr client) { - register char n; REQUEST(xvPutImageReq); REQUEST_AT_LEAST_SIZE(xvPutImageReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swapl(&stuff->id, n); - swaps(&stuff->src_x, n); - swaps(&stuff->src_y, n); - swaps(&stuff->src_w, n); - swaps(&stuff->src_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swapl(&stuff->id); + swaps(&stuff->src_x); + swaps(&stuff->src_y); + swaps(&stuff->src_w); + swaps(&stuff->src_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + swaps(&stuff->width); + swaps(&stuff->height); return ProcXvPutImage(client); } @@ -1514,26 +1504,25 @@ SProcXvPutImage(ClientPtr client) static int SProcXvShmPutImage(ClientPtr client) { - register char n; REQUEST(xvShmPutImageReq); REQUEST_SIZE_MATCH(xvShmPutImageReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swapl(&stuff->shmseg, n); - swapl(&stuff->id, n); - swaps(&stuff->src_x, n); - swaps(&stuff->src_y, n); - swaps(&stuff->src_w, n); - swaps(&stuff->src_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); - swaps(&stuff->offset, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swapl(&stuff->shmseg); + swapl(&stuff->id); + swapl(&stuff->offset); + swaps(&stuff->src_x); + swaps(&stuff->src_y); + swaps(&stuff->src_w); + swaps(&stuff->src_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + swaps(&stuff->width); + swaps(&stuff->height); return ProcXvShmPutImage(client); } #endif @@ -1542,108 +1531,101 @@ SProcXvShmPutImage(ClientPtr client) static int SProcXvSelectVideoNotify(ClientPtr client) { - register char n; REQUEST(xvSelectVideoNotifyReq); REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq); - swaps(&stuff->length, n); - swapl(&stuff->drawable, n); + swaps(&stuff->length); + swapl(&stuff->drawable); return ProcXvSelectVideoNotify(client); } static int SProcXvSelectPortNotify(ClientPtr client) { - register char n; REQUEST(xvSelectPortNotifyReq); REQUEST_SIZE_MATCH(xvSelectPortNotifyReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return ProcXvSelectPortNotify(client); } static int SProcXvStopVideo(ClientPtr client) { - register char n; REQUEST(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); return ProcXvStopVideo(client); } static int SProcXvSetPortAttribute(ClientPtr client) { - register char n; REQUEST(xvSetPortAttributeReq); REQUEST_SIZE_MATCH(xvSetPortAttributeReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->attribute, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->attribute); + swapl(&stuff->value); return ProcXvSetPortAttribute(client); } static int SProcXvGetPortAttribute(ClientPtr client) { - register char n; REQUEST(xvGetPortAttributeReq); REQUEST_SIZE_MATCH(xvGetPortAttributeReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->attribute, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->attribute); return ProcXvGetPortAttribute(client); } static int SProcXvQueryBestSize(ClientPtr client) { - register char n; REQUEST(xvQueryBestSizeReq); REQUEST_SIZE_MATCH(xvQueryBestSizeReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return ProcXvQueryBestSize(client); } static int SProcXvQueryPortAttributes(ClientPtr client) { - register char n; REQUEST(xvQueryPortAttributesReq); REQUEST_SIZE_MATCH(xvQueryPortAttributesReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return ProcXvQueryPortAttributes(client); } static int SProcXvQueryImageAttributes(ClientPtr client) { - register char n; REQUEST(xvQueryImageAttributesReq); REQUEST_SIZE_MATCH(xvQueryImageAttributesReq); - swaps(&stuff->length, n); - swapl(&stuff->id, n); - swaps(&stuff->width, n); - swaps(&stuff->width, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->id); + swaps(&stuff->width); + swaps(&stuff->height); return ProcXvQueryImageAttributes(client); } static int SProcXvListImageFormats(ClientPtr client) { - register char n; REQUEST(xvListImageFormatsReq); REQUEST_SIZE_MATCH(xvListImageFormatsReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return ProcXvListImageFormats(client); } @@ -1653,12 +1635,10 @@ SWriteQueryExtensionReply( ClientPtr client, xvQueryExtensionReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->version, n); - swaps(&rep->revision, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->version); + swaps(&rep->revision); (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)&rep); @@ -1670,11 +1650,9 @@ SWriteQueryAdaptorsReply( ClientPtr client, xvQueryAdaptorsReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->num_adaptors, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_adaptors); (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)&rep); @@ -1686,11 +1664,9 @@ SWriteQueryEncodingsReply( ClientPtr client, xvQueryEncodingsReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->num_encodings, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_encodings); (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)&rep); @@ -1702,12 +1678,10 @@ SWriteAdaptorInfo( ClientPtr client, xvAdaptorInfo *pAdaptor ){ - register char n; - - swapl(&pAdaptor->base_id, n); - swaps(&pAdaptor->name_size, n); - swaps(&pAdaptor->num_ports, n); - swaps(&pAdaptor->num_formats, n); + swapl(&pAdaptor->base_id); + swaps(&pAdaptor->name_size); + swaps(&pAdaptor->num_ports); + swaps(&pAdaptor->num_formats); (void)WriteToClient(client, sz_xvAdaptorInfo, (char *)pAdaptor); @@ -1719,14 +1693,12 @@ SWriteEncodingInfo( ClientPtr client, xvEncodingInfo *pEncoding ){ - register char n; - - swapl(&pEncoding->encoding, n); - swaps(&pEncoding->name_size, n); - swaps(&pEncoding->width, n); - swaps(&pEncoding->height, n); - swapl(&pEncoding->rate.numerator, n); - swapl(&pEncoding->rate.denominator, n); + swapl(&pEncoding->encoding); + swaps(&pEncoding->name_size); + swaps(&pEncoding->width); + swaps(&pEncoding->height); + swapl(&pEncoding->rate.numerator); + swapl(&pEncoding->rate.denominator); (void)WriteToClient(client, sz_xvEncodingInfo, (char *)pEncoding); return Success; @@ -1737,9 +1709,7 @@ SWriteFormat( ClientPtr client, xvFormat *pFormat ){ - register char n; - - swapl(&pFormat->visual, n); + swapl(&pFormat->visual); (void)WriteToClient(client, sz_xvFormat, (char *)pFormat); return Success; @@ -1750,12 +1720,10 @@ SWriteAttributeInfo( ClientPtr client, xvAttributeInfo *pAtt ){ - register char n; - - swapl(&pAtt->flags, n); - swapl(&pAtt->size, n); - swapl(&pAtt->min, n); - swapl(&pAtt->max, n); + swapl(&pAtt->flags); + swapl(&pAtt->size); + swapl(&pAtt->min); + swapl(&pAtt->max); (void)WriteToClient(client, sz_xvAttributeInfo, (char *)pAtt); return Success; @@ -1766,21 +1734,19 @@ SWriteImageFormatInfo( ClientPtr client, xvImageFormatInfo *pImage ){ - register char n; - - swapl(&pImage->id, n); - swapl(&pImage->red_mask, n); - swapl(&pImage->green_mask, n); - swapl(&pImage->blue_mask, n); - swapl(&pImage->y_sample_bits, n); - swapl(&pImage->u_sample_bits, n); - swapl(&pImage->v_sample_bits, n); - swapl(&pImage->horz_y_period, n); - swapl(&pImage->horz_u_period, n); - swapl(&pImage->horz_v_period, n); - swapl(&pImage->vert_y_period, n); - swapl(&pImage->vert_u_period, n); - swapl(&pImage->vert_v_period, n); + swapl(&pImage->id); + swapl(&pImage->red_mask); + swapl(&pImage->green_mask); + swapl(&pImage->blue_mask); + swapl(&pImage->y_sample_bits); + swapl(&pImage->u_sample_bits); + swapl(&pImage->v_sample_bits); + swapl(&pImage->horz_y_period); + swapl(&pImage->horz_u_period); + swapl(&pImage->horz_v_period); + swapl(&pImage->vert_y_period); + swapl(&pImage->vert_u_period); + swapl(&pImage->vert_v_period); (void)WriteToClient(client, sz_xvImageFormatInfo, (char *)pImage); @@ -1794,10 +1760,8 @@ SWriteGrabPortReply( ClientPtr client, xvGrabPortReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); (void)WriteToClient(client, sz_xvGrabPortReply, (char *)&rep); @@ -1809,11 +1773,9 @@ SWriteGetPortAttributeReply( ClientPtr client, xvGetPortAttributeReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->value, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->value); (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)&rep); @@ -1825,12 +1787,10 @@ SWriteQueryBestSizeReply( ClientPtr client, xvQueryBestSizeReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->actual_width, n); - swaps(&rep->actual_height, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->actual_width); + swaps(&rep->actual_height); (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)&rep); @@ -1842,12 +1802,10 @@ SWriteQueryPortAttributesReply( ClientPtr client, xvQueryPortAttributesReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_attributes, n); - swapl(&rep->text_size, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_attributes); + swapl(&rep->text_size); (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)&rep); @@ -1859,14 +1817,12 @@ SWriteQueryImageAttributesReply( ClientPtr client, xvQueryImageAttributesReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_planes, n); - swapl(&rep->data_size, n); - swaps(&rep->width, n); - swaps(&rep->height, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_planes); + swapl(&rep->data_size); + swaps(&rep->width); + swaps(&rep->height); (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)&rep); @@ -1879,11 +1835,9 @@ SWriteListImageFormatsReply( ClientPtr client, xvListImageFormatsReply *rep ){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_formats, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_formats); (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)&rep); |