aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-29 01:36:31 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-04 16:36:59 +0200
commit286d83260216e8e53db701eed5c785aae1c716bf (patch)
tree3b27e6dd17a7d4d00266819545ae97defa11cf81 /nx-X11/programs/Xserver/dix
parentd1d859dfdec4b4665e06401383ab71926e4e731c (diff)
downloadnx-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/dix')
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c2
-rw-r--r--nx-X11/programs/Xserver/dix/swaprep.c401
-rw-r--r--nx-X11/programs/Xserver/dix/swapreq.c728
3 files changed, 485 insertions, 646 deletions
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index aac3284a7..f799ce289 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -3808,7 +3808,7 @@ ProcInitialConnection(register ClientPtr client)
((prefix->nbytesAuthString + (unsigned)3) >> 2);
if (client->swapped)
{
- swaps(&stuff->length, whichbyte);
+ swaps(&stuff->length);
}
ResetCurrentRequest(client);
return (client->noClientException);
diff --git a/nx-X11/programs/Xserver/dix/swaprep.c b/nx-X11/programs/Xserver/dix/swaprep.c
index 31c823b3a..e5c722f31 100644
--- a/nx-X11/programs/Xserver/dix/swaprep.c
+++ b/nx-X11/programs/Xserver/dix/swaprep.c
@@ -78,14 +78,13 @@ void
Swap32Write(ClientPtr pClient, int size, register CARD32 *pbuf)
{
register int i;
- register char n;
size >>= 2;
for(i = 0; i < size; i++)
/* brackets are mandatory here, because "swapl" macro expands
to several statements */
{
- swapl(&pbuf[i], n);
+ swapl(&pbuf[i]);
}
(void)WriteToClient(pClient, size << 2, (char *) pbuf);
}
@@ -191,9 +190,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
void
SGenericReply(ClientPtr pClient, int size, xGenericReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
+ swaps(&pRep->sequenceNumber);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -202,67 +199,57 @@ void
SGetWindowAttributesReply(ClientPtr pClient, int size,
xGetWindowAttributesReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swapl(&pRep->visualID, n);
- swaps(&pRep->class, n);
- swapl(&pRep->backingBitPlanes, n);
- swapl(&pRep->backingPixel, n);
- swapl(&pRep->colormap, n);
- swapl(&pRep->allEventMasks, n);
- swapl(&pRep->yourEventMask, n);
- swaps(&pRep->doNotPropagateMask, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swapl(&pRep->visualID);
+ swaps(&pRep->class);
+ swapl(&pRep->backingBitPlanes);
+ swapl(&pRep->backingPixel);
+ swapl(&pRep->colormap);
+ swapl(&pRep->allEventMasks);
+ swapl(&pRep->yourEventMask);
+ swaps(&pRep->doNotPropagateMask);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->root, n);
- swaps(&pRep->x, n);
- swaps(&pRep->y, n);
- swaps(&pRep->width, n);
- swaps(&pRep->height, n);
- swaps(&pRep->borderWidth, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->root);
+ swaps(&pRep->x);
+ swaps(&pRep->y);
+ swaps(&pRep->width);
+ swaps(&pRep->height);
+ swaps(&pRep->borderWidth);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swapl(&pRep->root, n);
- swapl(&pRep->parent, n);
- swaps(&pRep->nChildren, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swapl(&pRep->root);
+ swapl(&pRep->parent);
+ swaps(&pRep->nChildren);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->atom, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->atom);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swaps(&pRep->nameLength, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swaps(&pRep->nameLength);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -270,24 +257,20 @@ SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
void
SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swapl(&pRep->propertyType, n);
- swapl(&pRep->bytesAfter, n);
- swapl(&pRep->nItems, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swapl(&pRep->propertyType);
+ swapl(&pRep->bytesAfter);
+ swapl(&pRep->nItems);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swaps(&pRep->nProperties, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swaps(&pRep->nProperties);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -295,10 +278,8 @@ void
SGetSelectionOwnerReply(ClientPtr pClient, int size,
xGetSelectionOwnerReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->owner, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->owner);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -306,27 +287,23 @@ SGetSelectionOwnerReply(ClientPtr pClient, int size,
void
SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->root, n);
- swapl(&pRep->child, n);
- swaps(&pRep->rootX, n);
- swaps(&pRep->rootY, n);
- swaps(&pRep->winX, n);
- swaps(&pRep->winY, n);
- swaps(&pRep->mask, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->root);
+ swapl(&pRep->child);
+ swaps(&pRep->rootX);
+ swaps(&pRep->rootY);
+ swaps(&pRep->winX);
+ swaps(&pRep->winY);
+ swaps(&pRep->mask);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SwapTimecoord(xTimecoord* pCoord)
{
- register char n;
-
- swapl(&pCoord->time, n);
- swaps(&pCoord->x, n);
- swaps(&pCoord->y, n);
+ swapl(&pCoord->time);
+ swaps(&pCoord->x);
+ swaps(&pCoord->y);
}
void
@@ -348,33 +325,27 @@ SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord *pRep)
void
SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swapl(&pRep->nEvents, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swapl(&pRep->nEvents);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->child, n);
- swaps(&pRep->dstX, n);
- swaps(&pRep->dstY, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->child);
+ swaps(&pRep->dstX);
+ swaps(&pRep->dstY);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->focus, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->focus);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -382,10 +353,8 @@ SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
void
SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -393,30 +362,26 @@ static
void
SwapCharInfo(xCharInfo *pInfo)
{
- register char n;
-
- swaps(&pInfo->leftSideBearing, n);
- swaps(&pInfo->rightSideBearing, n);
- swaps(&pInfo->characterWidth, n);
- swaps(&pInfo->ascent, n);
- swaps(&pInfo->descent, n);
- swaps(&pInfo->attributes, n);
+ swaps(&pInfo->leftSideBearing);
+ swaps(&pInfo->rightSideBearing);
+ swaps(&pInfo->characterWidth);
+ swaps(&pInfo->ascent);
+ swaps(&pInfo->descent);
+ swaps(&pInfo->attributes);
}
static void
SwapFontInfo(xQueryFontReply *pr)
{
- register char n;
-
- swaps(&pr->minCharOrByte2, n);
- swaps(&pr->maxCharOrByte2, n);
- swaps(&pr->defaultChar, n);
- swaps(&pr->nFontProps, n);
- swaps(&pr->fontAscent, n);
- swaps(&pr->fontDescent, n);
+ swaps(&pr->minCharOrByte2);
+ swaps(&pr->maxCharOrByte2);
+ swaps(&pr->defaultChar);
+ swaps(&pr->nFontProps);
+ swaps(&pr->fontAscent);
+ swaps(&pr->fontDescent);
SwapCharInfo( &pr->minBounds);
SwapCharInfo( &pr->maxBounds);
- swapl(&pr->nCharInfos, n);
+ swapl(&pr->nCharInfos);
}
static
@@ -427,10 +392,9 @@ SwapFont(xQueryFontReply *pr, Bool hasGlyphs)
xCharInfo * pxci;
unsigned nchars, nprops;
char *pby;
- register char n;
- swaps(&pr->sequenceNumber, n);
- swapl(&pr->length, n);
+ swaps(&pr->sequenceNumber);
+ swapl(&pr->length);
nchars = pr->nCharInfos;
nprops = pr->nFontProps;
SwapFontInfo(pr);
@@ -439,9 +403,9 @@ SwapFont(xQueryFontReply *pr, Bool hasGlyphs)
* they are always 2 4 byte values */
for(i = 0; i < nprops; i++)
{
- swapl(pby, n);
+ swapl((int *)pby);
pby += 4;
- swapl(pby, n);
+ swapl((int *)pby);
pby += 4;
}
if (hasGlyphs)
@@ -462,27 +426,23 @@ SQueryFontReply(ClientPtr pClient, int size, xQueryFontReply *pRep)
void
SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swaps(&pRep->fontAscent, n);
- swaps(&pRep->fontDescent, n);
- swaps(&pRep->overallAscent, n);
- swaps(&pRep->overallDescent, n);
- swapl(&pRep->overallWidth, n);
- swapl(&pRep->overallLeft, n);
- swapl(&pRep->overallRight, n);
+ swaps(&pRep->sequenceNumber);
+ swaps(&pRep->fontAscent);
+ swaps(&pRep->fontDescent);
+ swaps(&pRep->overallAscent);
+ swaps(&pRep->overallDescent);
+ swapl(&pRep->overallWidth);
+ swapl(&pRep->overallLeft);
+ swapl(&pRep->overallRight);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SListFontsReply(ClientPtr pClient, int size, xListFontsReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swaps(&pRep->nFonts, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swaps(&pRep->nFonts);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -497,22 +457,18 @@ SListFontsWithInfoReply(ClientPtr pClient, int size,
void
SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swaps(&pRep->nPaths, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swaps(&pRep->nPaths);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SGetImageReply(ClientPtr pClient, int size, xGetImageReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swapl(&pRep->visual, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swapl(&pRep->visual);
(void)WriteToClient(pClient, size, (char *) pRep);
/* Fortunately, image doesn't need swapping */
}
@@ -521,11 +477,9 @@ void
SListInstalledColormapsReply(ClientPtr pClient, int size,
xListInstalledColormapsReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swaps(&pRep->nColormaps, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swaps(&pRep->nColormaps);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -535,41 +489,35 @@ SAllocColorReply(pClient, size, pRep)
int size;
xAllocColorReply *pRep;
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swaps(&pRep->red, n);
- swaps(&pRep->green, n);
- swaps(&pRep->blue, n);
- swapl(&pRep->pixel, n);
+ swaps(&pRep->sequenceNumber);
+ swaps(&pRep->red);
+ swaps(&pRep->green);
+ swaps(&pRep->blue);
+ swapl(&pRep->pixel);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->pixel, n);
- swaps(&pRep->exactRed, n);
- swaps(&pRep->exactGreen, n);
- swaps(&pRep->exactBlue, n);
- swaps(&pRep->screenRed, n);
- swaps(&pRep->screenGreen, n);
- swaps(&pRep->screenBlue, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->pixel);
+ swaps(&pRep->exactRed);
+ swaps(&pRep->exactGreen);
+ swaps(&pRep->exactBlue);
+ swaps(&pRep->screenRed);
+ swaps(&pRep->screenGreen);
+ swaps(&pRep->screenBlue);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swaps(&pRep->nPixels, n);
- swaps(&pRep->nMasks, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swaps(&pRep->nPixels);
+ swaps(&pRep->nMasks);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -577,25 +525,21 @@ SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
void
SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swaps(&pRep->nPixels, n);
- swapl(&pRep->redMask, n);
- swapl(&pRep->greenMask, n);
- swapl(&pRep->blueMask, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swaps(&pRep->nPixels);
+ swapl(&pRep->redMask);
+ swapl(&pRep->greenMask);
+ swapl(&pRep->blueMask);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SwapRGB(xrgb *prgb)
{
- register char n;
-
- swaps(&prgb->red, n);
- swaps(&prgb->green, n);
- swaps(&prgb->blue, n);
+ swaps(&prgb->red);
+ swaps(&prgb->green);
+ swaps(&prgb->blue);
}
void
@@ -617,47 +561,39 @@ SQColorsExtend(ClientPtr pClient, int size, xrgb *prgb)
void
SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swaps(&pRep->nColors, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swaps(&pRep->nColors);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swaps(&pRep->exactRed, n);
- swaps(&pRep->exactGreen, n);
- swaps(&pRep->exactBlue, n);
- swaps(&pRep->screenRed, n);
- swaps(&pRep->screenGreen, n);
- swaps(&pRep->screenBlue, n);
+ swaps(&pRep->sequenceNumber);
+ swaps(&pRep->exactRed);
+ swaps(&pRep->exactGreen);
+ swaps(&pRep->exactBlue);
+ swaps(&pRep->screenRed);
+ swaps(&pRep->screenGreen);
+ swaps(&pRep->screenBlue);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swaps(&pRep->width, n);
- swaps(&pRep->height, n);
+ swaps(&pRep->sequenceNumber);
+ swaps(&pRep->width);
+ swaps(&pRep->height);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -665,10 +601,8 @@ void
SGetKeyboardMappingReply(ClientPtr pClient, int size,
xGetKeyboardMappingReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -676,10 +610,8 @@ void
SGetPointerMappingReply(ClientPtr pClient, int size,
xGetPointerMappingReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -687,46 +619,38 @@ void
SGetModifierMappingReply(ClientPtr pClient, int size,
xGetModifierMappingReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swapl(&pRep->ledMask, n);
- swaps(&pRep->bellPitch, n);
- swaps(&pRep->bellDuration, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swapl(&pRep->ledMask);
+ swaps(&pRep->bellPitch);
+ swaps(&pRep->bellDuration);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swaps(&pRep->accelNumerator, n);
- swaps(&pRep->accelDenominator, n);
- swaps(&pRep->threshold, n);
+ swaps(&pRep->sequenceNumber);
+ swaps(&pRep->accelNumerator);
+ swaps(&pRep->accelDenominator);
+ swaps(&pRep->threshold);
(void)WriteToClient(pClient, size, (char *) pRep);
}
void
SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swaps(&pRep->timeout, n);
- swaps(&pRep->interval, n);
+ swaps(&pRep->sequenceNumber);
+ swaps(&pRep->timeout);
+ swaps(&pRep->interval);
(void)WriteToClient(pClient, size, (char *) pRep);
}
@@ -738,8 +662,7 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf)
while (bufT < endbuf) {
xHostEntry *host = (xHostEntry *) bufT;
int len = host->length;
- register char n;
- swaps (&host->length, n);
+ swaps (&host->length);
bufT += sizeof (xHostEntry) + (((len + 3) >> 2) << 2);
}
(void)WriteToClient (pClient, size, buf);
@@ -748,11 +671,9 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf)
void
SListHostsReply(ClientPtr pClient, int size, xListHostsReply *pRep)
{
- register char n;
-
- swaps(&pRep->sequenceNumber, n);
- swapl(&pRep->length, n);
- swaps(&pRep->nHosts, n);
+ swaps(&pRep->sequenceNumber);
+ swapl(&pRep->length);
+ swaps(&pRep->nHosts);
(void)WriteToClient(pClient, size, (char *) pRep);
}
diff --git a/nx-X11/programs/Xserver/dix/swapreq.c b/nx-X11/programs/Xserver/dix/swapreq.c
index 35a7e7527..e5ac71710 100644
--- a/nx-X11/programs/Xserver/dix/swapreq.c
+++ b/nx-X11/programs/Xserver/dix/swapreq.c
@@ -68,23 +68,21 @@ SOFTWARE.
void
SwapLongs (register CARD32 *list, register unsigned long count)
{
- register char n;
-
while (count >= 8) {
- swapl(list+0, n);
- swapl(list+1, n);
- swapl(list+2, n);
- swapl(list+3, n);
- swapl(list+4, n);
- swapl(list+5, n);
- swapl(list+6, n);
- swapl(list+7, n);
+ swapl(list+0);
+ swapl(list+1);
+ swapl(list+2);
+ swapl(list+3);
+ swapl(list+4);
+ swapl(list+5);
+ swapl(list+6);
+ swapl(list+7);
list += 8;
count -= 8;
}
if (count != 0) {
do {
- swapl(list, n);
+ swapl(list);
list++;
} while (--count != 0);
}
@@ -95,31 +93,29 @@ SwapLongs (register CARD32 *list, register unsigned long count)
void
SwapShorts (register short *list, register unsigned long count)
{
- register char n;
-
while (count >= 16) {
- swaps(list+0, n);
- swaps(list+1, n);
- swaps(list+2, n);
- swaps(list+3, n);
- swaps(list+4, n);
- swaps(list+5, n);
- swaps(list+6, n);
- swaps(list+7, n);
- swaps(list+8, n);
- swaps(list+9, n);
- swaps(list+10, n);
- swaps(list+11, n);
- swaps(list+12, n);
- swaps(list+13, n);
- swaps(list+14, n);
- swaps(list+15, n);
+ swaps(list+0);
+ swaps(list+1);
+ swaps(list+2);
+ swaps(list+3);
+ swaps(list+4);
+ swaps(list+5);
+ swaps(list+6);
+ swaps(list+7);
+ swaps(list+8);
+ swaps(list+9);
+ swaps(list+10);
+ swaps(list+11);
+ swaps(list+12);
+ swaps(list+13);
+ swaps(list+14);
+ swaps(list+15);
list += 16;
count -= 16;
}
if (count != 0) {
do {
- swaps(list, n);
+ swaps(list);
list++;
} while (--count != 0);
}
@@ -130,10 +126,8 @@ SwapShorts (register short *list, register unsigned long count)
int
SProcSimpleReq(register ClientPtr client)
{
- register char n;
-
REQUEST(xReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return(*ProcVector[stuff->reqType])(client);
}
@@ -143,33 +137,29 @@ SProcSimpleReq(register ClientPtr client)
int
SProcResourceReq(register ClientPtr client)
{
- register char n;
-
REQUEST(xResourceReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xResourceReq); /* not EXACT */
- swapl(&stuff->id, n);
+ swapl(&stuff->id);
return(*ProcVector[stuff->reqType])(client);
}
int
SProcCreateWindow(register ClientPtr client)
{
- register char n;
-
REQUEST(xCreateWindowReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xCreateWindowReq);
- swapl(&stuff->wid, n);
- swapl(&stuff->parent, n);
- swaps(&stuff->x, n);
- swaps(&stuff->y, n);
- swaps(&stuff->width, n);
- swaps(&stuff->height, n);
- swaps(&stuff->borderWidth, n);
- swaps(&stuff->class, n);
- swapl(&stuff->visual, n);
- swapl(&stuff->mask, n);
+ swapl(&stuff->wid);
+ swapl(&stuff->parent);
+ swaps(&stuff->x);
+ swaps(&stuff->y);
+ swaps(&stuff->width);
+ swaps(&stuff->height);
+ swaps(&stuff->borderWidth);
+ swaps(&stuff->class);
+ swapl(&stuff->visual);
+ swapl(&stuff->mask);
SwapRestL(stuff);
return((* ProcVector[X_CreateWindow])(client));
}
@@ -177,13 +167,11 @@ SProcCreateWindow(register ClientPtr client)
int
SProcChangeWindowAttributes(register ClientPtr client)
{
- register char n;
-
REQUEST(xChangeWindowAttributesReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
- swapl(&stuff->window, n);
- swapl(&stuff->valueMask, n);
+ swapl(&stuff->window);
+ swapl(&stuff->valueMask);
SwapRestL(stuff);
return((* ProcVector[X_ChangeWindowAttributes])(client));
}
@@ -191,26 +179,24 @@ SProcChangeWindowAttributes(register ClientPtr client)
int
SProcReparentWindow(register ClientPtr client)
{
- register char n;
REQUEST(xReparentWindowReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xReparentWindowReq);
- swapl(&stuff->window, n);
- swapl(&stuff->parent, n);
- swaps(&stuff->x, n);
- swaps(&stuff->y, n);
+ swapl(&stuff->window);
+ swapl(&stuff->parent);
+ swaps(&stuff->x);
+ swaps(&stuff->y);
return((* ProcVector[X_ReparentWindow])(client));
}
int
SProcConfigureWindow(register ClientPtr client)
{
- register char n;
REQUEST(xConfigureWindowReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
- swapl(&stuff->window, n);
- swaps(&stuff->mask, n);
+ swapl(&stuff->window);
+ swaps(&stuff->mask);
SwapRestL(stuff);
return((* ProcVector[X_ConfigureWindow])(client));
@@ -220,25 +206,23 @@ SProcConfigureWindow(register ClientPtr client)
int
SProcInternAtom(register ClientPtr client)
{
- register char n;
REQUEST(xInternAtomReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xInternAtomReq);
- swaps(&stuff->nbytes, n);
+ swaps(&stuff->nbytes);
return((* ProcVector[X_InternAtom])(client));
}
int
SProcChangeProperty(register ClientPtr client)
{
- register char n;
REQUEST(xChangePropertyReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangePropertyReq);
- swapl(&stuff->window, n);
- swapl(&stuff->property, n);
- swapl(&stuff->type, n);
- swapl(&stuff->nUnits, n);
+ swapl(&stuff->window);
+ swapl(&stuff->property);
+ swapl(&stuff->type);
+ swapl(&stuff->nUnits);
switch ( stuff->format ) {
case 8 :
break;
@@ -255,12 +239,11 @@ SProcChangeProperty(register ClientPtr client)
int
SProcDeleteProperty(register ClientPtr client)
{
- register char n;
REQUEST(xDeletePropertyReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDeletePropertyReq);
- swapl(&stuff->window, n);
- swapl(&stuff->property, n);
+ swapl(&stuff->window);
+ swapl(&stuff->property);
return((* ProcVector[X_DeleteProperty])(client));
}
@@ -268,57 +251,53 @@ SProcDeleteProperty(register ClientPtr client)
int
SProcGetProperty(register ClientPtr client)
{
- register char n;
REQUEST(xGetPropertyReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGetPropertyReq);
- swapl(&stuff->window, n);
- swapl(&stuff->property, n);
- swapl(&stuff->type, n);
- swapl(&stuff->longOffset, n);
- swapl(&stuff->longLength, n);
+ swapl(&stuff->window);
+ swapl(&stuff->property);
+ swapl(&stuff->type);
+ swapl(&stuff->longOffset);
+ swapl(&stuff->longLength);
return((* ProcVector[X_GetProperty])(client));
}
int
SProcSetSelectionOwner(register ClientPtr client)
{
- register char n;
REQUEST(xSetSelectionOwnerReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xSetSelectionOwnerReq);
- swapl(&stuff->window, n);
- swapl(&stuff->selection, n);
- swapl(&stuff->time, n);
+ swapl(&stuff->window);
+ swapl(&stuff->selection);
+ swapl(&stuff->time);
return((* ProcVector[X_SetSelectionOwner])(client));
}
int
SProcConvertSelection(register ClientPtr client)
{
- register char n;
REQUEST(xConvertSelectionReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xConvertSelectionReq);
- swapl(&stuff->requestor, n);
- swapl(&stuff->selection, n);
- swapl(&stuff->target, n);
- swapl(&stuff->property, n);
- swapl(&stuff->time, n);
+ swapl(&stuff->requestor);
+ swapl(&stuff->selection);
+ swapl(&stuff->target);
+ swapl(&stuff->property);
+ swapl(&stuff->time);
return((* ProcVector[X_ConvertSelection])(client));
}
int
SProcSendEvent(register ClientPtr client)
{
- register char n;
xEvent eventT;
EventSwapPtr proc;
REQUEST(xSendEventReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xSendEventReq);
- swapl(&stuff->destination, n);
- swapl(&stuff->eventMask, n);
+ swapl(&stuff->destination);
+ swapl(&stuff->eventMask);
/* Swap event */
proc = EventSwapVector[stuff->event.u.u.type & 0177];
@@ -333,223 +312,206 @@ SProcSendEvent(register ClientPtr client)
int
SProcGrabPointer(register ClientPtr client)
{
- register char n;
REQUEST(xGrabPointerReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGrabPointerReq);
- swapl(&stuff->grabWindow, n);
- swaps(&stuff->eventMask, n);
- swapl(&stuff->confineTo, n);
- swapl(&stuff->cursor, n);
- swapl(&stuff->time, n);
+ swapl(&stuff->grabWindow);
+ swaps(&stuff->eventMask);
+ swapl(&stuff->confineTo);
+ swapl(&stuff->cursor);
+ swapl(&stuff->time);
return((* ProcVector[X_GrabPointer])(client));
}
int
SProcGrabButton(register ClientPtr client)
{
- register char n;
REQUEST(xGrabButtonReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGrabButtonReq);
- swapl(&stuff->grabWindow, n);
- swaps(&stuff->eventMask, n);
- swapl(&stuff->confineTo, n);
- swapl(&stuff->cursor, n);
- swaps(&stuff->modifiers, n);
+ swapl(&stuff->grabWindow);
+ swaps(&stuff->eventMask);
+ swapl(&stuff->confineTo);
+ swapl(&stuff->cursor);
+ swaps(&stuff->modifiers);
return((* ProcVector[X_GrabButton])(client));
}
int
SProcUngrabButton(register ClientPtr client)
{
- register char n;
REQUEST(xUngrabButtonReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xUngrabButtonReq);
- swapl(&stuff->grabWindow, n);
- swaps(&stuff->modifiers, n);
+ swapl(&stuff->grabWindow);
+ swaps(&stuff->modifiers);
return((* ProcVector[X_UngrabButton])(client));
}
int
SProcChangeActivePointerGrab(register ClientPtr client)
{
- register char n;
REQUEST(xChangeActivePointerGrabReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq);
- swapl(&stuff->cursor, n);
- swapl(&stuff->time, n);
- swaps(&stuff->eventMask, n);
+ swapl(&stuff->cursor);
+ swapl(&stuff->time);
+ swaps(&stuff->eventMask);
return((* ProcVector[X_ChangeActivePointerGrab])(client));
}
int
SProcGrabKeyboard(register ClientPtr client)
{
- register char n;
REQUEST(xGrabKeyboardReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGrabKeyboardReq);
- swapl(&stuff->grabWindow, n);
- swapl(&stuff->time, n);
+ swapl(&stuff->grabWindow);
+ swapl(&stuff->time);
return((* ProcVector[X_GrabKeyboard])(client));
}
int
SProcGrabKey(register ClientPtr client)
{
- register char n;
REQUEST(xGrabKeyReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGrabKeyReq);
- swapl(&stuff->grabWindow, n);
- swaps(&stuff->modifiers, n);
+ swapl(&stuff->grabWindow);
+ swaps(&stuff->modifiers);
return((* ProcVector[X_GrabKey])(client));
}
int
SProcUngrabKey(register ClientPtr client)
{
- register char n;
REQUEST(xUngrabKeyReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xUngrabKeyReq);
- swapl(&stuff->grabWindow, n);
- swaps(&stuff->modifiers, n);
+ swapl(&stuff->grabWindow);
+ swaps(&stuff->modifiers);
return((* ProcVector[X_UngrabKey])(client));
}
int
SProcGetMotionEvents(register ClientPtr client)
{
- register char n;
REQUEST(xGetMotionEventsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGetMotionEventsReq);
- swapl(&stuff->window, n);
- swapl(&stuff->start, n);
- swapl(&stuff->stop, n);
+ swapl(&stuff->window);
+ swapl(&stuff->start);
+ swapl(&stuff->stop);
return((* ProcVector[X_GetMotionEvents])(client));
}
int
SProcTranslateCoords(register ClientPtr client)
{
- register char n;
REQUEST(xTranslateCoordsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xTranslateCoordsReq);
- swapl(&stuff->srcWid, n);
- swapl(&stuff->dstWid, n);
- swaps(&stuff->srcX, n);
- swaps(&stuff->srcY, n);
+ swapl(&stuff->srcWid);
+ swapl(&stuff->dstWid);
+ swaps(&stuff->srcX);
+ swaps(&stuff->srcY);
return((* ProcVector[X_TranslateCoords])(client));
}
int
SProcWarpPointer(register ClientPtr client)
{
- register char n;
REQUEST(xWarpPointerReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xWarpPointerReq);
- swapl(&stuff->srcWid, n);
- swapl(&stuff->dstWid, 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->srcWid);
+ swapl(&stuff->dstWid);
+ swaps(&stuff->srcX);
+ swaps(&stuff->srcY);
+ swaps(&stuff->srcWidth);
+ swaps(&stuff->srcHeight);
+ swaps(&stuff->dstX);
+ swaps(&stuff->dstY);
return((* ProcVector[X_WarpPointer])(client));
}
int
SProcSetInputFocus(register ClientPtr client)
{
- register char n;
REQUEST(xSetInputFocusReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xSetInputFocusReq);
- swapl(&stuff->focus, n);
- swapl(&stuff->time, n);
+ swapl(&stuff->focus);
+ swapl(&stuff->time);
return((* ProcVector[X_SetInputFocus])(client));
}
int
SProcOpenFont(register ClientPtr client)
{
- register char n;
REQUEST(xOpenFontReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xOpenFontReq);
- swapl(&stuff->fid, n);
- swaps(&stuff->nbytes, n);
+ swapl(&stuff->fid);
+ swaps(&stuff->nbytes);
return((* ProcVector[X_OpenFont])(client));
}
int
SProcListFonts(register ClientPtr client)
{
- register char n;
REQUEST(xListFontsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xListFontsReq);
- swaps(&stuff->maxNames, n);
- swaps(&stuff->nbytes, n);
+ swaps(&stuff->maxNames);
+ swaps(&stuff->nbytes);
return((* ProcVector[X_ListFonts])(client));
}
int
SProcListFontsWithInfo(register ClientPtr client)
{
- register char n;
REQUEST(xListFontsWithInfoReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xListFontsWithInfoReq);
- swaps(&stuff->maxNames, n);
- swaps(&stuff->nbytes, n);
+ swaps(&stuff->maxNames);
+ swaps(&stuff->nbytes);
return((* ProcVector[X_ListFontsWithInfo])(client));
}
int
SProcSetFontPath(register ClientPtr client)
{
- register char n;
REQUEST(xSetFontPathReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSetFontPathReq);
- swaps(&stuff->nFonts, n);
+ swaps(&stuff->nFonts);
return((* ProcVector[X_SetFontPath])(client));
}
int
SProcCreatePixmap(register ClientPtr client)
{
- register char n;
REQUEST(xCreatePixmapReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCreatePixmapReq);
- swapl(&stuff->pid, n);
- swapl(&stuff->drawable, n);
- swaps(&stuff->width, n);
- swaps(&stuff->height, n);
+ swapl(&stuff->pid);
+ swapl(&stuff->drawable);
+ swaps(&stuff->width);
+ swaps(&stuff->height);
return((* ProcVector[X_CreatePixmap])(client));
}
int
SProcCreateGC(register ClientPtr client)
{
- register char n;
REQUEST(xCreateGCReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xCreateGCReq);
- swapl(&stuff->gc, n);
- swapl(&stuff->drawable, n);
- swapl(&stuff->mask, n);
+ swapl(&stuff->gc);
+ swapl(&stuff->drawable);
+ swapl(&stuff->mask);
SwapRestL(stuff);
return((* ProcVector[X_CreateGC])(client));
}
@@ -557,12 +519,11 @@ SProcCreateGC(register ClientPtr client)
int
SProcChangeGC(register ClientPtr client)
{
- register char n;
REQUEST(xChangeGCReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeGCReq);
- swapl(&stuff->gc, n);
- swapl(&stuff->mask, n);
+ swapl(&stuff->gc);
+ swapl(&stuff->mask);
SwapRestL(stuff);
return((* ProcVector[X_ChangeGC])(client));
}
@@ -570,26 +531,24 @@ SProcChangeGC(register ClientPtr client)
int
SProcCopyGC(register ClientPtr client)
{
- register char n;
REQUEST(xCopyGCReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCopyGCReq);
- swapl(&stuff->srcGC, n);
- swapl(&stuff->dstGC, n);
- swapl(&stuff->mask, n);
+ swapl(&stuff->srcGC);
+ swapl(&stuff->dstGC);
+ swapl(&stuff->mask);
return((* ProcVector[X_CopyGC])(client));
}
int
SProcSetDashes(register ClientPtr client)
{
- register char n;
REQUEST(xSetDashesReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSetDashesReq);
- swapl(&stuff->gc, n);
- swaps(&stuff->dashOffset, n);
- swaps(&stuff->nDashes, n);
+ swapl(&stuff->gc);
+ swaps(&stuff->dashOffset);
+ swaps(&stuff->nDashes);
return((* ProcVector[X_SetDashes])(client));
}
@@ -597,13 +556,12 @@ SProcSetDashes(register ClientPtr client)
int
SProcSetClipRectangles(register ClientPtr client)
{
- register char n;
REQUEST(xSetClipRectanglesReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
- swapl(&stuff->gc, n);
- swaps(&stuff->xOrigin, n);
- swaps(&stuff->yOrigin, n);
+ swapl(&stuff->gc);
+ swaps(&stuff->xOrigin);
+ swaps(&stuff->yOrigin);
SwapRestS(stuff);
return((* ProcVector[X_SetClipRectangles])(client));
}
@@ -611,54 +569,51 @@ SProcSetClipRectangles(register ClientPtr client)
int
SProcClearToBackground(register ClientPtr client)
{
- register char n;
REQUEST(xClearAreaReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xClearAreaReq);
- swapl(&stuff->window, n);
- swaps(&stuff->x, n);
- swaps(&stuff->y, n);
- swaps(&stuff->width, n);
- swaps(&stuff->height, n);
+ swapl(&stuff->window);
+ swaps(&stuff->x);
+ swaps(&stuff->y);
+ swaps(&stuff->width);
+ swaps(&stuff->height);
return((* ProcVector[X_ClearArea])(client));
}
int
SProcCopyArea(register ClientPtr client)
{
- register char n;
REQUEST(xCopyAreaReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCopyAreaReq);
- swapl(&stuff->srcDrawable, n);
- swapl(&stuff->dstDrawable, n);
- swapl(&stuff->gc, n);
- swaps(&stuff->srcX, n);
- swaps(&stuff->srcY, n);
- swaps(&stuff->dstX, n);
- swaps(&stuff->dstY, n);
- swaps(&stuff->width, n);
- swaps(&stuff->height, n);
+ swapl(&stuff->srcDrawable);
+ swapl(&stuff->dstDrawable);
+ swapl(&stuff->gc);
+ swaps(&stuff->srcX);
+ swaps(&stuff->srcY);
+ swaps(&stuff->dstX);
+ swaps(&stuff->dstY);
+ swaps(&stuff->width);
+ swaps(&stuff->height);
return((* ProcVector[X_CopyArea])(client));
}
int
SProcCopyPlane(register ClientPtr client)
{
- register char n;
REQUEST(xCopyPlaneReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCopyPlaneReq);
- swapl(&stuff->srcDrawable, n);
- swapl(&stuff->dstDrawable, n);
- swapl(&stuff->gc, n);
- swaps(&stuff->srcX, n);
- swaps(&stuff->srcY, n);
- swaps(&stuff->dstX, n);
- swaps(&stuff->dstY, n);
- swaps(&stuff->width, n);
- swaps(&stuff->height, n);
- swapl(&stuff->bitPlane, n);
+ swapl(&stuff->srcDrawable);
+ swapl(&stuff->dstDrawable);
+ swapl(&stuff->gc);
+ swaps(&stuff->srcX);
+ swaps(&stuff->srcY);
+ swaps(&stuff->dstX);
+ swaps(&stuff->dstY);
+ swaps(&stuff->width);
+ swaps(&stuff->height);
+ swapl(&stuff->bitPlane);
return((* ProcVector[X_CopyPlane])(client));
}
@@ -667,13 +622,11 @@ SProcCopyPlane(register ClientPtr client)
int
SProcPoly(register ClientPtr client)
{
- register char n;
-
REQUEST(xPolyPointReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xPolyPointReq);
- swapl(&stuff->drawable, n);
- swapl(&stuff->gc, n);
+ swapl(&stuff->drawable);
+ swapl(&stuff->gc);
SwapRestS(stuff);
return((* ProcVector[stuff->reqType])(client));
}
@@ -684,13 +637,11 @@ SProcPoly(register ClientPtr client)
int
SProcFillPoly(register ClientPtr client)
{
- register char n;
-
REQUEST(xFillPolyReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xFillPolyReq);
- swapl(&stuff->drawable, n);
- swapl(&stuff->gc, n);
+ swapl(&stuff->drawable);
+ swapl(&stuff->gc);
SwapRestS(stuff);
return((* ProcVector[X_FillPoly])(client));
}
@@ -698,16 +649,15 @@ SProcFillPoly(register ClientPtr client)
int
SProcPutImage(register ClientPtr client)
{
- register char n;
REQUEST(xPutImageReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xPutImageReq);
- swapl(&stuff->drawable, n);
- swapl(&stuff->gc, n);
- swaps(&stuff->width, n);
- swaps(&stuff->height, n);
- swaps(&stuff->dstX, n);
- swaps(&stuff->dstY, n);
+ swapl(&stuff->drawable);
+ swapl(&stuff->gc);
+ swaps(&stuff->width);
+ swaps(&stuff->height);
+ swaps(&stuff->dstX);
+ swaps(&stuff->dstY);
/* Image should already be swapped */
return((* ProcVector[X_PutImage])(client));
@@ -716,16 +666,15 @@ SProcPutImage(register ClientPtr client)
int
SProcGetImage(register ClientPtr client)
{
- register char n;
REQUEST(xGetImageReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGetImageReq);
- 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->drawable);
+ swaps(&stuff->x);
+ swaps(&stuff->y);
+ swaps(&stuff->width);
+ swaps(&stuff->height);
+ swapl(&stuff->planeMask);
return((* ProcVector[X_GetImage])(client));
}
@@ -734,14 +683,13 @@ SProcGetImage(register ClientPtr client)
int
SProcPolyText(register ClientPtr client)
{
- register char n;
REQUEST(xPolyTextReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
- swapl(&stuff->drawable, n);
- swapl(&stuff->gc, n);
- swaps(&stuff->x, n);
- swaps(&stuff->y, n);
+ swapl(&stuff->drawable);
+ swapl(&stuff->gc);
+ swaps(&stuff->x);
+ swaps(&stuff->y);
return((* ProcVector[stuff->reqType])(client));
}
@@ -750,27 +698,25 @@ SProcPolyText(register ClientPtr client)
int
SProcImageText(register ClientPtr client)
{
- register char n;
REQUEST(xImageTextReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xImageTextReq);
- swapl(&stuff->drawable, n);
- swapl(&stuff->gc, n);
- swaps(&stuff->x, n);
- swaps(&stuff->y, n);
+ swapl(&stuff->drawable);
+ swapl(&stuff->gc);
+ swaps(&stuff->x);
+ swaps(&stuff->y);
return((* ProcVector[stuff->reqType])(client));
}
int
SProcCreateColormap(register ClientPtr client)
{
- register char n;
REQUEST(xCreateColormapReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCreateColormapReq);
- swapl(&stuff->mid, n);
- swapl(&stuff->window, n);
- swapl(&stuff->visual, n);
+ swapl(&stuff->mid);
+ swapl(&stuff->window);
+ swapl(&stuff->visual);
return((* ProcVector[X_CreateColormap])(client));
}
@@ -778,12 +724,11 @@ SProcCreateColormap(register ClientPtr client)
int
SProcCopyColormapAndFree(register ClientPtr client)
{
- register char n;
REQUEST(xCopyColormapAndFreeReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
- swapl(&stuff->mid, n);
- swapl(&stuff->srcCmap, n);
+ swapl(&stuff->mid);
+ swapl(&stuff->srcCmap);
return((* ProcVector[X_CopyColormapAndFree])(client));
}
@@ -791,67 +736,61 @@ SProcCopyColormapAndFree(register ClientPtr client)
int
SProcAllocColor(register ClientPtr client)
{
- register char n;
REQUEST(xAllocColorReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xAllocColorReq);
- swapl(&stuff->cmap, n);
- swaps(&stuff->red, n);
- swaps(&stuff->green, n);
- swaps(&stuff->blue, n);
+ swapl(&stuff->cmap);
+ swaps(&stuff->red);
+ swaps(&stuff->green);
+ swaps(&stuff->blue);
return((* ProcVector[X_AllocColor])(client));
}
int
SProcAllocNamedColor(register ClientPtr client)
{
- register char n;
-
REQUEST(xAllocNamedColorReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xAllocNamedColorReq);
- swapl(&stuff->cmap, n);
- swaps(&stuff->nbytes, n);
+ swapl(&stuff->cmap);
+ swaps(&stuff->nbytes);
return((* ProcVector[X_AllocNamedColor])(client));
}
int
SProcAllocColorCells(register ClientPtr client)
{
- register char n;
REQUEST(xAllocColorCellsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xAllocColorCellsReq);
- swapl(&stuff->cmap, n);
- swaps(&stuff->colors, n);
- swaps(&stuff->planes, n);
+ swapl(&stuff->cmap);
+ swaps(&stuff->colors);
+ swaps(&stuff->planes);
return((* ProcVector[X_AllocColorCells])(client));
}
int
SProcAllocColorPlanes(register ClientPtr client)
{
- register char n;
REQUEST(xAllocColorPlanesReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xAllocColorPlanesReq);
- swapl(&stuff->cmap, n);
- swaps(&stuff->colors, n);
- swaps(&stuff->red, n);
- swaps(&stuff->green, n);
- swaps(&stuff->blue, n);
+ swapl(&stuff->cmap);
+ swaps(&stuff->colors);
+ swaps(&stuff->red);
+ swaps(&stuff->green);
+ swaps(&stuff->blue);
return((* ProcVector[X_AllocColorPlanes])(client));
}
int
SProcFreeColors(register ClientPtr client)
{
- register char n;
REQUEST(xFreeColorsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
- swapl(&stuff->cmap, n);
- swapl(&stuff->planeMask, n);
+ swapl(&stuff->cmap);
+ swapl(&stuff->planeMask);
SwapRestL(stuff);
return((* ProcVector[X_FreeColors])(client));
@@ -860,25 +799,22 @@ SProcFreeColors(register ClientPtr client)
void
SwapColorItem(xColorItem *pItem)
{
- register char n;
-
- swapl(&pItem->pixel, n);
- swaps(&pItem->red, n);
- swaps(&pItem->green, n);
- swaps(&pItem->blue, n);
+ swapl(&pItem->pixel);
+ swaps(&pItem->red);
+ swaps(&pItem->green);
+ swaps(&pItem->blue);
}
int
SProcStoreColors(register ClientPtr client)
{
- register char n;
long count;
xColorItem *pItem;
REQUEST(xStoreColorsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
- swapl(&stuff->cmap, n);
+ swapl(&stuff->cmap);
pItem = (xColorItem *) &stuff[1];
for(count = LengthRestB(stuff)/sizeof(xColorItem); --count >= 0; )
SwapColorItem(pItem++);
@@ -888,24 +824,22 @@ SProcStoreColors(register ClientPtr client)
int
SProcStoreNamedColor (register ClientPtr client)
{
- register char n;
REQUEST(xStoreNamedColorReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xStoreNamedColorReq);
- swapl(&stuff->cmap, n);
- swapl(&stuff->pixel, n);
- swaps(&stuff->nbytes, n);
+ swapl(&stuff->cmap);
+ swapl(&stuff->pixel);
+ swaps(&stuff->nbytes);
return((* ProcVector[X_StoreNamedColor])(client));
}
int
SProcQueryColors (register ClientPtr client)
{
- register char n;
REQUEST(xQueryColorsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
- swapl(&stuff->cmap, n);
+ swapl(&stuff->cmap);
SwapRestL(stuff);
return((* ProcVector[X_QueryColors])(client));
}
@@ -913,54 +847,51 @@ SProcQueryColors (register ClientPtr client)
int
SProcLookupColor (register ClientPtr client)
{
- register char n;
REQUEST(xLookupColorReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xLookupColorReq);
- swapl(&stuff->cmap, n);
- swaps(&stuff->nbytes, n);
+ swapl(&stuff->cmap);
+ swaps(&stuff->nbytes);
return((* ProcVector[X_LookupColor])(client));
}
int
SProcCreateCursor (register ClientPtr client)
{
- register char n;
REQUEST(xCreateCursorReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCreateCursorReq);
- swapl(&stuff->cid, n);
- swapl(&stuff->source, n);
- swapl(&stuff->mask, n);
- swaps(&stuff->foreRed, n);
- swaps(&stuff->foreGreen, n);
- swaps(&stuff->foreBlue, n);
- swaps(&stuff->backRed, n);
- swaps(&stuff->backGreen, n);
- swaps(&stuff->backBlue, n);
- swaps(&stuff->x, n);
- swaps(&stuff->y, n);
+ swapl(&stuff->cid);
+ swapl(&stuff->source);
+ swapl(&stuff->mask);
+ swaps(&stuff->foreRed);
+ swaps(&stuff->foreGreen);
+ swaps(&stuff->foreBlue);
+ swaps(&stuff->backRed);
+ swaps(&stuff->backGreen);
+ swaps(&stuff->backBlue);
+ swaps(&stuff->x);
+ swaps(&stuff->y);
return((* ProcVector[X_CreateCursor])(client));
}
int
SProcCreateGlyphCursor (register ClientPtr client)
{
- register char n;
REQUEST(xCreateGlyphCursorReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCreateGlyphCursorReq);
- swapl(&stuff->cid, n);
- swapl(&stuff->source, n);
- swapl(&stuff->mask, n);
- swaps(&stuff->sourceChar, n);
- swaps(&stuff->maskChar, n);
- swaps(&stuff->foreRed, n);
- swaps(&stuff->foreGreen, n);
- swaps(&stuff->foreBlue, n);
- swaps(&stuff->backRed, n);
- swaps(&stuff->backGreen, n);
- swaps(&stuff->backBlue, n);
+ swapl(&stuff->cid);
+ swapl(&stuff->source);
+ swapl(&stuff->mask);
+ swaps(&stuff->sourceChar);
+ swaps(&stuff->maskChar);
+ swaps(&stuff->foreRed);
+ swaps(&stuff->foreGreen);
+ swaps(&stuff->foreBlue);
+ swaps(&stuff->backRed);
+ swaps(&stuff->backGreen);
+ swaps(&stuff->backBlue);
return((* ProcVector[X_CreateGlyphCursor])(client));
}
@@ -968,30 +899,28 @@ SProcCreateGlyphCursor (register ClientPtr client)
int
SProcRecolorCursor (register ClientPtr client)
{
- register char n;
REQUEST(xRecolorCursorReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xRecolorCursorReq);
- swapl(&stuff->cursor, n);
- swaps(&stuff->foreRed, n);
- swaps(&stuff->foreGreen, n);
- swaps(&stuff->foreBlue, n);
- swaps(&stuff->backRed, n);
- swaps(&stuff->backGreen, n);
- swaps(&stuff->backBlue, n);
+ swapl(&stuff->cursor);
+ swaps(&stuff->foreRed);
+ swaps(&stuff->foreGreen);
+ swaps(&stuff->foreBlue);
+ swaps(&stuff->backRed);
+ swaps(&stuff->backGreen);
+ swaps(&stuff->backBlue);
return((* ProcVector[X_RecolorCursor])(client));
}
int
SProcQueryBestSize (register ClientPtr client)
{
- register char n;
REQUEST(xQueryBestSizeReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xQueryBestSizeReq);
- swapl(&stuff->drawable, n);
- swaps(&stuff->width, n);
- swaps(&stuff->height, n);
+ swapl(&stuff->drawable);
+ swaps(&stuff->width);
+ swaps(&stuff->height);
return((* ProcVector[X_QueryBestSize])(client));
}
@@ -999,20 +928,18 @@ SProcQueryBestSize (register ClientPtr client)
int
SProcQueryExtension (register ClientPtr client)
{
- register char n;
REQUEST(xQueryExtensionReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xQueryExtensionReq);
- swaps(&stuff->nbytes, n);
+ swaps(&stuff->nbytes);
return((* ProcVector[X_QueryExtension])(client));
}
int
SProcChangeKeyboardMapping (register ClientPtr client)
{
- register char n;
REQUEST(xChangeKeyboardMappingReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq);
SwapRestL(stuff);
return((* ProcVector[X_ChangeKeyboardMapping])(client));
@@ -1022,11 +949,10 @@ SProcChangeKeyboardMapping (register ClientPtr client)
int
SProcChangeKeyboardControl (register ClientPtr client)
{
- register char n;
REQUEST(xChangeKeyboardControlReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq);
- swapl(&stuff->mask, n);
+ swapl(&stuff->mask);
SwapRestL(stuff);
return((* ProcVector[X_ChangeKeyboardControl])(client));
}
@@ -1034,13 +960,12 @@ SProcChangeKeyboardControl (register ClientPtr client)
int
SProcChangePointerControl (register ClientPtr client)
{
- register char n;
REQUEST(xChangePointerControlReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xChangePointerControlReq);
- swaps(&stuff->accelNum, n);
- swaps(&stuff->accelDenum, n);
- swaps(&stuff->threshold, n);
+ swaps(&stuff->accelNum);
+ swaps(&stuff->accelDenum);
+ swaps(&stuff->threshold);
return((* ProcVector[X_ChangePointerControl])(client));
}
@@ -1048,37 +973,33 @@ SProcChangePointerControl (register ClientPtr client)
int
SProcSetScreenSaver (register ClientPtr client)
{
- register char n;
REQUEST(xSetScreenSaverReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xSetScreenSaverReq);
- swaps(&stuff->timeout, n);
- swaps(&stuff->interval, n);
+ swaps(&stuff->timeout);
+ swaps(&stuff->interval);
return((* ProcVector[X_SetScreenSaver])(client));
}
int
SProcChangeHosts (register ClientPtr client)
{
- register char n;
-
REQUEST(xChangeHostsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeHostsReq);
- swaps(&stuff->hostLength, n);
+ swaps(&stuff->hostLength);
return((* ProcVector[X_ChangeHosts])(client));
}
int SProcRotateProperties (register ClientPtr client)
{
- register char n;
REQUEST(xRotatePropertiesReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq);
- swapl(&stuff->window, n);
- swaps(&stuff->nAtoms, n);
- swaps(&stuff->nPositions, n);
+ swapl(&stuff->window);
+ swaps(&stuff->nAtoms);
+ swaps(&stuff->nPositions);
SwapRestL(stuff);
return ((* ProcVector[X_RotateProperties])(client));
}
@@ -1086,19 +1007,16 @@ int SProcRotateProperties (register ClientPtr client)
int
SProcNoOperation(register ClientPtr client)
{
- register char n;
REQUEST(xReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return ((* ProcVector[X_NoOperation])(client));
}
void
SwapConnClientPrefix(xConnClientPrefix *pCCP)
{
- register char n;
-
- swaps(&pCCP->majorVersion, n);
- swaps(&pCCP->minorVersion, n);
- swaps(&pCCP->nbytesAuthProto, n);
- swaps(&pCCP->nbytesAuthString, n);
+ swaps(&pCCP->majorVersion);
+ swaps(&pCCP->minorVersion);
+ swaps(&pCCP->nbytesAuthProto);
+ swaps(&pCCP->nbytesAuthString);
}