aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xfixes/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xfixes/cursor.c')
-rw-r--r--xorg-server/xfixes/cursor.c122
1 files changed, 54 insertions, 68 deletions
diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c
index ecbed4016..2950e4579 100644
--- a/xorg-server/xfixes/cursor.c
+++ b/xorg-server/xfixes/cursor.c
@@ -309,12 +309,11 @@ GetBit (unsigned char *line, int x)
int
SProcXFixesSelectCursorInput (ClientPtr client)
{
- register int n;
REQUEST(xXFixesSelectCursorInputReq);
- swaps(&stuff->length, n);
- swapl(&stuff->window, n);
- swapl(&stuff->eventMask, n);
+ swaps(&stuff->length);
+ swapl(&stuff->window);
+ swapl(&stuff->eventMask);
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
}
@@ -418,16 +417,15 @@ ProcXFixesGetCursorImage (ClientPtr client)
CopyCursorToImage (pCursor, image);
if (client->swapped)
{
- int n;
- swaps (&rep->sequenceNumber, n);
- swapl (&rep->length, n);
- swaps (&rep->x, n);
- swaps (&rep->y, n);
- swaps (&rep->width, n);
- swaps (&rep->height, n);
- swaps (&rep->xhot, n);
- swaps (&rep->yhot, n);
- swapl (&rep->cursorSerial, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swaps(&rep->x);
+ swaps(&rep->y);
+ swaps(&rep->width);
+ swaps(&rep->height);
+ swaps(&rep->xhot);
+ swaps(&rep->yhot);
+ swapl(&rep->cursorSerial);
SwapLongs (image, npixels);
}
WriteToClient(client, sizeof (xXFixesGetCursorImageReply) +
@@ -439,9 +437,8 @@ ProcXFixesGetCursorImage (ClientPtr client)
int
SProcXFixesGetCursorImage (ClientPtr client)
{
- int n;
REQUEST(xXFixesGetCursorImageReq);
- swaps (&stuff->length, n);
+ swaps(&stuff->length);
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
}
@@ -467,13 +464,12 @@ ProcXFixesSetCursorName (ClientPtr client)
int
SProcXFixesSetCursorName (ClientPtr client)
{
- int n;
REQUEST(xXFixesSetCursorNameReq);
- swaps (&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq);
- swapl (&stuff->cursor, n);
- swaps (&stuff->nbytes, n);
+ swapl(&stuff->cursor);
+ swaps(&stuff->nbytes);
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
}
@@ -501,11 +497,10 @@ ProcXFixesGetCursorName (ClientPtr client)
reply.nbytes = len;
if (client->swapped)
{
- int n;
- swaps (&reply.sequenceNumber, n);
- swapl (&reply.length, n);
- swapl (&reply.atom, n);
- swaps (&reply.nbytes, n);
+ swaps(&reply.sequenceNumber);
+ swapl(&reply.length);
+ swapl(&reply.atom);
+ swaps(&reply.nbytes);
}
WriteReplyToClient(client, sizeof(xXFixesGetCursorNameReply), &reply);
WriteToClient(client, len, str);
@@ -516,12 +511,11 @@ ProcXFixesGetCursorName (ClientPtr client)
int
SProcXFixesGetCursorName (ClientPtr client)
{
- int n;
REQUEST(xXFixesGetCursorNameReq);
- swaps (&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq);
- swapl (&stuff->cursor, n);
+ swapl(&stuff->cursor);
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
}
@@ -576,18 +570,17 @@ ProcXFixesGetCursorImageAndName (ClientPtr client)
memcpy ((image + npixels), name, nbytes);
if (client->swapped)
{
- int n;
- swaps (&rep->sequenceNumber, n);
- swapl (&rep->length, n);
- swaps (&rep->x, n);
- swaps (&rep->y, n);
- swaps (&rep->width, n);
- swaps (&rep->height, n);
- swaps (&rep->xhot, n);
- swaps (&rep->yhot, n);
- swapl (&rep->cursorSerial, n);
- swapl (&rep->cursorName, n);
- swaps (&rep->nbytes, n);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ swaps(&rep->x);
+ swaps(&rep->y);
+ swaps(&rep->width);
+ swaps(&rep->height);
+ swaps(&rep->xhot);
+ swaps(&rep->yhot);
+ swapl(&rep->cursorSerial);
+ swapl(&rep->cursorName);
+ swaps(&rep->nbytes);
SwapLongs (image, npixels);
}
WriteToClient(client, sizeof (xXFixesGetCursorImageAndNameReply) +
@@ -599,9 +592,8 @@ ProcXFixesGetCursorImageAndName (ClientPtr client)
int
SProcXFixesGetCursorImageAndName (ClientPtr client)
{
- int n;
REQUEST(xXFixesGetCursorImageAndNameReq);
- swaps (&stuff->length, n);
+ swaps(&stuff->length);
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
}
@@ -734,13 +726,12 @@ ProcXFixesChangeCursor (ClientPtr client)
int
SProcXFixesChangeCursor (ClientPtr client)
{
- int n;
REQUEST(xXFixesChangeCursorReq);
- swaps (&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXFixesChangeCursorReq);
- swapl (&stuff->source, n);
- swapl (&stuff->destination, n);
+ swapl(&stuff->source);
+ swapl(&stuff->destination);
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
}
@@ -772,13 +763,12 @@ ProcXFixesChangeCursorByName (ClientPtr client)
int
SProcXFixesChangeCursorByName (ClientPtr client)
{
- int n;
REQUEST(xXFixesChangeCursorByNameReq);
- swaps (&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE (xXFixesChangeCursorByNameReq);
- swapl (&stuff->source, n);
- swaps (&stuff->nbytes, n);
+ swapl(&stuff->source);
+ swaps(&stuff->nbytes);
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
}
@@ -933,12 +923,11 @@ ProcXFixesHideCursor (ClientPtr client)
int
SProcXFixesHideCursor (ClientPtr client)
{
- int n;
REQUEST(xXFixesHideCursorReq);
- swaps (&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xXFixesHideCursorReq);
- swapl (&stuff->window, n);
+ swapl(&stuff->window);
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
}
@@ -984,12 +973,11 @@ ProcXFixesShowCursor (ClientPtr client)
int
SProcXFixesShowCursor (ClientPtr client)
{
- int n;
REQUEST(xXFixesShowCursorReq);
- swaps (&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xXFixesShowCursorReq);
- swapl (&stuff->window, n);
+ swapl(&stuff->window);
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
}
@@ -1350,18 +1338,17 @@ ProcXFixesCreatePointerBarrier (ClientPtr client)
int
SProcXFixesCreatePointerBarrier (ClientPtr client)
{
- int n;
REQUEST(xXFixesCreatePointerBarrierReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXFixesCreatePointerBarrierReq);
- swapl(&stuff->barrier, n);
- swapl(&stuff->window, n);
- swaps(&stuff->x1, n);
- swaps(&stuff->y1, n);
- swaps(&stuff->x2, n);
- swaps(&stuff->y2, n);
- swapl(&stuff->directions, n);
+ swapl(&stuff->barrier);
+ swapl(&stuff->window);
+ swaps(&stuff->x1);
+ swaps(&stuff->y1);
+ swaps(&stuff->x2);
+ swaps(&stuff->y2);
+ swapl(&stuff->directions);
return ProcXFixesVector[stuff->xfixesReqType](client);
}
@@ -1412,12 +1399,11 @@ ProcXFixesDestroyPointerBarrier (ClientPtr client)
int
SProcXFixesDestroyPointerBarrier (ClientPtr client)
{
- int n;
REQUEST(xXFixesDestroyPointerBarrierReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq);
- swapl(&stuff->barrier, n);
+ swapl(&stuff->barrier);
return ProcXFixesVector[stuff->xfixesReqType](client);
}