mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-17 19:42:21 +00:00
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>
This commit is contained in:
parent
c10bad3d3e
commit
2c7c520cfe
115 changed files with 3164 additions and 4140 deletions
|
|
@ -47,10 +47,9 @@ ProcBigReqDispatch (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xBigReqEnableReq);
|
REQUEST(xBigReqEnableReq);
|
||||||
xBigReqEnableReply rep;
|
xBigReqEnableReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
}
|
}
|
||||||
if (stuff->brReqType != X_BigReqEnable)
|
if (stuff->brReqType != X_BigReqEnable)
|
||||||
return BadRequest;
|
return BadRequest;
|
||||||
|
|
@ -62,8 +61,8 @@ ProcBigReqDispatch (ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.max_request_size = maxBigRequestSize;
|
rep.max_request_size = maxBigRequestSize;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.max_request_size, n);
|
swapl(&rep.max_request_size);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep);
|
WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
||||||
60
Xext/dpms.c
60
Xext/dpms.c
|
|
@ -46,7 +46,6 @@ ProcDPMSGetVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
/* REQUEST(xDPMSGetVersionReq); */
|
/* REQUEST(xDPMSGetVersionReq); */
|
||||||
xDPMSGetVersionReply rep;
|
xDPMSGetVersionReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
|
REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
|
||||||
|
|
||||||
|
|
@ -56,9 +55,9 @@ ProcDPMSGetVersion(ClientPtr client)
|
||||||
rep.majorVersion = DPMSMajorVersion;
|
rep.majorVersion = DPMSMajorVersion;
|
||||||
rep.minorVersion = DPMSMinorVersion;
|
rep.minorVersion = DPMSMinorVersion;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDPMSGetVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDPMSGetVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -69,7 +68,6 @@ ProcDPMSCapable(ClientPtr client)
|
||||||
{
|
{
|
||||||
/* REQUEST(xDPMSCapableReq); */
|
/* REQUEST(xDPMSCapableReq); */
|
||||||
xDPMSCapableReply rep;
|
xDPMSCapableReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDPMSCapableReq);
|
REQUEST_SIZE_MATCH(xDPMSCapableReq);
|
||||||
|
|
||||||
|
|
@ -79,7 +77,7 @@ ProcDPMSCapable(ClientPtr client)
|
||||||
rep.capable = DPMSCapableFlag;
|
rep.capable = DPMSCapableFlag;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDPMSCapableReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDPMSCapableReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -90,7 +88,6 @@ ProcDPMSGetTimeouts(ClientPtr client)
|
||||||
{
|
{
|
||||||
/* REQUEST(xDPMSGetTimeoutsReq); */
|
/* REQUEST(xDPMSGetTimeoutsReq); */
|
||||||
xDPMSGetTimeoutsReply rep;
|
xDPMSGetTimeoutsReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq);
|
REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq);
|
||||||
|
|
||||||
|
|
@ -102,10 +99,10 @@ ProcDPMSGetTimeouts(ClientPtr client)
|
||||||
rep.off = DPMSOffTime / MILLI_PER_SECOND;
|
rep.off = DPMSOffTime / MILLI_PER_SECOND;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.standby, n);
|
swaps(&rep.standby);
|
||||||
swaps(&rep.suspend, n);
|
swaps(&rep.suspend);
|
||||||
swaps(&rep.off, n);
|
swaps(&rep.off);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -195,7 +192,6 @@ ProcDPMSInfo(ClientPtr client)
|
||||||
{
|
{
|
||||||
/* REQUEST(xDPMSInfoReq); */
|
/* REQUEST(xDPMSInfoReq); */
|
||||||
xDPMSInfoReply rep;
|
xDPMSInfoReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDPMSInfoReq);
|
REQUEST_SIZE_MATCH(xDPMSInfoReq);
|
||||||
|
|
||||||
|
|
@ -206,8 +202,8 @@ ProcDPMSInfo(ClientPtr client)
|
||||||
rep.state = DPMSEnabled;
|
rep.state = DPMSEnabled;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.power_level, n);
|
swaps(&rep.power_level);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDPMSInfoReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDPMSInfoReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -244,13 +240,12 @@ ProcDPMSDispatch (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcDPMSGetVersion(ClientPtr client)
|
SProcDPMSGetVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDPMSGetVersionReq);
|
REQUEST(xDPMSGetVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
|
REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
|
||||||
swaps(&stuff->majorVersion, n);
|
swaps(&stuff->majorVersion);
|
||||||
swaps(&stuff->minorVersion, n);
|
swaps(&stuff->minorVersion);
|
||||||
return ProcDPMSGetVersion(client);
|
return ProcDPMSGetVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -258,9 +253,8 @@ static int
|
||||||
SProcDPMSCapable(ClientPtr client)
|
SProcDPMSCapable(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDPMSCapableReq);
|
REQUEST(xDPMSCapableReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDPMSCapableReq);
|
REQUEST_SIZE_MATCH(xDPMSCapableReq);
|
||||||
|
|
||||||
return ProcDPMSCapable(client);
|
return ProcDPMSCapable(client);
|
||||||
|
|
@ -270,9 +264,8 @@ static int
|
||||||
SProcDPMSGetTimeouts(ClientPtr client)
|
SProcDPMSGetTimeouts(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDPMSGetTimeoutsReq);
|
REQUEST(xDPMSGetTimeoutsReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq);
|
REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq);
|
||||||
|
|
||||||
return ProcDPMSGetTimeouts(client);
|
return ProcDPMSGetTimeouts(client);
|
||||||
|
|
@ -282,14 +275,13 @@ static int
|
||||||
SProcDPMSSetTimeouts(ClientPtr client)
|
SProcDPMSSetTimeouts(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDPMSSetTimeoutsReq);
|
REQUEST(xDPMSSetTimeoutsReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq);
|
REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq);
|
||||||
|
|
||||||
swaps(&stuff->standby, n);
|
swaps(&stuff->standby);
|
||||||
swaps(&stuff->suspend, n);
|
swaps(&stuff->suspend);
|
||||||
swaps(&stuff->off, n);
|
swaps(&stuff->off);
|
||||||
return ProcDPMSSetTimeouts(client);
|
return ProcDPMSSetTimeouts(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -297,9 +289,8 @@ static int
|
||||||
SProcDPMSEnable(ClientPtr client)
|
SProcDPMSEnable(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDPMSEnableReq);
|
REQUEST(xDPMSEnableReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDPMSEnableReq);
|
REQUEST_SIZE_MATCH(xDPMSEnableReq);
|
||||||
|
|
||||||
return ProcDPMSEnable(client);
|
return ProcDPMSEnable(client);
|
||||||
|
|
@ -309,9 +300,8 @@ static int
|
||||||
SProcDPMSDisable(ClientPtr client)
|
SProcDPMSDisable(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDPMSDisableReq);
|
REQUEST(xDPMSDisableReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDPMSDisableReq);
|
REQUEST_SIZE_MATCH(xDPMSDisableReq);
|
||||||
|
|
||||||
return ProcDPMSDisable(client);
|
return ProcDPMSDisable(client);
|
||||||
|
|
@ -321,12 +311,11 @@ static int
|
||||||
SProcDPMSForceLevel(ClientPtr client)
|
SProcDPMSForceLevel(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDPMSForceLevelReq);
|
REQUEST(xDPMSForceLevelReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDPMSForceLevelReq);
|
REQUEST_SIZE_MATCH(xDPMSForceLevelReq);
|
||||||
|
|
||||||
swaps(&stuff->level, n);
|
swaps(&stuff->level);
|
||||||
|
|
||||||
return ProcDPMSForceLevel(client);
|
return ProcDPMSForceLevel(client);
|
||||||
}
|
}
|
||||||
|
|
@ -335,9 +324,8 @@ static int
|
||||||
SProcDPMSInfo(ClientPtr client)
|
SProcDPMSInfo(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDPMSInfoReq);
|
REQUEST(xDPMSInfoReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDPMSInfoReq);
|
REQUEST_SIZE_MATCH(xDPMSInfoReq);
|
||||||
|
|
||||||
return ProcDPMSInfo(client);
|
return ProcDPMSInfo(client);
|
||||||
|
|
|
||||||
16
Xext/geext.c
16
Xext/geext.c
|
|
@ -58,7 +58,6 @@ static void SGEGenericEvent(xEvent* from, xEvent* to);
|
||||||
static int
|
static int
|
||||||
ProcGEQueryVersion(ClientPtr client)
|
ProcGEQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
GEClientInfoPtr pGEClient = GEGetClient(client);
|
GEClientInfoPtr pGEClient = GEGetClient(client);
|
||||||
xGEQueryVersionReply rep;
|
xGEQueryVersionReply rep;
|
||||||
REQUEST(xGEQueryVersionReq);
|
REQUEST(xGEQueryVersionReq);
|
||||||
|
|
@ -80,10 +79,10 @@ ProcGEQueryVersion(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xGEQueryVersionReply), (char*)&rep);
|
WriteToClient(client, sizeof(xGEQueryVersionReply), (char*)&rep);
|
||||||
|
|
@ -101,13 +100,12 @@ int (*ProcGEVector[GENumberRequests])(ClientPtr) = {
|
||||||
static int
|
static int
|
||||||
SProcGEQueryVersion(ClientPtr client)
|
SProcGEQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xGEQueryVersionReq);
|
REQUEST(xGEQueryVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xGEQueryVersionReq);
|
REQUEST_SIZE_MATCH(xGEQueryVersionReq);
|
||||||
swaps(&stuff->majorVersion, n);
|
swaps(&stuff->majorVersion);
|
||||||
swaps(&stuff->minorVersion, n);
|
swaps(&stuff->minorVersion);
|
||||||
return(*ProcGEVector[stuff->ReqType])(client);
|
return(*ProcGEVector[stuff->ReqType])(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -909,7 +909,6 @@ ProcPanoramiXQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
/* REQUEST(xPanoramiXQueryVersionReq); */
|
/* REQUEST(xPanoramiXQueryVersionReq); */
|
||||||
xPanoramiXQueryVersionReply rep;
|
xPanoramiXQueryVersionReply rep;
|
||||||
register int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
|
@ -918,10 +917,10 @@ ProcPanoramiXQueryVersion (ClientPtr client)
|
||||||
rep.majorVersion = SERVER_PANORAMIX_MAJOR_VERSION;
|
rep.majorVersion = SERVER_PANORAMIX_MAJOR_VERSION;
|
||||||
rep.minorVersion = SERVER_PANORAMIX_MINOR_VERSION;
|
rep.minorVersion = SERVER_PANORAMIX_MINOR_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -933,7 +932,7 @@ ProcPanoramiXGetState(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetStateReq);
|
REQUEST(xPanoramiXGetStateReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetStateReply rep;
|
xPanoramiXGetStateReply rep;
|
||||||
int n, rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
|
|
@ -946,9 +945,9 @@ ProcPanoramiXGetState(ClientPtr client)
|
||||||
rep.state = !noPanoramiXExtension;
|
rep.state = !noPanoramiXExtension;
|
||||||
rep.window = stuff->window;
|
rep.window = stuff->window;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.window, n);
|
swapl(&rep.window);
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
|
WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -961,7 +960,7 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetScreenCountReq);
|
REQUEST(xPanoramiXGetScreenCountReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetScreenCountReply rep;
|
xPanoramiXGetScreenCountReply rep;
|
||||||
int n, rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
|
|
@ -974,9 +973,9 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
|
||||||
rep.ScreenCount = PanoramiXNumScreens;
|
rep.ScreenCount = PanoramiXNumScreens;
|
||||||
rep.window = stuff->window;
|
rep.window = stuff->window;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.window, n);
|
swapl(&rep.window);
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), (char *) &rep);
|
WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), (char *) &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -988,7 +987,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetScreenSizeReq);
|
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetScreenSizeReply rep;
|
xPanoramiXGetScreenSizeReply rep;
|
||||||
int n, rc;
|
int rc;
|
||||||
|
|
||||||
if (stuff->screen >= PanoramiXNumScreens)
|
if (stuff->screen >= PanoramiXNumScreens)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
|
|
@ -1007,12 +1006,12 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
|
||||||
rep.window = stuff->window;
|
rep.window = stuff->window;
|
||||||
rep.screen = stuff->screen;
|
rep.screen = stuff->screen;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.width, n);
|
swapl(&rep.width);
|
||||||
swapl (&rep.height, n);
|
swapl(&rep.height);
|
||||||
swapl (&rep.window, n);
|
swapl(&rep.window);
|
||||||
swapl (&rep.screen, n);
|
swapl(&rep.screen);
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), (char *) &rep);
|
WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), (char *) &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -1040,10 +1039,9 @@ ProcXineramaIsActive(ClientPtr client)
|
||||||
rep.state = !noPanoramiXExtension;
|
rep.state = !noPanoramiXExtension;
|
||||||
#endif
|
#endif
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps (&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.state);
|
||||||
swapl (&rep.state, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
|
WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -1063,10 +1061,9 @@ ProcXineramaQueryScreens(ClientPtr client)
|
||||||
rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
|
rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
|
||||||
rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
|
rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps (&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.number);
|
||||||
swapl (&rep.number, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep);
|
WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep);
|
||||||
|
|
||||||
|
|
@ -1081,11 +1078,10 @@ ProcXineramaQueryScreens(ClientPtr client)
|
||||||
scratch.height = screenInfo.screens[i]->height;
|
scratch.height = screenInfo.screens[i]->height;
|
||||||
|
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
int n;
|
swaps(&scratch.x_org);
|
||||||
swaps (&scratch.x_org, n);
|
swaps(&scratch.y_org);
|
||||||
swaps (&scratch.y_org, n);
|
swaps(&scratch.width);
|
||||||
swaps (&scratch.width, n);
|
swaps(&scratch.height);
|
||||||
swaps (&scratch.height, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch);
|
WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,8 @@ static int
|
||||||
SProcPanoramiXQueryVersion (ClientPtr client)
|
SProcPanoramiXQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXQueryVersionReq);
|
REQUEST(xPanoramiXQueryVersionReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length,n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
||||||
return ProcPanoramiXQueryVersion(client);
|
return ProcPanoramiXQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
@ -62,11 +61,10 @@ static int
|
||||||
SProcPanoramiXGetState(ClientPtr client)
|
SProcPanoramiXGetState(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetStateReq);
|
REQUEST(xPanoramiXGetStateReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return ProcPanoramiXGetState(client);
|
return ProcPanoramiXGetState(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -74,11 +72,10 @@ static int
|
||||||
SProcPanoramiXGetScreenCount(ClientPtr client)
|
SProcPanoramiXGetScreenCount(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetScreenCountReq);
|
REQUEST(xPanoramiXGetScreenCountReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return ProcPanoramiXGetScreenCount(client);
|
return ProcPanoramiXGetScreenCount(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -86,12 +83,11 @@ static int
|
||||||
SProcPanoramiXGetScreenSize(ClientPtr client)
|
SProcPanoramiXGetScreenSize(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetScreenSizeReq);
|
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
swapl (&stuff->screen, n);
|
swapl(&stuff->screen);
|
||||||
return ProcPanoramiXGetScreenSize(client);
|
return ProcPanoramiXGetScreenSize(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -100,9 +96,8 @@ static int
|
||||||
SProcXineramaIsActive(ClientPtr client)
|
SProcXineramaIsActive(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXineramaIsActiveReq);
|
REQUEST(xXineramaIsActiveReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
||||||
return ProcXineramaIsActive(client);
|
return ProcXineramaIsActive(client);
|
||||||
}
|
}
|
||||||
|
|
@ -112,9 +107,8 @@ static int
|
||||||
SProcXineramaQueryScreens(ClientPtr client)
|
SProcXineramaQueryScreens(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXineramaQueryScreensReq);
|
REQUEST(xXineramaQueryScreensReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
||||||
return ProcXineramaQueryScreens(client);
|
return ProcXineramaQueryScreens(client);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
69
Xext/saver.c
69
Xext/saver.c
|
|
@ -669,8 +669,6 @@ static int
|
||||||
ProcScreenSaverQueryVersion (ClientPtr client)
|
ProcScreenSaverQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
xScreenSaverQueryVersionReply rep;
|
xScreenSaverQueryVersionReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xScreenSaverQueryVersionReq);
|
REQUEST_SIZE_MATCH (xScreenSaverQueryVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
|
|
@ -678,8 +676,8 @@ ProcScreenSaverQueryVersion (ClientPtr client)
|
||||||
rep.majorVersion = SERVER_SAVER_MAJOR_VERSION;
|
rep.majorVersion = SERVER_SAVER_MAJOR_VERSION;
|
||||||
rep.minorVersion = SERVER_SAVER_MINOR_VERSION;
|
rep.minorVersion = SERVER_SAVER_MINOR_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof (xScreenSaverQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof (xScreenSaverQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -690,7 +688,7 @@ ProcScreenSaverQueryInfo (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverQueryInfoReq);
|
REQUEST(xScreenSaverQueryInfoReq);
|
||||||
xScreenSaverQueryInfoReply rep;
|
xScreenSaverQueryInfoReply rep;
|
||||||
int n, rc;
|
int rc;
|
||||||
ScreenSaverStuffPtr pSaver;
|
ScreenSaverStuffPtr pSaver;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
CARD32 lastInput;
|
CARD32 lastInput;
|
||||||
|
|
@ -750,12 +748,12 @@ ProcScreenSaverQueryInfo (ClientPtr client)
|
||||||
rep.kind = ScreenSaverInternal;
|
rep.kind = ScreenSaverInternal;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps (&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.window, n);
|
swapl(&rep.window);
|
||||||
swapl (&rep.tilOrSince, n);
|
swapl(&rep.tilOrSince);
|
||||||
swapl (&rep.idle, n);
|
swapl(&rep.idle);
|
||||||
swapl (&rep.eventMask, n);
|
swapl(&rep.eventMask);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof (xScreenSaverQueryInfoReply), (char *)&rep);
|
WriteToClient(client, sizeof (xScreenSaverQueryInfoReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -1384,9 +1382,7 @@ static int
|
||||||
SProcScreenSaverQueryVersion (ClientPtr client)
|
SProcScreenSaverQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverQueryVersionReq);
|
REQUEST(xScreenSaverQueryVersionReq);
|
||||||
int n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq);
|
REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq);
|
||||||
return ProcScreenSaverQueryVersion (client);
|
return ProcScreenSaverQueryVersion (client);
|
||||||
}
|
}
|
||||||
|
|
@ -1395,11 +1391,9 @@ static int
|
||||||
SProcScreenSaverQueryInfo (ClientPtr client)
|
SProcScreenSaverQueryInfo (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverQueryInfoReq);
|
REQUEST(xScreenSaverQueryInfoReq);
|
||||||
int n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq);
|
REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq);
|
||||||
swapl (&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
return ProcScreenSaverQueryInfo (client);
|
return ProcScreenSaverQueryInfo (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1407,12 +1401,10 @@ static int
|
||||||
SProcScreenSaverSelectInput (ClientPtr client)
|
SProcScreenSaverSelectInput (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverSelectInputReq);
|
REQUEST(xScreenSaverSelectInputReq);
|
||||||
int n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq);
|
REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq);
|
||||||
swapl (&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swapl (&stuff->eventMask, n);
|
swapl(&stuff->eventMask);
|
||||||
return ProcScreenSaverSelectInput (client);
|
return ProcScreenSaverSelectInput (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1420,18 +1412,16 @@ static int
|
||||||
SProcScreenSaverSetAttributes (ClientPtr client)
|
SProcScreenSaverSetAttributes (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverSetAttributesReq);
|
REQUEST(xScreenSaverSetAttributesReq);
|
||||||
int n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
|
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
|
||||||
swapl (&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swaps (&stuff->x, n);
|
swaps(&stuff->x);
|
||||||
swaps (&stuff->y, n);
|
swaps(&stuff->y);
|
||||||
swaps (&stuff->width, n);
|
swaps(&stuff->width);
|
||||||
swaps (&stuff->height, n);
|
swaps(&stuff->height);
|
||||||
swaps (&stuff->borderWidth, n);
|
swaps(&stuff->borderWidth);
|
||||||
swapl (&stuff->visualID, n);
|
swapl(&stuff->visualID);
|
||||||
swapl (&stuff->mask, n);
|
swapl(&stuff->mask);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return ProcScreenSaverSetAttributes (client);
|
return ProcScreenSaverSetAttributes (client);
|
||||||
}
|
}
|
||||||
|
|
@ -1440,23 +1430,20 @@ static int
|
||||||
SProcScreenSaverUnsetAttributes (ClientPtr client)
|
SProcScreenSaverUnsetAttributes (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xScreenSaverUnsetAttributesReq);
|
REQUEST(xScreenSaverUnsetAttributesReq);
|
||||||
int n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
|
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
|
||||||
swapl (&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
return ProcScreenSaverUnsetAttributes (client);
|
return ProcScreenSaverUnsetAttributes (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcScreenSaverSuspend (ClientPtr client)
|
SProcScreenSaverSuspend (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xScreenSaverSuspendReq);
|
REQUEST(xScreenSaverSuspendReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
|
REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
|
||||||
swapl(&stuff->suspend, n);
|
swapl(&stuff->suspend);
|
||||||
return ProcScreenSaverSuspend (client);
|
return ProcScreenSaverSuspend (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -368,10 +368,9 @@ ProcSecurityQueryVersion(
|
||||||
rep.minorVersion = SERVER_SECURITY_MINOR_VERSION;
|
rep.minorVersion = SERVER_SECURITY_MINOR_VERSION;
|
||||||
if(client->swapped)
|
if(client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
|
||||||
}
|
}
|
||||||
(void)WriteToClient(client, SIZEOF(xSecurityQueryVersionReply),
|
(void)WriteToClient(client, SIZEOF(xSecurityQueryVersionReply),
|
||||||
(char *)&rep);
|
(char *)&rep);
|
||||||
|
|
@ -580,11 +579,10 @@ ProcSecurityGenerateAuthorization(
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.authId);
|
||||||
swapl(&rep.authId, n);
|
swaps(&rep.dataLength);
|
||||||
swaps(&rep.dataLength, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply),
|
WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply),
|
||||||
|
|
@ -652,12 +650,11 @@ SProcSecurityQueryVersion(
|
||||||
ClientPtr client)
|
ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSecurityQueryVersionReq);
|
REQUEST(xSecurityQueryVersionReq);
|
||||||
char n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xSecurityQueryVersionReq);
|
REQUEST_SIZE_MATCH(xSecurityQueryVersionReq);
|
||||||
swaps(&stuff->majorVersion, n);
|
swaps(&stuff->majorVersion);
|
||||||
swaps(&stuff->minorVersion,n);
|
swaps(&stuff->minorVersion);
|
||||||
return ProcSecurityQueryVersion(client);
|
return ProcSecurityQueryVersion(client);
|
||||||
} /* SProcSecurityQueryVersion */
|
} /* SProcSecurityQueryVersion */
|
||||||
|
|
||||||
|
|
@ -667,16 +664,15 @@ SProcSecurityGenerateAuthorization(
|
||||||
ClientPtr client)
|
ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSecurityGenerateAuthorizationReq);
|
REQUEST(xSecurityGenerateAuthorizationReq);
|
||||||
char n;
|
|
||||||
CARD32 *values;
|
CARD32 *values;
|
||||||
unsigned long nvalues;
|
unsigned long nvalues;
|
||||||
int values_offset;
|
int values_offset;
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq);
|
REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq);
|
||||||
swaps(&stuff->nbytesAuthProto, n);
|
swaps(&stuff->nbytesAuthProto);
|
||||||
swaps(&stuff->nbytesAuthData, n);
|
swaps(&stuff->nbytesAuthData);
|
||||||
swapl(&stuff->valueMask, n);
|
swapl(&stuff->valueMask);
|
||||||
values_offset = bytes_to_int32(stuff->nbytesAuthProto) +
|
values_offset = bytes_to_int32(stuff->nbytesAuthProto) +
|
||||||
bytes_to_int32(stuff->nbytesAuthData);
|
bytes_to_int32(stuff->nbytesAuthData);
|
||||||
if (values_offset >
|
if (values_offset >
|
||||||
|
|
@ -694,11 +690,10 @@ SProcSecurityRevokeAuthorization(
|
||||||
ClientPtr client)
|
ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSecurityRevokeAuthorizationReq);
|
REQUEST(xSecurityRevokeAuthorizationReq);
|
||||||
char n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
|
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
|
||||||
swapl(&stuff->authId, n);
|
swapl(&stuff->authId);
|
||||||
return ProcSecurityRevokeAuthorization(client);
|
return ProcSecurityRevokeAuthorization(client);
|
||||||
} /* SProcSecurityRevokeAuthorization */
|
} /* SProcSecurityRevokeAuthorization */
|
||||||
|
|
||||||
|
|
|
||||||
110
Xext/shape.c
110
Xext/shape.c
|
|
@ -214,8 +214,6 @@ static int
|
||||||
ProcShapeQueryVersion (ClientPtr client)
|
ProcShapeQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
xShapeQueryVersionReply rep;
|
xShapeQueryVersionReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xShapeQueryVersionReq);
|
REQUEST_SIZE_MATCH (xShapeQueryVersionReq);
|
||||||
memset(&rep, 0, sizeof(xShapeQueryVersionReply));
|
memset(&rep, 0, sizeof(xShapeQueryVersionReply));
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
|
@ -224,10 +222,10 @@ ProcShapeQueryVersion (ClientPtr client)
|
||||||
rep.majorVersion = SERVER_SHAPE_MAJOR_VERSION;
|
rep.majorVersion = SERVER_SHAPE_MAJOR_VERSION;
|
||||||
rep.minorVersion = SERVER_SHAPE_MINOR_VERSION;
|
rep.minorVersion = SERVER_SHAPE_MINOR_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof (xShapeQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof (xShapeQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -637,7 +635,7 @@ ProcShapeQueryExtents (ClientPtr client)
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xShapeQueryExtentsReply rep;
|
xShapeQueryExtentsReply rep;
|
||||||
BoxRec extents, *pExtents;
|
BoxRec extents, *pExtents;
|
||||||
int n, rc;
|
int rc;
|
||||||
RegionPtr region;
|
RegionPtr region;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xShapeQueryExtentsReq);
|
REQUEST_SIZE_MATCH (xShapeQueryExtentsReq);
|
||||||
|
|
@ -679,16 +677,16 @@ ProcShapeQueryExtents (ClientPtr client)
|
||||||
rep.widthClipShape = extents.x2 - extents.x1;
|
rep.widthClipShape = extents.x2 - extents.x1;
|
||||||
rep.heightClipShape = extents.y2 - extents.y1;
|
rep.heightClipShape = extents.y2 - extents.y1;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.xBoundingShape, n);
|
swaps(&rep.xBoundingShape);
|
||||||
swaps(&rep.yBoundingShape, n);
|
swaps(&rep.yBoundingShape);
|
||||||
swaps(&rep.widthBoundingShape, n);
|
swaps(&rep.widthBoundingShape);
|
||||||
swaps(&rep.heightBoundingShape, n);
|
swaps(&rep.heightBoundingShape);
|
||||||
swaps(&rep.xClipShape, n);
|
swaps(&rep.xClipShape);
|
||||||
swaps(&rep.yClipShape, n);
|
swaps(&rep.yClipShape);
|
||||||
swaps(&rep.widthClipShape, n);
|
swaps(&rep.widthClipShape);
|
||||||
swaps(&rep.heightClipShape, n);
|
swaps(&rep.heightClipShape);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof (xShapeQueryExtentsReply), (char *)&rep);
|
WriteToClient(client, sizeof (xShapeQueryExtentsReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -915,8 +913,6 @@ ProcShapeInputSelected (ClientPtr client)
|
||||||
ShapeEventPtr pShapeEvent, *pHead;
|
ShapeEventPtr pShapeEvent, *pHead;
|
||||||
int enabled, rc;
|
int enabled, rc;
|
||||||
xShapeInputSelectedReply rep;
|
xShapeInputSelectedReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xShapeInputSelectedReq);
|
REQUEST_SIZE_MATCH (xShapeInputSelectedReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
|
@ -942,8 +938,8 @@ ProcShapeInputSelected (ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.enabled = enabled;
|
rep.enabled = enabled;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.length);
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xShapeInputSelectedReply), (char *) &rep);
|
WriteToClient (client, sizeof (xShapeInputSelectedReply), (char *) &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -958,8 +954,6 @@ ProcShapeGetRectangles (ClientPtr client)
|
||||||
xRectangle *rects;
|
xRectangle *rects;
|
||||||
int nrects, i, rc;
|
int nrects, i, rc;
|
||||||
RegionPtr region;
|
RegionPtr region;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShapeGetRectanglesReq);
|
REQUEST_SIZE_MATCH(xShapeGetRectanglesReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
|
@ -1023,9 +1017,9 @@ ProcShapeGetRectangles (ClientPtr client)
|
||||||
rep.ordering = YXBanded;
|
rep.ordering = YXBanded;
|
||||||
rep.nrects = nrects;
|
rep.nrects = nrects;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.nrects, n);
|
swapl(&rep.nrects);
|
||||||
SwapShorts ((short *)rects, (unsigned long)nrects * 4);
|
SwapShorts ((short *)rects, (unsigned long)nrects * 4);
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (rep), (char *) &rep);
|
WriteToClient (client, sizeof (rep), (char *) &rep);
|
||||||
|
|
@ -1100,24 +1094,22 @@ SShapeNotifyEvent(xShapeNotifyEvent *from, xShapeNotifyEvent *to)
|
||||||
static int
|
static int
|
||||||
SProcShapeQueryVersion (ClientPtr client)
|
SProcShapeQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST (xShapeQueryVersionReq);
|
REQUEST (xShapeQueryVersionReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return ProcShapeQueryVersion (client);
|
return ProcShapeQueryVersion (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcShapeRectangles (ClientPtr client)
|
SProcShapeRectangles (ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST (xShapeRectanglesReq);
|
REQUEST (xShapeRectanglesReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq);
|
REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq);
|
||||||
swapl (&stuff->dest, n);
|
swapl(&stuff->dest);
|
||||||
swaps (&stuff->xOff, n);
|
swaps(&stuff->xOff);
|
||||||
swaps (&stuff->yOff, n);
|
swaps(&stuff->yOff);
|
||||||
SwapRestS(stuff);
|
SwapRestS(stuff);
|
||||||
return ProcShapeRectangles (client);
|
return ProcShapeRectangles (client);
|
||||||
}
|
}
|
||||||
|
|
@ -1125,80 +1117,74 @@ SProcShapeRectangles (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcShapeMask (ClientPtr client)
|
SProcShapeMask (ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST (xShapeMaskReq);
|
REQUEST (xShapeMaskReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH (xShapeMaskReq);
|
REQUEST_SIZE_MATCH (xShapeMaskReq);
|
||||||
swapl (&stuff->dest, n);
|
swapl(&stuff->dest);
|
||||||
swaps (&stuff->xOff, n);
|
swaps(&stuff->xOff);
|
||||||
swaps (&stuff->yOff, n);
|
swaps(&stuff->yOff);
|
||||||
swapl (&stuff->src, n);
|
swapl(&stuff->src);
|
||||||
return ProcShapeMask (client);
|
return ProcShapeMask (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcShapeCombine (ClientPtr client)
|
SProcShapeCombine (ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST (xShapeCombineReq);
|
REQUEST (xShapeCombineReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH (xShapeCombineReq);
|
REQUEST_SIZE_MATCH (xShapeCombineReq);
|
||||||
swapl (&stuff->dest, n);
|
swapl(&stuff->dest);
|
||||||
swaps (&stuff->xOff, n);
|
swaps(&stuff->xOff);
|
||||||
swaps (&stuff->yOff, n);
|
swaps(&stuff->yOff);
|
||||||
swapl (&stuff->src, n);
|
swapl(&stuff->src);
|
||||||
return ProcShapeCombine (client);
|
return ProcShapeCombine (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcShapeOffset (ClientPtr client)
|
SProcShapeOffset (ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST (xShapeOffsetReq);
|
REQUEST (xShapeOffsetReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH (xShapeOffsetReq);
|
REQUEST_SIZE_MATCH (xShapeOffsetReq);
|
||||||
swapl (&stuff->dest, n);
|
swapl(&stuff->dest);
|
||||||
swaps (&stuff->xOff, n);
|
swaps(&stuff->xOff);
|
||||||
swaps (&stuff->yOff, n);
|
swaps(&stuff->yOff);
|
||||||
return ProcShapeOffset (client);
|
return ProcShapeOffset (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcShapeQueryExtents (ClientPtr client)
|
SProcShapeQueryExtents (ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST (xShapeQueryExtentsReq);
|
REQUEST (xShapeQueryExtentsReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH (xShapeQueryExtentsReq);
|
REQUEST_SIZE_MATCH (xShapeQueryExtentsReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return ProcShapeQueryExtents (client);
|
return ProcShapeQueryExtents (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcShapeSelectInput (ClientPtr client)
|
SProcShapeSelectInput (ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST (xShapeSelectInputReq);
|
REQUEST (xShapeSelectInputReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH (xShapeSelectInputReq);
|
REQUEST_SIZE_MATCH (xShapeSelectInputReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return ProcShapeSelectInput (client);
|
return ProcShapeSelectInput (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcShapeInputSelected (ClientPtr client)
|
SProcShapeInputSelected (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST (xShapeInputSelectedReq);
|
REQUEST (xShapeInputSelectedReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH (xShapeInputSelectedReq);
|
REQUEST_SIZE_MATCH (xShapeInputSelectedReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return ProcShapeInputSelected (client);
|
return ProcShapeInputSelected (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1206,11 +1192,9 @@ static int
|
||||||
SProcShapeGetRectangles (ClientPtr client)
|
SProcShapeGetRectangles (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeGetRectanglesReq);
|
REQUEST(xShapeGetRectanglesReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH(xShapeGetRectanglesReq);
|
REQUEST_SIZE_MATCH(xShapeGetRectanglesReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return ProcShapeGetRectangles (client);
|
return ProcShapeGetRectangles (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
108
Xext/shm.c
108
Xext/shm.c
|
|
@ -289,7 +289,6 @@ static int
|
||||||
ProcShmQueryVersion(ClientPtr client)
|
ProcShmQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
xShmQueryVersionReply rep;
|
xShmQueryVersionReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xShmQueryVersionReq);
|
REQUEST_SIZE_MATCH(xShmQueryVersionReq);
|
||||||
memset(&rep, 0, sizeof(xShmQueryVersionReply));
|
memset(&rep, 0, sizeof(xShmQueryVersionReply));
|
||||||
|
|
@ -303,12 +302,12 @@ ProcShmQueryVersion(ClientPtr client)
|
||||||
rep.uid = geteuid();
|
rep.uid = geteuid();
|
||||||
rep.gid = getegid();
|
rep.gid = getegid();
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
swaps(&rep.uid, n);
|
swaps(&rep.uid);
|
||||||
swaps(&rep.gid, n);
|
swaps(&rep.gid);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xShmQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xShmQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -633,7 +632,7 @@ ProcShmGetImage(ClientPtr client)
|
||||||
Mask plane = 0;
|
Mask plane = 0;
|
||||||
xShmGetImageReply xgi;
|
xShmGetImageReply xgi;
|
||||||
ShmDescPtr shmdesc;
|
ShmDescPtr shmdesc;
|
||||||
int n, rc;
|
int rc;
|
||||||
|
|
||||||
REQUEST(xShmGetImageReq);
|
REQUEST(xShmGetImageReq);
|
||||||
|
|
||||||
|
|
@ -727,10 +726,10 @@ ProcShmGetImage(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&xgi.sequenceNumber, n);
|
swaps(&xgi.sequenceNumber);
|
||||||
swapl(&xgi.length, n);
|
swapl(&xgi.length);
|
||||||
swapl(&xgi.visual, n);
|
swapl(&xgi.visual);
|
||||||
swapl(&xgi.size, n);
|
swapl(&xgi.size);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi);
|
WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi);
|
||||||
|
|
||||||
|
|
@ -897,11 +896,10 @@ ProcPanoramiXShmGetImage(ClientPtr client)
|
||||||
free(drawables);
|
free(drawables);
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&xgi.sequenceNumber);
|
||||||
swaps(&xgi.sequenceNumber, n);
|
swapl(&xgi.length);
|
||||||
swapl(&xgi.length, n);
|
swapl(&xgi.visual);
|
||||||
swapl(&xgi.visual, n);
|
swapl(&xgi.size);
|
||||||
swapl(&xgi.size, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi);
|
WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi);
|
||||||
|
|
||||||
|
|
@ -1165,89 +1163,83 @@ SShmCompletionEvent(xShmCompletionEvent *from, xShmCompletionEvent *to)
|
||||||
static int
|
static int
|
||||||
SProcShmQueryVersion(ClientPtr client)
|
SProcShmQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xShmQueryVersionReq);
|
REQUEST(xShmQueryVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return ProcShmQueryVersion(client);
|
return ProcShmQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcShmAttach(ClientPtr client)
|
SProcShmAttach(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xShmAttachReq);
|
REQUEST(xShmAttachReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xShmAttachReq);
|
REQUEST_SIZE_MATCH(xShmAttachReq);
|
||||||
swapl(&stuff->shmseg, n);
|
swapl(&stuff->shmseg);
|
||||||
swapl(&stuff->shmid, n);
|
swapl(&stuff->shmid);
|
||||||
return ProcShmAttach(client);
|
return ProcShmAttach(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcShmDetach(ClientPtr client)
|
SProcShmDetach(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xShmDetachReq);
|
REQUEST(xShmDetachReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xShmDetachReq);
|
REQUEST_SIZE_MATCH(xShmDetachReq);
|
||||||
swapl(&stuff->shmseg, n);
|
swapl(&stuff->shmseg);
|
||||||
return ProcShmDetach(client);
|
return ProcShmDetach(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcShmPutImage(ClientPtr client)
|
SProcShmPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xShmPutImageReq);
|
REQUEST(xShmPutImageReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xShmPutImageReq);
|
REQUEST_SIZE_MATCH(xShmPutImageReq);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc, n);
|
swapl(&stuff->gc);
|
||||||
swaps(&stuff->totalWidth, n);
|
swaps(&stuff->totalWidth);
|
||||||
swaps(&stuff->totalHeight, n);
|
swaps(&stuff->totalHeight);
|
||||||
swaps(&stuff->srcX, n);
|
swaps(&stuff->srcX);
|
||||||
swaps(&stuff->srcY, n);
|
swaps(&stuff->srcY);
|
||||||
swaps(&stuff->srcWidth, n);
|
swaps(&stuff->srcWidth);
|
||||||
swaps(&stuff->srcHeight, n);
|
swaps(&stuff->srcHeight);
|
||||||
swaps(&stuff->dstX, n);
|
swaps(&stuff->dstX);
|
||||||
swaps(&stuff->dstY, n);
|
swaps(&stuff->dstY);
|
||||||
swapl(&stuff->shmseg, n);
|
swapl(&stuff->shmseg);
|
||||||
swapl(&stuff->offset, n);
|
swapl(&stuff->offset);
|
||||||
return ProcShmPutImage(client);
|
return ProcShmPutImage(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcShmGetImage(ClientPtr client)
|
SProcShmGetImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xShmGetImageReq);
|
REQUEST(xShmGetImageReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xShmGetImageReq);
|
REQUEST_SIZE_MATCH(xShmGetImageReq);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swaps(&stuff->x, n);
|
swaps(&stuff->x);
|
||||||
swaps(&stuff->y, n);
|
swaps(&stuff->y);
|
||||||
swaps(&stuff->width, n);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height, n);
|
swaps(&stuff->height);
|
||||||
swapl(&stuff->planeMask, n);
|
swapl(&stuff->planeMask);
|
||||||
swapl(&stuff->shmseg, n);
|
swapl(&stuff->shmseg);
|
||||||
swapl(&stuff->offset, n);
|
swapl(&stuff->offset);
|
||||||
return ProcShmGetImage(client);
|
return ProcShmGetImage(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcShmCreatePixmap(ClientPtr client)
|
SProcShmCreatePixmap(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xShmCreatePixmapReq);
|
REQUEST(xShmCreatePixmapReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
|
REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
|
||||||
swapl(&stuff->pid, n);
|
swapl(&stuff->pid);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swaps(&stuff->width, n);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height, n);
|
swaps(&stuff->height);
|
||||||
swapl(&stuff->shmseg, n);
|
swapl(&stuff->shmseg);
|
||||||
swapl(&stuff->offset, n);
|
swapl(&stuff->offset);
|
||||||
return ProcShmCreatePixmap(client);
|
return ProcShmCreatePixmap(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
186
Xext/sync.c
186
Xext/sync.c
|
|
@ -1273,8 +1273,6 @@ static int
|
||||||
ProcSyncInitialize(ClientPtr client)
|
ProcSyncInitialize(ClientPtr client)
|
||||||
{
|
{
|
||||||
xSyncInitializeReply rep;
|
xSyncInitializeReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xSyncInitializeReq);
|
REQUEST_SIZE_MATCH(xSyncInitializeReq);
|
||||||
|
|
||||||
memset(&rep, 0, sizeof(xSyncInitializeReply));
|
memset(&rep, 0, sizeof(xSyncInitializeReply));
|
||||||
|
|
@ -1286,7 +1284,7 @@ ProcSyncInitialize(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(rep), (char *) &rep);
|
WriteToClient(client, sizeof(rep), (char *) &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -1326,10 +1324,9 @@ ProcSyncListSystemCounters(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.nCounters);
|
||||||
swapl(&rep.nCounters, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < SyncNumSystemCounters; i++)
|
for (i = 0; i < SyncNumSystemCounters; i++)
|
||||||
|
|
@ -1346,11 +1343,10 @@ ProcSyncListSystemCounters(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swapl(&walklist->counter);
|
||||||
swapl(&walklist->counter, n);
|
swapl(&walklist->resolution_hi);
|
||||||
swapl(&walklist->resolution_hi, n);
|
swapl(&walklist->resolution_lo);
|
||||||
swapl(&walklist->resolution_lo, n);
|
swaps(&walklist->name_length);
|
||||||
swaps(&walklist->name_length, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pname_in_reply = ((char *)walklist) + sz_xSyncSystemCounter;
|
pname_in_reply = ((char *)walklist) + sz_xSyncSystemCounter;
|
||||||
|
|
@ -1433,9 +1429,8 @@ ProcSyncGetPriority(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.priority);
|
||||||
swapl(&rep.priority, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep);
|
WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep);
|
||||||
|
|
@ -1732,11 +1727,10 @@ ProcSyncQueryCounter(ClientPtr client)
|
||||||
rep.value_lo = XSyncValueLow32(pCounter->value);
|
rep.value_lo = XSyncValueLow32(pCounter->value);
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.value_hi);
|
||||||
swapl(&rep.value_hi, n);
|
swapl(&rep.value_lo);
|
||||||
swapl(&rep.value_lo, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep);
|
WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -1921,15 +1915,14 @@ ProcSyncQueryAlarm(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.counter);
|
||||||
swapl(&rep.counter, n);
|
swapl(&rep.wait_value_hi);
|
||||||
swapl(&rep.wait_value_hi, n);
|
swapl(&rep.wait_value_lo);
|
||||||
swapl(&rep.wait_value_lo, n);
|
swapl(&rep.test_type);
|
||||||
swapl(&rep.test_type, n);
|
swapl(&rep.delta_hi);
|
||||||
swapl(&rep.delta_hi, n);
|
swapl(&rep.delta_lo);
|
||||||
swapl(&rep.delta_lo, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep);
|
WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep);
|
||||||
|
|
@ -2087,9 +2080,8 @@ ProcSyncQueryFence(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xSyncQueryFenceReply), (char *) &rep);
|
WriteToClient(client, sizeof(xSyncQueryFenceReply), (char *) &rep);
|
||||||
|
|
@ -2242,9 +2234,7 @@ static int
|
||||||
SProcSyncInitialize(ClientPtr client)
|
SProcSyncInitialize(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncInitializeReq);
|
REQUEST(xSyncInitializeReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncInitializeReq);
|
REQUEST_SIZE_MATCH (xSyncInitializeReq);
|
||||||
|
|
||||||
return ProcSyncInitialize(client);
|
return ProcSyncInitialize(client);
|
||||||
|
|
@ -2254,9 +2244,7 @@ static int
|
||||||
SProcSyncListSystemCounters(ClientPtr client)
|
SProcSyncListSystemCounters(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncListSystemCountersReq);
|
REQUEST(xSyncListSystemCountersReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncListSystemCountersReq);
|
REQUEST_SIZE_MATCH (xSyncListSystemCountersReq);
|
||||||
|
|
||||||
return ProcSyncListSystemCounters(client);
|
return ProcSyncListSystemCounters(client);
|
||||||
|
|
@ -2266,13 +2254,11 @@ static int
|
||||||
SProcSyncCreateCounter(ClientPtr client)
|
SProcSyncCreateCounter(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncCreateCounterReq);
|
REQUEST(xSyncCreateCounterReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncCreateCounterReq);
|
REQUEST_SIZE_MATCH (xSyncCreateCounterReq);
|
||||||
swapl(&stuff->cid, n);
|
swapl(&stuff->cid);
|
||||||
swapl(&stuff->initial_value_lo, n);
|
swapl(&stuff->initial_value_lo);
|
||||||
swapl(&stuff->initial_value_hi, n);
|
swapl(&stuff->initial_value_hi);
|
||||||
|
|
||||||
return ProcSyncCreateCounter(client);
|
return ProcSyncCreateCounter(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2281,13 +2267,11 @@ static int
|
||||||
SProcSyncSetCounter(ClientPtr client)
|
SProcSyncSetCounter(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncSetCounterReq);
|
REQUEST(xSyncSetCounterReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncSetCounterReq);
|
REQUEST_SIZE_MATCH (xSyncSetCounterReq);
|
||||||
swapl(&stuff->cid, n);
|
swapl(&stuff->cid);
|
||||||
swapl(&stuff->value_lo, n);
|
swapl(&stuff->value_lo);
|
||||||
swapl(&stuff->value_hi, n);
|
swapl(&stuff->value_hi);
|
||||||
|
|
||||||
return ProcSyncSetCounter(client);
|
return ProcSyncSetCounter(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2296,13 +2280,11 @@ static int
|
||||||
SProcSyncChangeCounter(ClientPtr client)
|
SProcSyncChangeCounter(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncChangeCounterReq);
|
REQUEST(xSyncChangeCounterReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncChangeCounterReq);
|
REQUEST_SIZE_MATCH (xSyncChangeCounterReq);
|
||||||
swapl(&stuff->cid, n);
|
swapl(&stuff->cid);
|
||||||
swapl(&stuff->value_lo, n);
|
swapl(&stuff->value_lo);
|
||||||
swapl(&stuff->value_hi, n);
|
swapl(&stuff->value_hi);
|
||||||
|
|
||||||
return ProcSyncChangeCounter(client);
|
return ProcSyncChangeCounter(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2311,11 +2293,9 @@ static int
|
||||||
SProcSyncQueryCounter(ClientPtr client)
|
SProcSyncQueryCounter(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncQueryCounterReq);
|
REQUEST(xSyncQueryCounterReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncQueryCounterReq);
|
REQUEST_SIZE_MATCH (xSyncQueryCounterReq);
|
||||||
swapl(&stuff->counter, n);
|
swapl(&stuff->counter);
|
||||||
|
|
||||||
return ProcSyncQueryCounter(client);
|
return ProcSyncQueryCounter(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2324,11 +2304,9 @@ static int
|
||||||
SProcSyncDestroyCounter(ClientPtr client)
|
SProcSyncDestroyCounter(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncDestroyCounterReq);
|
REQUEST(xSyncDestroyCounterReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncDestroyCounterReq);
|
REQUEST_SIZE_MATCH (xSyncDestroyCounterReq);
|
||||||
swapl(&stuff->counter, n);
|
swapl(&stuff->counter);
|
||||||
|
|
||||||
return ProcSyncDestroyCounter(client);
|
return ProcSyncDestroyCounter(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2337,9 +2315,7 @@ static int
|
||||||
SProcSyncAwait(ClientPtr client)
|
SProcSyncAwait(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncAwaitReq);
|
REQUEST(xSyncAwaitReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSyncAwaitReq);
|
REQUEST_AT_LEAST_SIZE(xSyncAwaitReq);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
|
|
||||||
|
|
@ -2350,12 +2326,10 @@ static int
|
||||||
SProcSyncCreateAlarm(ClientPtr client)
|
SProcSyncCreateAlarm(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncCreateAlarmReq);
|
REQUEST(xSyncCreateAlarmReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq);
|
REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
swapl(&stuff->valueMask, n);
|
swapl(&stuff->valueMask);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
|
|
||||||
return ProcSyncCreateAlarm(client);
|
return ProcSyncCreateAlarm(client);
|
||||||
|
|
@ -2365,12 +2339,10 @@ static int
|
||||||
SProcSyncChangeAlarm(ClientPtr client)
|
SProcSyncChangeAlarm(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncChangeAlarmReq);
|
REQUEST(xSyncChangeAlarmReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq);
|
REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq);
|
||||||
swapl(&stuff->alarm, n);
|
swapl(&stuff->alarm);
|
||||||
swapl(&stuff->valueMask, n);
|
swapl(&stuff->valueMask);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return ProcSyncChangeAlarm(client);
|
return ProcSyncChangeAlarm(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2379,11 +2351,9 @@ static int
|
||||||
SProcSyncQueryAlarm(ClientPtr client)
|
SProcSyncQueryAlarm(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncQueryAlarmReq);
|
REQUEST(xSyncQueryAlarmReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncQueryAlarmReq);
|
REQUEST_SIZE_MATCH (xSyncQueryAlarmReq);
|
||||||
swapl(&stuff->alarm, n);
|
swapl(&stuff->alarm);
|
||||||
|
|
||||||
return ProcSyncQueryAlarm(client);
|
return ProcSyncQueryAlarm(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2392,11 +2362,9 @@ static int
|
||||||
SProcSyncDestroyAlarm(ClientPtr client)
|
SProcSyncDestroyAlarm(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncDestroyAlarmReq);
|
REQUEST(xSyncDestroyAlarmReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncDestroyAlarmReq);
|
REQUEST_SIZE_MATCH (xSyncDestroyAlarmReq);
|
||||||
swapl(&stuff->alarm, n);
|
swapl(&stuff->alarm);
|
||||||
|
|
||||||
return ProcSyncDestroyAlarm(client);
|
return ProcSyncDestroyAlarm(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2405,12 +2373,10 @@ static int
|
||||||
SProcSyncSetPriority(ClientPtr client)
|
SProcSyncSetPriority(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncSetPriorityReq);
|
REQUEST(xSyncSetPriorityReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncSetPriorityReq);
|
REQUEST_SIZE_MATCH (xSyncSetPriorityReq);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
swapl(&stuff->priority, n);
|
swapl(&stuff->priority);
|
||||||
|
|
||||||
return ProcSyncSetPriority(client);
|
return ProcSyncSetPriority(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2419,11 +2385,9 @@ static int
|
||||||
SProcSyncGetPriority(ClientPtr client)
|
SProcSyncGetPriority(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncGetPriorityReq);
|
REQUEST(xSyncGetPriorityReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncGetPriorityReq);
|
REQUEST_SIZE_MATCH (xSyncGetPriorityReq);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
|
|
||||||
return ProcSyncGetPriority(client);
|
return ProcSyncGetPriority(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2432,11 +2396,9 @@ static int
|
||||||
SProcSyncCreateFence(ClientPtr client)
|
SProcSyncCreateFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncCreateFenceReq);
|
REQUEST(xSyncCreateFenceReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncCreateFenceReq);
|
REQUEST_SIZE_MATCH (xSyncCreateFenceReq);
|
||||||
swapl(&stuff->fid, n);
|
swapl(&stuff->fid);
|
||||||
|
|
||||||
return ProcSyncCreateFence(client);
|
return ProcSyncCreateFence(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2445,11 +2407,9 @@ static int
|
||||||
SProcSyncTriggerFence(ClientPtr client)
|
SProcSyncTriggerFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncTriggerFenceReq);
|
REQUEST(xSyncTriggerFenceReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncTriggerFenceReq);
|
REQUEST_SIZE_MATCH (xSyncTriggerFenceReq);
|
||||||
swapl(&stuff->fid, n);
|
swapl(&stuff->fid);
|
||||||
|
|
||||||
return ProcSyncTriggerFence(client);
|
return ProcSyncTriggerFence(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2458,11 +2418,9 @@ static int
|
||||||
SProcSyncResetFence(ClientPtr client)
|
SProcSyncResetFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncResetFenceReq);
|
REQUEST(xSyncResetFenceReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncResetFenceReq);
|
REQUEST_SIZE_MATCH (xSyncResetFenceReq);
|
||||||
swapl(&stuff->fid, n);
|
swapl(&stuff->fid);
|
||||||
|
|
||||||
return ProcSyncResetFence(client);
|
return ProcSyncResetFence(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2471,11 +2429,9 @@ static int
|
||||||
SProcSyncDestroyFence(ClientPtr client)
|
SProcSyncDestroyFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncDestroyFenceReq);
|
REQUEST(xSyncDestroyFenceReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncDestroyFenceReq);
|
REQUEST_SIZE_MATCH (xSyncDestroyFenceReq);
|
||||||
swapl(&stuff->fid, n);
|
swapl(&stuff->fid);
|
||||||
|
|
||||||
return ProcSyncDestroyFence(client);
|
return ProcSyncDestroyFence(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2484,11 +2440,9 @@ static int
|
||||||
SProcSyncQueryFence(ClientPtr client)
|
SProcSyncQueryFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncQueryFenceReq);
|
REQUEST(xSyncQueryFenceReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH (xSyncQueryFenceReq);
|
REQUEST_SIZE_MATCH (xSyncQueryFenceReq);
|
||||||
swapl(&stuff->fid, n);
|
swapl(&stuff->fid);
|
||||||
|
|
||||||
return ProcSyncQueryFence(client);
|
return ProcSyncQueryFence(client);
|
||||||
}
|
}
|
||||||
|
|
@ -2497,9 +2451,7 @@ static int
|
||||||
SProcSyncAwaitFence(ClientPtr client)
|
SProcSyncAwaitFence(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xSyncAwaitFenceReq);
|
REQUEST(xSyncAwaitFenceReq);
|
||||||
char n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq);
|
REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ static int
|
||||||
ProcXCMiscGetVersion(ClientPtr client)
|
ProcXCMiscGetVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
xXCMiscGetVersionReply rep;
|
xXCMiscGetVersionReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXCMiscGetVersionReq);
|
REQUEST_SIZE_MATCH(xXCMiscGetVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
|
@ -60,9 +59,9 @@ ProcXCMiscGetVersion(ClientPtr client)
|
||||||
rep.majorVersion = XCMiscMajorVersion;
|
rep.majorVersion = XCMiscMajorVersion;
|
||||||
rep.minorVersion = XCMiscMinorVersion;
|
rep.minorVersion = XCMiscMinorVersion;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXCMiscGetVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXCMiscGetVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -72,7 +71,6 @@ static int
|
||||||
ProcXCMiscGetXIDRange(ClientPtr client)
|
ProcXCMiscGetXIDRange(ClientPtr client)
|
||||||
{
|
{
|
||||||
xXCMiscGetXIDRangeReply rep;
|
xXCMiscGetXIDRangeReply rep;
|
||||||
int n;
|
|
||||||
XID min_id, max_id;
|
XID min_id, max_id;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXCMiscGetXIDRangeReq);
|
REQUEST_SIZE_MATCH(xXCMiscGetXIDRangeReq);
|
||||||
|
|
@ -83,9 +81,9 @@ ProcXCMiscGetXIDRange(ClientPtr client)
|
||||||
rep.start_id = min_id;
|
rep.start_id = min_id;
|
||||||
rep.count = max_id - min_id + 1;
|
rep.count = max_id - min_id + 1;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.start_id, n);
|
swapl(&rep.start_id);
|
||||||
swapl(&rep.count, n);
|
swapl(&rep.count);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -96,7 +94,6 @@ ProcXCMiscGetXIDList(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXCMiscGetXIDListReq);
|
REQUEST(xXCMiscGetXIDListReq);
|
||||||
xXCMiscGetXIDListReply rep;
|
xXCMiscGetXIDListReply rep;
|
||||||
int n;
|
|
||||||
XID *pids;
|
XID *pids;
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
|
||||||
|
|
@ -116,9 +113,9 @@ ProcXCMiscGetXIDList(ClientPtr client)
|
||||||
rep.length = count;
|
rep.length = count;
|
||||||
rep.count = count;
|
rep.count = count;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.count, n);
|
swapl(&rep.count);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXCMiscGetXIDListReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXCMiscGetXIDListReply), (char *)&rep);
|
||||||
if (count)
|
if (count)
|
||||||
|
|
@ -150,34 +147,31 @@ ProcXCMiscDispatch (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcXCMiscGetVersion(ClientPtr client)
|
SProcXCMiscGetVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xXCMiscGetVersionReq);
|
REQUEST(xXCMiscGetVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXCMiscGetVersionReq);
|
REQUEST_SIZE_MATCH(xXCMiscGetVersionReq);
|
||||||
swaps(&stuff->majorVersion, n);
|
swaps(&stuff->majorVersion);
|
||||||
swaps(&stuff->minorVersion, n);
|
swaps(&stuff->minorVersion);
|
||||||
return ProcXCMiscGetVersion(client);
|
return ProcXCMiscGetVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXCMiscGetXIDRange(ClientPtr client)
|
SProcXCMiscGetXIDRange(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return ProcXCMiscGetXIDRange(client);
|
return ProcXCMiscGetXIDRange(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXCMiscGetXIDList(ClientPtr client)
|
SProcXCMiscGetXIDList(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xXCMiscGetXIDListReq);
|
REQUEST(xXCMiscGetXIDListReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->count, n);
|
swapl(&stuff->count);
|
||||||
return ProcXCMiscGetXIDList(client);
|
return ProcXCMiscGetXIDList(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -307,13 +307,13 @@ ProcXF86BigfontQueryVersion(
|
||||||
; /* may add more bits here in future versions */
|
; /* may add more bits here in future versions */
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
char tmp;
|
char tmp;
|
||||||
swaps(&reply.sequenceNumber, tmp);
|
swaps(&reply.sequenceNumber);
|
||||||
swapl(&reply.length, tmp);
|
swapl(&reply.length);
|
||||||
swaps(&reply.majorVersion, tmp);
|
swaps(&reply.majorVersion);
|
||||||
swaps(&reply.minorVersion, tmp);
|
swaps(&reply.minorVersion);
|
||||||
swapl(&reply.uid, tmp);
|
swapl(&reply.uid);
|
||||||
swapl(&reply.gid, tmp);
|
swapl(&reply.gid);
|
||||||
swapl(&reply.signature, tmp);
|
swapl(&reply.signature);
|
||||||
}
|
}
|
||||||
WriteToClient(client,
|
WriteToClient(client,
|
||||||
sizeof(xXF86BigfontQueryVersionReply), (char *)&reply);
|
sizeof(xXF86BigfontQueryVersionReply), (char *)&reply);
|
||||||
|
|
@ -326,12 +326,12 @@ swapCharInfo(
|
||||||
{
|
{
|
||||||
char tmp;
|
char tmp;
|
||||||
|
|
||||||
swaps(&pCI->leftSideBearing, tmp);
|
swaps(&pCI->leftSideBearing);
|
||||||
swaps(&pCI->rightSideBearing, tmp);
|
swaps(&pCI->rightSideBearing);
|
||||||
swaps(&pCI->characterWidth, tmp);
|
swaps(&pCI->characterWidth);
|
||||||
swaps(&pCI->ascent, tmp);
|
swaps(&pCI->ascent);
|
||||||
swaps(&pCI->descent, tmp);
|
swaps(&pCI->descent);
|
||||||
swaps(&pCI->attributes, tmp);
|
swaps(&pCI->attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static CARD32 hashCI (xCharInfo *p); */
|
/* static CARD32 hashCI (xCharInfo *p); */
|
||||||
|
|
@ -587,20 +587,20 @@ ProcXF86BigfontQueryFont(
|
||||||
reply->shmsegoffset = 0;
|
reply->shmsegoffset = 0;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
char tmp;
|
char tmp;
|
||||||
swaps(&reply->sequenceNumber, tmp);
|
swaps(&reply->sequenceNumber);
|
||||||
swapl(&reply->length, tmp);
|
swapl(&reply->length);
|
||||||
swapCharInfo(&reply->minBounds);
|
swapCharInfo(&reply->minBounds);
|
||||||
swapCharInfo(&reply->maxBounds);
|
swapCharInfo(&reply->maxBounds);
|
||||||
swaps(&reply->minCharOrByte2, tmp);
|
swaps(&reply->minCharOrByte2);
|
||||||
swaps(&reply->maxCharOrByte2, tmp);
|
swaps(&reply->maxCharOrByte2);
|
||||||
swaps(&reply->defaultChar, tmp);
|
swaps(&reply->defaultChar);
|
||||||
swaps(&reply->nFontProps, tmp);
|
swaps(&reply->nFontProps);
|
||||||
swaps(&reply->fontAscent, tmp);
|
swaps(&reply->fontAscent);
|
||||||
swaps(&reply->fontDescent, tmp);
|
swaps(&reply->fontDescent);
|
||||||
swapl(&reply->nCharInfos, tmp);
|
swapl(&reply->nCharInfos);
|
||||||
swapl(&reply->nUniqCharInfos, tmp);
|
swapl(&reply->nUniqCharInfos);
|
||||||
swapl(&reply->shmid, tmp);
|
swapl(&reply->shmid);
|
||||||
swapl(&reply->shmsegoffset, tmp);
|
swapl(&reply->shmsegoffset);
|
||||||
}
|
}
|
||||||
p = (char*) &reply[1];
|
p = (char*) &reply[1];
|
||||||
{
|
{
|
||||||
|
|
@ -614,8 +614,8 @@ ProcXF86BigfontQueryFont(
|
||||||
prFP->value = pFP->value;
|
prFP->value = pFP->value;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
char tmp;
|
char tmp;
|
||||||
swapl(&prFP->name, tmp);
|
swapl(&prFP->name);
|
||||||
swapl(&prFP->value, tmp);
|
swapl(&prFP->value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p = (char*) prFP;
|
p = (char*) prFP;
|
||||||
|
|
@ -635,7 +635,7 @@ ProcXF86BigfontQueryFont(
|
||||||
*ps = pIndex2UniqIndex[j];
|
*ps = pIndex2UniqIndex[j];
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
char tmp;
|
char tmp;
|
||||||
swaps(ps, tmp);
|
swaps(ps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -672,7 +672,7 @@ SProcXF86BigfontQueryVersion(
|
||||||
REQUEST(xXF86BigfontQueryVersionReq);
|
REQUEST(xXF86BigfontQueryVersionReq);
|
||||||
char tmp;
|
char tmp;
|
||||||
|
|
||||||
swaps(&stuff->length, tmp);
|
swaps(&stuff->length);
|
||||||
return ProcXF86BigfontQueryVersion(client);
|
return ProcXF86BigfontQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -683,9 +683,9 @@ SProcXF86BigfontQueryFont(
|
||||||
REQUEST(xXF86BigfontQueryFontReq);
|
REQUEST(xXF86BigfontQueryFontReq);
|
||||||
char tmp;
|
char tmp;
|
||||||
|
|
||||||
swaps(&stuff->length, tmp);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq);
|
REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq);
|
||||||
swapl(&stuff->id, tmp);
|
swapl(&stuff->id);
|
||||||
return ProcXF86BigfontQueryFont(client);
|
return ProcXF86BigfontQueryFont(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
60
Xext/xres.c
60
Xext/xres.c
|
|
@ -43,11 +43,10 @@ ProcXResQueryVersion (ClientPtr client)
|
||||||
rep.server_major = SERVER_XRES_MAJOR_VERSION;
|
rep.server_major = SERVER_XRES_MAJOR_VERSION;
|
||||||
rep.server_minor = SERVER_XRES_MINOR_VERSION;
|
rep.server_minor = SERVER_XRES_MINOR_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swaps(&rep.server_major);
|
||||||
swaps(&rep.server_major, n);
|
swaps(&rep.server_minor);
|
||||||
swaps(&rep.server_minor, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof (xXResQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof (xXResQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -78,10 +77,9 @@ ProcXResQueryClients (ClientPtr client)
|
||||||
rep.num_clients = num_clients;
|
rep.num_clients = num_clients;
|
||||||
rep.length = bytes_to_int32(rep.num_clients * sz_xXResClient);
|
rep.length = bytes_to_int32(rep.num_clients * sz_xXResClient);
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps (&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.num_clients);
|
||||||
swapl (&rep.num_clients, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xXResQueryClientsReply), (char *) &rep);
|
WriteToClient (client, sizeof (xXResQueryClientsReply), (char *) &rep);
|
||||||
|
|
||||||
|
|
@ -93,9 +91,8 @@ ProcXResQueryClients (ClientPtr client)
|
||||||
scratch.resource_mask = RESOURCE_ID_MASK;
|
scratch.resource_mask = RESOURCE_ID_MASK;
|
||||||
|
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
int n;
|
swapl(&scratch.resource_base);
|
||||||
swapl (&scratch.resource_base, n);
|
swapl(&scratch.resource_mask);
|
||||||
swapl (&scratch.resource_mask, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient (client, sz_xXResClient, (char *) &scratch);
|
WriteToClient (client, sz_xXResClient, (char *) &scratch);
|
||||||
}
|
}
|
||||||
|
|
@ -147,10 +144,9 @@ ProcXResQueryClientResources (ClientPtr client)
|
||||||
rep.num_types = num_types;
|
rep.num_types = num_types;
|
||||||
rep.length = bytes_to_int32(rep.num_types * sz_xXResType);
|
rep.length = bytes_to_int32(rep.num_types * sz_xXResType);
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps (&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.num_types);
|
||||||
swapl (&rep.num_types, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient (client,sizeof(xXResQueryClientResourcesReply),(char*)&rep);
|
WriteToClient (client,sizeof(xXResQueryClientResourcesReply),(char*)&rep);
|
||||||
|
|
@ -174,9 +170,8 @@ ProcXResQueryClientResources (ClientPtr client)
|
||||||
scratch.count = counts[i];
|
scratch.count = counts[i];
|
||||||
|
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
int n;
|
swapl(&scratch.resource_type);
|
||||||
swapl (&scratch.resource_type, n);
|
swapl(&scratch.count);
|
||||||
swapl (&scratch.count, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient (client, sz_xXResType, (char *) &scratch);
|
WriteToClient (client, sz_xXResType, (char *) &scratch);
|
||||||
}
|
}
|
||||||
|
|
@ -287,11 +282,10 @@ ProcXResQueryClientPixmapBytes (ClientPtr client)
|
||||||
rep.bytes_overflow = 0;
|
rep.bytes_overflow = 0;
|
||||||
#endif
|
#endif
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps (&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.bytes);
|
||||||
swapl (&rep.bytes, n);
|
swapl(&rep.bytes_overflow);
|
||||||
swapl (&rep.bytes_overflow, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),(char*)&rep);
|
WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),(char*)&rep);
|
||||||
|
|
||||||
|
|
@ -321,11 +315,9 @@ static int
|
||||||
SProcXResQueryVersion (ClientPtr client)
|
SProcXResQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXResQueryVersionReq);
|
REQUEST(xXResQueryVersionReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xXResQueryVersionReq);
|
REQUEST_SIZE_MATCH (xXResQueryVersionReq);
|
||||||
swaps(&stuff->client_major,n);
|
swaps(&stuff->client_major);
|
||||||
swaps(&stuff->client_minor,n);
|
swaps(&stuff->client_minor);
|
||||||
return ProcXResQueryVersion(client);
|
return ProcXResQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -333,10 +325,8 @@ static int
|
||||||
SProcXResQueryClientResources (ClientPtr client)
|
SProcXResQueryClientResources (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXResQueryClientResourcesReq);
|
REQUEST(xXResQueryClientResourcesReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xXResQueryClientResourcesReq);
|
REQUEST_SIZE_MATCH (xXResQueryClientResourcesReq);
|
||||||
swaps(&stuff->xid,n);
|
swaps(&stuff->xid);
|
||||||
return ProcXResQueryClientResources(client);
|
return ProcXResQueryClientResources(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -344,10 +334,8 @@ static int
|
||||||
SProcXResQueryClientPixmapBytes (ClientPtr client)
|
SProcXResQueryClientPixmapBytes (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXResQueryClientPixmapBytesReq);
|
REQUEST(xXResQueryClientPixmapBytesReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH (xXResQueryClientPixmapBytesReq);
|
REQUEST_SIZE_MATCH (xXResQueryClientPixmapBytesReq);
|
||||||
swaps(&stuff->xid,n);
|
swaps(&stuff->xid);
|
||||||
return ProcXResQueryClientPixmapBytes(client);
|
return ProcXResQueryClientPixmapBytes(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -355,9 +343,7 @@ static int
|
||||||
SProcResDispatch (ClientPtr client)
|
SProcResDispatch (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
int n;
|
swaps(&stuff->length);
|
||||||
|
|
||||||
swaps(&stuff->length,n);
|
|
||||||
|
|
||||||
switch (stuff->data) {
|
switch (stuff->data) {
|
||||||
case X_XResQueryVersion:
|
case X_XResQueryVersion:
|
||||||
|
|
|
||||||
|
|
@ -71,11 +71,10 @@ ProcSELinuxQueryVersion(ClientPtr client)
|
||||||
rep.server_major = SELINUX_MAJOR_VERSION;
|
rep.server_major = SELINUX_MAJOR_VERSION;
|
||||||
rep.server_minor = SELINUX_MINOR_VERSION;
|
rep.server_minor = SELINUX_MINOR_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swaps(&rep.server_major);
|
||||||
swaps(&rep.server_major, n);
|
swaps(&rep.server_minor);
|
||||||
swaps(&rep.server_minor, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(rep), (char *)&rep);
|
WriteToClient(client, sizeof(rep), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -100,10 +99,9 @@ SELinuxSendContextReply(ClientPtr client, security_id_t sid)
|
||||||
rep.context_len = len;
|
rep.context_len = len;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.context_len);
|
||||||
swapl(&rep.context_len, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep);
|
WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep);
|
||||||
|
|
@ -353,17 +351,17 @@ SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
|
||||||
for (k = 0; k < count; k++) {
|
for (k = 0; k < count; k++) {
|
||||||
buf[pos] = items[k].id;
|
buf[pos] = items[k].id;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl(buf + pos, n);
|
swapl(buf + pos);
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
buf[pos] = items[k].octx_len * 4;
|
buf[pos] = items[k].octx_len * 4;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl(buf + pos, n);
|
swapl(buf + pos);
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
buf[pos] = items[k].dctx_len * 4;
|
buf[pos] = items[k].dctx_len * 4;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl(buf + pos, n);
|
swapl(buf + pos);
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
memcpy((char *)(buf + pos), items[k].octx, strlen(items[k].octx) + 1);
|
memcpy((char *)(buf + pos), items[k].octx, strlen(items[k].octx) + 1);
|
||||||
|
|
@ -379,9 +377,9 @@ SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
|
||||||
rep.count = count;
|
rep.count = count;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.count, n);
|
swapl(&rep.count);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(SELinuxListItemsReply), (char *)&rep);
|
WriteToClient(client, sizeof(SELinuxListItemsReply), (char *)&rep);
|
||||||
|
|
@ -529,11 +527,10 @@ static int
|
||||||
SProcSELinuxQueryVersion(ClientPtr client)
|
SProcSELinuxQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(SELinuxQueryVersionReq);
|
REQUEST(SELinuxQueryVersionReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(SELinuxQueryVersionReq);
|
REQUEST_SIZE_MATCH(SELinuxQueryVersionReq);
|
||||||
swaps(&stuff->client_major, n);
|
swaps(&stuff->client_major);
|
||||||
swaps(&stuff->client_minor, n);
|
swaps(&stuff->client_minor);
|
||||||
return ProcSELinuxQueryVersion(client);
|
return ProcSELinuxQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -541,10 +538,9 @@ static int
|
||||||
SProcSELinuxSetCreateContext(ClientPtr client, unsigned offset)
|
SProcSELinuxSetCreateContext(ClientPtr client, unsigned offset)
|
||||||
{
|
{
|
||||||
REQUEST(SELinuxSetCreateContextReq);
|
REQUEST(SELinuxSetCreateContextReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq);
|
REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq);
|
||||||
swapl(&stuff->context_len, n);
|
swapl(&stuff->context_len);
|
||||||
return ProcSELinuxSetCreateContext(client, offset);
|
return ProcSELinuxSetCreateContext(client, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -552,11 +548,10 @@ static int
|
||||||
SProcSELinuxSetDeviceContext(ClientPtr client)
|
SProcSELinuxSetDeviceContext(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(SELinuxSetContextReq);
|
REQUEST(SELinuxSetContextReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(SELinuxSetContextReq);
|
REQUEST_AT_LEAST_SIZE(SELinuxSetContextReq);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
swapl(&stuff->context_len, n);
|
swapl(&stuff->context_len);
|
||||||
return ProcSELinuxSetDeviceContext(client);
|
return ProcSELinuxSetDeviceContext(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -564,10 +559,9 @@ static int
|
||||||
SProcSELinuxGetDeviceContext(ClientPtr client)
|
SProcSELinuxGetDeviceContext(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(SELinuxGetContextReq);
|
REQUEST(SELinuxGetContextReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
return ProcSELinuxGetDeviceContext(client);
|
return ProcSELinuxGetDeviceContext(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -575,10 +569,9 @@ static int
|
||||||
SProcSELinuxGetDrawableContext(ClientPtr client)
|
SProcSELinuxGetDrawableContext(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(SELinuxGetContextReq);
|
REQUEST(SELinuxGetContextReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
return ProcSELinuxGetDrawableContext(client);
|
return ProcSELinuxGetDrawableContext(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -586,11 +579,10 @@ static int
|
||||||
SProcSELinuxGetPropertyContext(ClientPtr client, pointer privKey)
|
SProcSELinuxGetPropertyContext(ClientPtr client, pointer privKey)
|
||||||
{
|
{
|
||||||
REQUEST(SELinuxGetPropertyContextReq);
|
REQUEST(SELinuxGetPropertyContextReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq);
|
REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
return ProcSELinuxGetPropertyContext(client, privKey);
|
return ProcSELinuxGetPropertyContext(client, privKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -598,10 +590,9 @@ static int
|
||||||
SProcSELinuxGetSelectionContext(ClientPtr client, pointer privKey)
|
SProcSELinuxGetSelectionContext(ClientPtr client, pointer privKey)
|
||||||
{
|
{
|
||||||
REQUEST(SELinuxGetContextReq);
|
REQUEST(SELinuxGetContextReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
return ProcSELinuxGetSelectionContext(client, privKey);
|
return ProcSELinuxGetSelectionContext(client, privKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -609,10 +600,9 @@ static int
|
||||||
SProcSELinuxListProperties(ClientPtr client)
|
SProcSELinuxListProperties(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(SELinuxGetContextReq);
|
REQUEST(SELinuxGetContextReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
return ProcSELinuxListProperties(client);
|
return ProcSELinuxListProperties(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -620,10 +610,9 @@ static int
|
||||||
SProcSELinuxGetClientContext(ClientPtr client)
|
SProcSELinuxGetClientContext(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(SELinuxGetContextReq);
|
REQUEST(SELinuxGetContextReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
REQUEST_SIZE_MATCH(SELinuxGetContextReq);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
return ProcSELinuxGetClientContext(client);
|
return ProcSELinuxGetClientContext(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -631,9 +620,8 @@ static int
|
||||||
SProcSELinuxDispatch(ClientPtr client)
|
SProcSELinuxDispatch(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
|
|
||||||
switch (stuff->data) {
|
switch (stuff->data) {
|
||||||
case X_SELinuxQueryVersion:
|
case X_SELinuxQueryVersion:
|
||||||
|
|
|
||||||
30
Xext/xtest.c
30
Xext/xtest.c
|
|
@ -91,7 +91,6 @@ static int
|
||||||
ProcXTestGetVersion(ClientPtr client)
|
ProcXTestGetVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
xXTestGetVersionReply rep;
|
xXTestGetVersionReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXTestGetVersionReq);
|
REQUEST_SIZE_MATCH(xXTestGetVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
|
@ -100,8 +99,8 @@ ProcXTestGetVersion(ClientPtr client)
|
||||||
rep.majorVersion = XTestMajorVersion;
|
rep.majorVersion = XTestMajorVersion;
|
||||||
rep.minorVersion = XTestMinorVersion;
|
rep.minorVersion = XTestMinorVersion;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -114,7 +113,7 @@ ProcXTestCompareCursor(ClientPtr client)
|
||||||
xXTestCompareCursorReply rep;
|
xXTestCompareCursorReply rep;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
int n, rc;
|
int rc;
|
||||||
DeviceIntPtr ptr = PickPointer(client);
|
DeviceIntPtr ptr = PickPointer(client);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
|
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
|
||||||
|
|
@ -139,7 +138,7 @@ ProcXTestCompareCursor(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.same = (wCursor(pWin) == pCursor);
|
rep.same = (wCursor(pWin) == pCursor);
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -348,7 +347,7 @@ ProcXTestFakeInput(ClientPtr client)
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
(void) XTestSwapFakeInput(client, (xReq *)stuff);
|
(void) XTestSwapFakeInput(client, (xReq *)stuff);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
}
|
}
|
||||||
ResetCurrentRequest (client);
|
ResetCurrentRequest (client);
|
||||||
client->sequence--;
|
client->sequence--;
|
||||||
|
|
@ -476,25 +475,23 @@ ProcXTestDispatch (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcXTestGetVersion(ClientPtr client)
|
SProcXTestGetVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xXTestGetVersionReq);
|
REQUEST(xXTestGetVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXTestGetVersionReq);
|
REQUEST_SIZE_MATCH(xXTestGetVersionReq);
|
||||||
swaps(&stuff->minorVersion, n);
|
swaps(&stuff->minorVersion);
|
||||||
return ProcXTestGetVersion(client);
|
return ProcXTestGetVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXTestCompareCursor(ClientPtr client)
|
SProcXTestCompareCursor(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xXTestCompareCursorReq);
|
REQUEST(xXTestCompareCursorReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
|
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
swapl(&stuff->cursor, n);
|
swapl(&stuff->cursor);
|
||||||
return ProcXTestCompareCursor(client);
|
return ProcXTestCompareCursor(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -525,10 +522,10 @@ XTestSwapFakeInput(ClientPtr client, xReq *req)
|
||||||
static int
|
static int
|
||||||
SProcXTestFakeInput(ClientPtr client)
|
SProcXTestFakeInput(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
n = XTestSwapFakeInput(client, stuff);
|
n = XTestSwapFakeInput(client, stuff);
|
||||||
if (n != Success)
|
if (n != Success)
|
||||||
return n;
|
return n;
|
||||||
|
|
@ -538,10 +535,9 @@ SProcXTestFakeInput(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcXTestGrabControl(ClientPtr client)
|
SProcXTestGrabControl(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xXTestGrabControlReq);
|
REQUEST(xXTestGrabControlReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXTestGrabControlReq);
|
REQUEST_SIZE_MATCH(xXTestGrabControlReq);
|
||||||
return ProcXTestGrabControl(client);
|
return ProcXTestGrabControl(client);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
407
Xext/xvdisp.c
407
Xext/xvdisp.c
|
|
@ -59,12 +59,10 @@ SWriteQueryExtensionReply(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvQueryExtensionReply *rep
|
xvQueryExtensionReply *rep
|
||||||
){
|
){
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->version);
|
||||||
swapl(&rep->length, n);
|
swaps(&rep->revision);
|
||||||
swaps(&rep->version, n);
|
|
||||||
swaps(&rep->revision, n);
|
|
||||||
|
|
||||||
(void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)rep);
|
(void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)rep);
|
||||||
|
|
||||||
|
|
@ -76,11 +74,9 @@ SWriteQueryAdaptorsReply(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvQueryAdaptorsReply *rep
|
xvQueryAdaptorsReply *rep
|
||||||
){
|
){
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->num_adaptors);
|
||||||
swapl(&rep->length, n);
|
|
||||||
swaps(&rep->num_adaptors, n);
|
|
||||||
|
|
||||||
(void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)rep);
|
(void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)rep);
|
||||||
|
|
||||||
|
|
@ -92,11 +88,9 @@ SWriteQueryEncodingsReply(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvQueryEncodingsReply *rep
|
xvQueryEncodingsReply *rep
|
||||||
){
|
){
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->num_encodings);
|
||||||
swapl(&rep->length, n);
|
|
||||||
swaps(&rep->num_encodings, n);
|
|
||||||
|
|
||||||
(void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)rep);
|
(void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)rep);
|
||||||
|
|
||||||
|
|
@ -108,12 +102,10 @@ SWriteAdaptorInfo(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvAdaptorInfo *pAdaptor
|
xvAdaptorInfo *pAdaptor
|
||||||
){
|
){
|
||||||
char n;
|
swapl(&pAdaptor->base_id);
|
||||||
|
swaps(&pAdaptor->name_size);
|
||||||
swapl(&pAdaptor->base_id, n);
|
swaps(&pAdaptor->num_ports);
|
||||||
swaps(&pAdaptor->name_size, n);
|
swaps(&pAdaptor->num_formats);
|
||||||
swaps(&pAdaptor->num_ports, n);
|
|
||||||
swaps(&pAdaptor->num_formats, n);
|
|
||||||
|
|
||||||
(void)WriteToClient(client, sz_xvAdaptorInfo, (char *)pAdaptor);
|
(void)WriteToClient(client, sz_xvAdaptorInfo, (char *)pAdaptor);
|
||||||
|
|
||||||
|
|
@ -125,14 +117,13 @@ SWriteEncodingInfo(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvEncodingInfo *pEncoding
|
xvEncodingInfo *pEncoding
|
||||||
){
|
){
|
||||||
char n;
|
|
||||||
|
|
||||||
swapl(&pEncoding->encoding, n);
|
swapl(&pEncoding->encoding);
|
||||||
swaps(&pEncoding->name_size, n);
|
swaps(&pEncoding->name_size);
|
||||||
swaps(&pEncoding->width, n);
|
swaps(&pEncoding->width);
|
||||||
swaps(&pEncoding->height, n);
|
swaps(&pEncoding->height);
|
||||||
swapl(&pEncoding->rate.numerator, n);
|
swapl(&pEncoding->rate.numerator);
|
||||||
swapl(&pEncoding->rate.denominator, n);
|
swapl(&pEncoding->rate.denominator);
|
||||||
(void)WriteToClient(client, sz_xvEncodingInfo, (char *)pEncoding);
|
(void)WriteToClient(client, sz_xvEncodingInfo, (char *)pEncoding);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -143,9 +134,7 @@ SWriteFormat(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvFormat *pFormat
|
xvFormat *pFormat
|
||||||
){
|
){
|
||||||
char n;
|
swapl(&pFormat->visual);
|
||||||
|
|
||||||
swapl(&pFormat->visual, n);
|
|
||||||
(void)WriteToClient(client, sz_xvFormat, (char *)pFormat);
|
(void)WriteToClient(client, sz_xvFormat, (char *)pFormat);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -156,12 +145,10 @@ SWriteAttributeInfo(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvAttributeInfo *pAtt
|
xvAttributeInfo *pAtt
|
||||||
){
|
){
|
||||||
char n;
|
swapl(&pAtt->flags);
|
||||||
|
swapl(&pAtt->size);
|
||||||
swapl(&pAtt->flags, n);
|
swapl(&pAtt->min);
|
||||||
swapl(&pAtt->size, n);
|
swapl(&pAtt->max);
|
||||||
swapl(&pAtt->min, n);
|
|
||||||
swapl(&pAtt->max, n);
|
|
||||||
(void)WriteToClient(client, sz_xvAttributeInfo, (char *)pAtt);
|
(void)WriteToClient(client, sz_xvAttributeInfo, (char *)pAtt);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -172,21 +159,19 @@ SWriteImageFormatInfo(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvImageFormatInfo *pImage
|
xvImageFormatInfo *pImage
|
||||||
){
|
){
|
||||||
char n;
|
swapl(&pImage->id);
|
||||||
|
swapl(&pImage->red_mask);
|
||||||
swapl(&pImage->id, n);
|
swapl(&pImage->green_mask);
|
||||||
swapl(&pImage->red_mask, n);
|
swapl(&pImage->blue_mask);
|
||||||
swapl(&pImage->green_mask, n);
|
swapl(&pImage->y_sample_bits);
|
||||||
swapl(&pImage->blue_mask, n);
|
swapl(&pImage->u_sample_bits);
|
||||||
swapl(&pImage->y_sample_bits, n);
|
swapl(&pImage->v_sample_bits);
|
||||||
swapl(&pImage->u_sample_bits, n);
|
swapl(&pImage->horz_y_period);
|
||||||
swapl(&pImage->v_sample_bits, n);
|
swapl(&pImage->horz_u_period);
|
||||||
swapl(&pImage->horz_y_period, n);
|
swapl(&pImage->horz_v_period);
|
||||||
swapl(&pImage->horz_u_period, n);
|
swapl(&pImage->vert_y_period);
|
||||||
swapl(&pImage->horz_v_period, n);
|
swapl(&pImage->vert_u_period);
|
||||||
swapl(&pImage->vert_y_period, n);
|
swapl(&pImage->vert_v_period);
|
||||||
swapl(&pImage->vert_u_period, n);
|
|
||||||
swapl(&pImage->vert_v_period, n);
|
|
||||||
|
|
||||||
(void)WriteToClient(client, sz_xvImageFormatInfo, (char *)pImage);
|
(void)WriteToClient(client, sz_xvImageFormatInfo, (char *)pImage);
|
||||||
|
|
||||||
|
|
@ -198,10 +183,8 @@ SWriteGrabPortReply(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvGrabPortReply *rep
|
xvGrabPortReply *rep
|
||||||
){
|
){
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
|
|
||||||
(void)WriteToClient(client, sz_xvGrabPortReply, (char *)rep);
|
(void)WriteToClient(client, sz_xvGrabPortReply, (char *)rep);
|
||||||
|
|
||||||
|
|
@ -213,11 +196,9 @@ SWriteGetPortAttributeReply(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvGetPortAttributeReply *rep
|
xvGetPortAttributeReply *rep
|
||||||
){
|
){
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->value);
|
||||||
swapl(&rep->length, n);
|
|
||||||
swapl(&rep->value, n);
|
|
||||||
|
|
||||||
(void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)rep);
|
(void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)rep);
|
||||||
|
|
||||||
|
|
@ -229,12 +210,10 @@ SWriteQueryBestSizeReply(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvQueryBestSizeReply *rep
|
xvQueryBestSizeReply *rep
|
||||||
){
|
){
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->actual_width);
|
||||||
swapl(&rep->length, n);
|
swaps(&rep->actual_height);
|
||||||
swaps(&rep->actual_width, n);
|
|
||||||
swaps(&rep->actual_height, n);
|
|
||||||
|
|
||||||
(void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)rep);
|
(void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)rep);
|
||||||
|
|
||||||
|
|
@ -246,12 +225,10 @@ SWriteQueryPortAttributesReply(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvQueryPortAttributesReply *rep
|
xvQueryPortAttributesReply *rep
|
||||||
){
|
){
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->num_attributes);
|
||||||
swapl(&rep->length, n);
|
swapl(&rep->text_size);
|
||||||
swapl(&rep->num_attributes, n);
|
|
||||||
swapl(&rep->text_size, n);
|
|
||||||
|
|
||||||
(void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)rep);
|
(void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)rep);
|
||||||
|
|
||||||
|
|
@ -263,14 +240,12 @@ SWriteQueryImageAttributesReply(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvQueryImageAttributesReply *rep
|
xvQueryImageAttributesReply *rep
|
||||||
){
|
){
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->num_planes);
|
||||||
swapl(&rep->length, n);
|
swapl(&rep->data_size);
|
||||||
swapl(&rep->num_planes, n);
|
swaps(&rep->width);
|
||||||
swapl(&rep->data_size, n);
|
swaps(&rep->height);
|
||||||
swaps(&rep->width, n);
|
|
||||||
swaps(&rep->height, n);
|
|
||||||
|
|
||||||
(void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)rep);
|
(void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)rep);
|
||||||
|
|
||||||
|
|
@ -282,11 +257,9 @@ SWriteListImageFormatsReply(
|
||||||
ClientPtr client,
|
ClientPtr client,
|
||||||
xvListImageFormatsReply *rep
|
xvListImageFormatsReply *rep
|
||||||
){
|
){
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->num_formats);
|
||||||
swapl(&rep->length, n);
|
|
||||||
swapl(&rep->num_formats, n);
|
|
||||||
|
|
||||||
(void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)rep);
|
(void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)rep);
|
||||||
|
|
||||||
|
|
@ -1278,154 +1251,144 @@ ProcXvDispatch(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcXvQueryExtension(ClientPtr client)
|
SProcXvQueryExtension(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvQueryExtensionReq);
|
REQUEST(xvQueryExtensionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return XvProcVector[xv_QueryExtension](client);
|
return XvProcVector[xv_QueryExtension](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvQueryAdaptors(ClientPtr client)
|
SProcXvQueryAdaptors(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvQueryAdaptorsReq);
|
REQUEST(xvQueryAdaptorsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return XvProcVector[xv_QueryAdaptors](client);
|
return XvProcVector[xv_QueryAdaptors](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvQueryEncodings(ClientPtr client)
|
SProcXvQueryEncodings(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvQueryEncodingsReq);
|
REQUEST(xvQueryEncodingsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
return XvProcVector[xv_QueryEncodings](client);
|
return XvProcVector[xv_QueryEncodings](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvGrabPort(ClientPtr client)
|
SProcXvGrabPort(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvGrabPortReq);
|
REQUEST(xvGrabPortReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->time, n);
|
swapl(&stuff->time);
|
||||||
return XvProcVector[xv_GrabPort](client);
|
return XvProcVector[xv_GrabPort](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvUngrabPort(ClientPtr client)
|
SProcXvUngrabPort(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvUngrabPortReq);
|
REQUEST(xvUngrabPortReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->time, n);
|
swapl(&stuff->time);
|
||||||
return XvProcVector[xv_UngrabPort](client);
|
return XvProcVector[xv_UngrabPort](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvPutVideo(ClientPtr client)
|
SProcXvPutVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvPutVideoReq);
|
REQUEST(xvPutVideoReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc, n);
|
swapl(&stuff->gc);
|
||||||
swaps(&stuff->vid_x, n);
|
swaps(&stuff->vid_x);
|
||||||
swaps(&stuff->vid_y, n);
|
swaps(&stuff->vid_y);
|
||||||
swaps(&stuff->vid_w, n);
|
swaps(&stuff->vid_w);
|
||||||
swaps(&stuff->vid_h, n);
|
swaps(&stuff->vid_h);
|
||||||
swaps(&stuff->drw_x, n);
|
swaps(&stuff->drw_x);
|
||||||
swaps(&stuff->drw_y, n);
|
swaps(&stuff->drw_y);
|
||||||
swaps(&stuff->drw_w, n);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h, n);
|
swaps(&stuff->drw_h);
|
||||||
return XvProcVector[xv_PutVideo](client);
|
return XvProcVector[xv_PutVideo](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvPutStill(ClientPtr client)
|
SProcXvPutStill(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvPutStillReq);
|
REQUEST(xvPutStillReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc, n);
|
swapl(&stuff->gc);
|
||||||
swaps(&stuff->vid_x, n);
|
swaps(&stuff->vid_x);
|
||||||
swaps(&stuff->vid_y, n);
|
swaps(&stuff->vid_y);
|
||||||
swaps(&stuff->vid_w, n);
|
swaps(&stuff->vid_w);
|
||||||
swaps(&stuff->vid_h, n);
|
swaps(&stuff->vid_h);
|
||||||
swaps(&stuff->drw_x, n);
|
swaps(&stuff->drw_x);
|
||||||
swaps(&stuff->drw_y, n);
|
swaps(&stuff->drw_y);
|
||||||
swaps(&stuff->drw_w, n);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h, n);
|
swaps(&stuff->drw_h);
|
||||||
return XvProcVector[xv_PutStill](client);
|
return XvProcVector[xv_PutStill](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvGetVideo(ClientPtr client)
|
SProcXvGetVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvGetVideoReq);
|
REQUEST(xvGetVideoReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc, n);
|
swapl(&stuff->gc);
|
||||||
swaps(&stuff->vid_x, n);
|
swaps(&stuff->vid_x);
|
||||||
swaps(&stuff->vid_y, n);
|
swaps(&stuff->vid_y);
|
||||||
swaps(&stuff->vid_w, n);
|
swaps(&stuff->vid_w);
|
||||||
swaps(&stuff->vid_h, n);
|
swaps(&stuff->vid_h);
|
||||||
swaps(&stuff->drw_x, n);
|
swaps(&stuff->drw_x);
|
||||||
swaps(&stuff->drw_y, n);
|
swaps(&stuff->drw_y);
|
||||||
swaps(&stuff->drw_w, n);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h, n);
|
swaps(&stuff->drw_h);
|
||||||
return XvProcVector[xv_GetVideo](client);
|
return XvProcVector[xv_GetVideo](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvGetStill(ClientPtr client)
|
SProcXvGetStill(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvGetStillReq);
|
REQUEST(xvGetStillReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc, n);
|
swapl(&stuff->gc);
|
||||||
swaps(&stuff->vid_x, n);
|
swaps(&stuff->vid_x);
|
||||||
swaps(&stuff->vid_y, n);
|
swaps(&stuff->vid_y);
|
||||||
swaps(&stuff->vid_w, n);
|
swaps(&stuff->vid_w);
|
||||||
swaps(&stuff->vid_h, n);
|
swaps(&stuff->vid_h);
|
||||||
swaps(&stuff->drw_x, n);
|
swaps(&stuff->drw_x);
|
||||||
swaps(&stuff->drw_y, n);
|
swaps(&stuff->drw_y);
|
||||||
swaps(&stuff->drw_w, n);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h, n);
|
swaps(&stuff->drw_h);
|
||||||
return XvProcVector[xv_GetStill](client);
|
return XvProcVector[xv_GetStill](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvPutImage(ClientPtr client)
|
SProcXvPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvPutImageReq);
|
REQUEST(xvPutImageReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc, n);
|
swapl(&stuff->gc);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
swaps(&stuff->src_x, n);
|
swaps(&stuff->src_x);
|
||||||
swaps(&stuff->src_y, n);
|
swaps(&stuff->src_y);
|
||||||
swaps(&stuff->src_w, n);
|
swaps(&stuff->src_w);
|
||||||
swaps(&stuff->src_h, n);
|
swaps(&stuff->src_h);
|
||||||
swaps(&stuff->drw_x, n);
|
swaps(&stuff->drw_x);
|
||||||
swaps(&stuff->drw_y, n);
|
swaps(&stuff->drw_y);
|
||||||
swaps(&stuff->drw_w, n);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h, n);
|
swaps(&stuff->drw_h);
|
||||||
swaps(&stuff->width, n);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height, n);
|
swaps(&stuff->height);
|
||||||
return XvProcVector[xv_PutImage](client);
|
return XvProcVector[xv_PutImage](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1433,25 +1396,24 @@ SProcXvPutImage(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcXvShmPutImage(ClientPtr client)
|
SProcXvShmPutImage(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvShmPutImageReq);
|
REQUEST(xvShmPutImageReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->gc, n);
|
swapl(&stuff->gc);
|
||||||
swapl(&stuff->shmseg, n);
|
swapl(&stuff->shmseg);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
swapl(&stuff->offset, n);
|
swapl(&stuff->offset);
|
||||||
swaps(&stuff->src_x, n);
|
swaps(&stuff->src_x);
|
||||||
swaps(&stuff->src_y, n);
|
swaps(&stuff->src_y);
|
||||||
swaps(&stuff->src_w, n);
|
swaps(&stuff->src_w);
|
||||||
swaps(&stuff->src_h, n);
|
swaps(&stuff->src_h);
|
||||||
swaps(&stuff->drw_x, n);
|
swaps(&stuff->drw_x);
|
||||||
swaps(&stuff->drw_y, n);
|
swaps(&stuff->drw_y);
|
||||||
swaps(&stuff->drw_w, n);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h, n);
|
swaps(&stuff->drw_h);
|
||||||
swaps(&stuff->width, n);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height, n);
|
swaps(&stuff->height);
|
||||||
return XvProcVector[xv_ShmPutImage](client);
|
return XvProcVector[xv_ShmPutImage](client);
|
||||||
}
|
}
|
||||||
#else /* MITSHM */
|
#else /* MITSHM */
|
||||||
|
|
@ -1461,101 +1423,92 @@ SProcXvShmPutImage(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcXvSelectVideoNotify(ClientPtr client)
|
SProcXvSelectVideoNotify(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvSelectVideoNotifyReq);
|
REQUEST(xvSelectVideoNotifyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
return XvProcVector[xv_SelectVideoNotify](client);
|
return XvProcVector[xv_SelectVideoNotify](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvSelectPortNotify(ClientPtr client)
|
SProcXvSelectPortNotify(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvSelectPortNotifyReq);
|
REQUEST(xvSelectPortNotifyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
return XvProcVector[xv_SelectPortNotify](client);
|
return XvProcVector[xv_SelectPortNotify](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvStopVideo(ClientPtr client)
|
SProcXvStopVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvStopVideoReq);
|
REQUEST(xvStopVideoReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
return XvProcVector[xv_StopVideo](client);
|
return XvProcVector[xv_StopVideo](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvSetPortAttribute(ClientPtr client)
|
SProcXvSetPortAttribute(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvSetPortAttributeReq);
|
REQUEST(xvSetPortAttributeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->attribute, n);
|
swapl(&stuff->attribute);
|
||||||
swapl(&stuff->value, n);
|
swapl(&stuff->value);
|
||||||
return XvProcVector[xv_SetPortAttribute](client);
|
return XvProcVector[xv_SetPortAttribute](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvGetPortAttribute(ClientPtr client)
|
SProcXvGetPortAttribute(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvGetPortAttributeReq);
|
REQUEST(xvGetPortAttributeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->attribute, n);
|
swapl(&stuff->attribute);
|
||||||
return XvProcVector[xv_GetPortAttribute](client);
|
return XvProcVector[xv_GetPortAttribute](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvQueryBestSize(ClientPtr client)
|
SProcXvQueryBestSize(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvQueryBestSizeReq);
|
REQUEST(xvQueryBestSizeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swaps(&stuff->vid_w, n);
|
swaps(&stuff->vid_w);
|
||||||
swaps(&stuff->vid_h, n);
|
swaps(&stuff->vid_h);
|
||||||
swaps(&stuff->drw_w, n);
|
swaps(&stuff->drw_w);
|
||||||
swaps(&stuff->drw_h, n);
|
swaps(&stuff->drw_h);
|
||||||
return XvProcVector[xv_QueryBestSize](client);
|
return XvProcVector[xv_QueryBestSize](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvQueryPortAttributes(ClientPtr client)
|
SProcXvQueryPortAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvQueryPortAttributesReq);
|
REQUEST(xvQueryPortAttributesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
return XvProcVector[xv_QueryPortAttributes](client);
|
return XvProcVector[xv_QueryPortAttributes](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvQueryImageAttributes(ClientPtr client)
|
SProcXvQueryImageAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvQueryImageAttributesReq);
|
REQUEST(xvQueryImageAttributesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
swapl(&stuff->id, n);
|
swapl(&stuff->id);
|
||||||
swaps(&stuff->width, n);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height, n);
|
swaps(&stuff->height);
|
||||||
return XvProcVector[xv_QueryImageAttributes](client);
|
return XvProcVector[xv_QueryImageAttributes](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXvListImageFormats(ClientPtr client)
|
SProcXvListImageFormats(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xvListImageFormatsReq);
|
REQUEST(xvListImageFormatsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->port, n);
|
swapl(&stuff->port);
|
||||||
return XvProcVector[xv_ListImageFormats](client);
|
return XvProcVector[xv_ListImageFormats](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,12 +72,10 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXAllowDeviceEvents(ClientPtr client)
|
SProcXAllowDeviceEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xAllowDeviceEventsReq);
|
REQUEST(xAllowDeviceEventsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
|
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
|
||||||
swapl(&stuff->time, n);
|
swapl(&stuff->time);
|
||||||
return (ProcXAllowDeviceEvents(client));
|
return (ProcXAllowDeviceEvents(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
15
Xi/chgdctl.c
15
Xi/chgdctl.c
|
|
@ -74,16 +74,15 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXChangeDeviceControl(ClientPtr client)
|
SProcXChangeDeviceControl(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
xDeviceCtl *ctl;
|
xDeviceCtl *ctl;
|
||||||
|
|
||||||
REQUEST(xChangeDeviceControlReq);
|
REQUEST(xChangeDeviceControlReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
|
REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
|
||||||
swaps(&stuff->control, n);
|
swaps(&stuff->control);
|
||||||
ctl = (xDeviceCtl*)&stuff[1];
|
ctl = (xDeviceCtl*)&stuff[1];
|
||||||
swaps(&ctl->control, n);
|
swaps(&ctl->control);
|
||||||
swaps(&ctl->length, n);
|
swaps(&ctl->length);
|
||||||
switch(stuff->control) {
|
switch(stuff->control) {
|
||||||
case DEVICE_ABS_CALIB:
|
case DEVICE_ABS_CALIB:
|
||||||
case DEVICE_ABS_AREA:
|
case DEVICE_ABS_AREA:
|
||||||
|
|
@ -230,9 +229,7 @@ void
|
||||||
SRepXChangeDeviceControl(ClientPtr client, int size,
|
SRepXChangeDeviceControl(ClientPtr client, int size,
|
||||||
xChangeDeviceControlReply * rep)
|
xChangeDeviceControlReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
52
Xi/chgfctl.c
52
Xi/chgfctl.c
|
|
@ -74,12 +74,10 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXChangeFeedbackControl(ClientPtr client)
|
SProcXChangeFeedbackControl(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xChangeFeedbackControlReq);
|
REQUEST(xChangeFeedbackControlReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
|
REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
|
||||||
swapl(&stuff->mask, n);
|
swapl(&stuff->mask);
|
||||||
return (ProcXChangeFeedbackControl(client));
|
return (ProcXChangeFeedbackControl(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,17 +91,16 @@ static int
|
||||||
ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
KbdFeedbackPtr k, xKbdFeedbackCtl * f)
|
KbdFeedbackPtr k, xKbdFeedbackCtl * f)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
KeybdCtrl kctrl;
|
KeybdCtrl kctrl;
|
||||||
int t;
|
int t;
|
||||||
int key = DO_ALL;
|
int key = DO_ALL;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&f->length, n);
|
swaps(&f->length);
|
||||||
swaps(&f->pitch, n);
|
swaps(&f->pitch);
|
||||||
swaps(&f->duration, n);
|
swaps(&f->duration);
|
||||||
swapl(&f->led_mask, n);
|
swapl(&f->led_mask);
|
||||||
swapl(&f->led_values, n);
|
swapl(&f->led_values);
|
||||||
}
|
}
|
||||||
|
|
||||||
kctrl = k->ctrl;
|
kctrl = k->ctrl;
|
||||||
|
|
@ -210,14 +207,13 @@ static int
|
||||||
ChangePtrFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
ChangePtrFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
PtrFeedbackPtr p, xPtrFeedbackCtl * f)
|
PtrFeedbackPtr p, xPtrFeedbackCtl * f)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
PtrCtrl pctrl; /* might get BadValue part way through */
|
PtrCtrl pctrl; /* might get BadValue part way through */
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&f->length, n);
|
swaps(&f->length);
|
||||||
swaps(&f->num, n);
|
swaps(&f->num);
|
||||||
swaps(&f->denom, n);
|
swaps(&f->denom);
|
||||||
swaps(&f->thresh, n);
|
swaps(&f->thresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
pctrl = p->ctrl;
|
pctrl = p->ctrl;
|
||||||
|
|
@ -276,11 +272,9 @@ ChangeIntegerFeedback(ClientPtr client, DeviceIntPtr dev,
|
||||||
long unsigned int mask, IntegerFeedbackPtr i,
|
long unsigned int mask, IntegerFeedbackPtr i,
|
||||||
xIntegerFeedbackCtl * f)
|
xIntegerFeedbackCtl * f)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&f->length, n);
|
swaps(&f->length);
|
||||||
swapl(&f->int_to_display, n);
|
swapl(&f->int_to_display);
|
||||||
}
|
}
|
||||||
|
|
||||||
i->ctrl.integer_displayed = f->int_to_display;
|
i->ctrl.integer_displayed = f->int_to_display;
|
||||||
|
|
@ -299,13 +293,12 @@ ChangeStringFeedback(ClientPtr client, DeviceIntPtr dev,
|
||||||
long unsigned int mask, StringFeedbackPtr s,
|
long unsigned int mask, StringFeedbackPtr s,
|
||||||
xStringFeedbackCtl * f)
|
xStringFeedbackCtl * f)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
int i, j;
|
int i, j;
|
||||||
KeySym *syms, *sup_syms;
|
KeySym *syms, *sup_syms;
|
||||||
|
|
||||||
syms = (KeySym *) (f + 1);
|
syms = (KeySym *) (f + 1);
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&f->length, n); /* swapped num_keysyms in calling proc */
|
swaps(&f->length); /* swapped num_keysyms in calling proc */
|
||||||
SwapLongs((CARD32 *) syms, f->num_keysyms);
|
SwapLongs((CARD32 *) syms, f->num_keysyms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -339,14 +332,13 @@ ChangeBellFeedback(ClientPtr client, DeviceIntPtr dev,
|
||||||
long unsigned int mask, BellFeedbackPtr b,
|
long unsigned int mask, BellFeedbackPtr b,
|
||||||
xBellFeedbackCtl * f)
|
xBellFeedbackCtl * f)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
int t;
|
int t;
|
||||||
BellCtrl bctrl; /* might get BadValue part way through */
|
BellCtrl bctrl; /* might get BadValue part way through */
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&f->length, n);
|
swaps(&f->length);
|
||||||
swaps(&f->pitch, n);
|
swaps(&f->pitch);
|
||||||
swaps(&f->duration, n);
|
swaps(&f->duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
bctrl = b->ctrl;
|
bctrl = b->ctrl;
|
||||||
|
|
@ -397,13 +389,12 @@ static int
|
||||||
ChangeLedFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
ChangeLedFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
LedFeedbackPtr l, xLedFeedbackCtl * f)
|
LedFeedbackPtr l, xLedFeedbackCtl * f)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
LedCtrl lctrl; /* might get BadValue part way through */
|
LedCtrl lctrl; /* might get BadValue part way through */
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&f->length, n);
|
swaps(&f->length);
|
||||||
swapl(&f->led_values, n);
|
swapl(&f->led_values);
|
||||||
swapl(&f->led_mask, n);
|
swapl(&f->led_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
f->led_mask &= l->ctrl.led_mask; /* set only supported leds */
|
f->led_mask &= l->ctrl.led_mask; /* set only supported leds */
|
||||||
|
|
@ -467,11 +458,10 @@ ProcXChangeFeedbackControl(ClientPtr client)
|
||||||
break;
|
break;
|
||||||
case StringFeedbackClass:
|
case StringFeedbackClass:
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
xStringFeedbackCtl *f = ((xStringFeedbackCtl *) & stuff[1]);
|
xStringFeedbackCtl *f = ((xStringFeedbackCtl *) & stuff[1]);
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&f->num_keysyms, n);
|
swaps(&f->num_keysyms);
|
||||||
}
|
}
|
||||||
if (len != (bytes_to_int32(sizeof(xStringFeedbackCtl)) + f->num_keysyms))
|
if (len != (bytes_to_int32(sizeof(xStringFeedbackCtl)) + f->num_keysyms))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
|
||||||
|
|
@ -75,10 +75,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXChangeKeyboardDevice(ClientPtr client)
|
SProcXChangeKeyboardDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xChangeKeyboardDeviceReq);
|
REQUEST(xChangeKeyboardDeviceReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq);
|
REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq);
|
||||||
return (ProcXChangeKeyboardDevice(client));
|
return (ProcXChangeKeyboardDevice(client));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,11 +72,10 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXChangeDeviceKeyMapping(ClientPtr client)
|
SProcXChangeDeviceKeyMapping(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
|
||||||
REQUEST(xChangeDeviceKeyMappingReq);
|
REQUEST(xChangeDeviceKeyMappingReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq);
|
REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq);
|
||||||
count = stuff->keyCodes * stuff->keySymsPerKeyCode;
|
count = stuff->keyCodes * stuff->keySymsPerKeyCode;
|
||||||
REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32));
|
REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32));
|
||||||
|
|
|
||||||
|
|
@ -74,13 +74,11 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXChangeDeviceDontPropagateList(ClientPtr client)
|
SProcXChangeDeviceDontPropagateList(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xChangeDeviceDontPropagateListReq);
|
REQUEST(xChangeDeviceDontPropagateListReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
|
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
swaps(&stuff->count, n);
|
swaps(&stuff->count);
|
||||||
REQUEST_FIXED_SIZE(xChangeDeviceDontPropagateListReq,
|
REQUEST_FIXED_SIZE(xChangeDeviceDontPropagateListReq,
|
||||||
stuff->count * sizeof(CARD32));
|
stuff->count * sizeof(CARD32));
|
||||||
SwapLongs((CARD32 *) (&stuff[1]), stuff->count);
|
SwapLongs((CARD32 *) (&stuff[1]), stuff->count);
|
||||||
|
|
|
||||||
|
|
@ -77,10 +77,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXChangePointerDevice(ClientPtr client)
|
SProcXChangePointerDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xChangePointerDeviceReq);
|
REQUEST(xChangePointerDeviceReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xChangePointerDeviceReq);
|
REQUEST_SIZE_MATCH(xChangePointerDeviceReq);
|
||||||
return (ProcXChangePointerDevice(client));
|
return (ProcXChangePointerDevice(client));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,10 +73,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXCloseDevice(ClientPtr client)
|
SProcXCloseDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xCloseDeviceReq);
|
REQUEST(xCloseDeviceReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xCloseDeviceReq);
|
REQUEST_SIZE_MATCH(xCloseDeviceReq);
|
||||||
return (ProcXCloseDevice(client));
|
return (ProcXCloseDevice(client));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXDeviceBell(ClientPtr client)
|
SProcXDeviceBell(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xDeviceBellReq);
|
REQUEST(xDeviceBellReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXDeviceBell(client));
|
return (ProcXDeviceBell(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
238
Xi/extinit.c
238
Xi/extinit.c
|
|
@ -533,43 +533,39 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
|
||||||
static void
|
static void
|
||||||
SEventDeviceValuator(deviceValuator * from, deviceValuator * to)
|
SEventDeviceValuator(deviceValuator * from, deviceValuator * to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
int i;
|
int i;
|
||||||
INT32 *ip B32;
|
INT32 *ip B32;
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
swaps(&to->device_state, n);
|
swaps(&to->device_state);
|
||||||
ip = &to->valuator0;
|
ip = &to->valuator0;
|
||||||
for (i = 0; i < 6; i++) {
|
for (i = 0; i < 6; i++) {
|
||||||
swapl((ip + i), n); /* macro - braces are required */
|
swapl(ip + i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SEventFocus(deviceFocus * from, deviceFocus * to)
|
SEventFocus(deviceFocus * from, deviceFocus * to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->time, n);
|
swapl(&to->time);
|
||||||
swapl(&to->window, n);
|
swapl(&to->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SDeviceStateNotifyEvent(deviceStateNotify * from, deviceStateNotify * to)
|
SDeviceStateNotifyEvent(deviceStateNotify * from, deviceStateNotify * to)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char n;
|
|
||||||
INT32 *ip B32;
|
INT32 *ip B32;
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->time, n);
|
swapl(&to->time);
|
||||||
ip = &to->valuator0;
|
ip = &to->valuator0;
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
swapl((ip + i), n); /* macro - braces are required */
|
swapl(ip + i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -577,93 +573,78 @@ static void
|
||||||
SDeviceKeyStateNotifyEvent(deviceKeyStateNotify * from,
|
SDeviceKeyStateNotifyEvent(deviceKeyStateNotify * from,
|
||||||
deviceKeyStateNotify * to)
|
deviceKeyStateNotify * to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SDeviceButtonStateNotifyEvent(deviceButtonStateNotify * from,
|
SDeviceButtonStateNotifyEvent(deviceButtonStateNotify * from,
|
||||||
deviceButtonStateNotify * to)
|
deviceButtonStateNotify * to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SChangeDeviceNotifyEvent(changeDeviceNotify * from, changeDeviceNotify * to)
|
SChangeDeviceNotifyEvent(changeDeviceNotify * from, changeDeviceNotify * to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->time, n);
|
swapl(&to->time);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to)
|
SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->time, n);
|
swapl(&to->time);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to)
|
SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
swaps(&to->sequenceNumber,n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->time, n);
|
swapl(&to->time);
|
||||||
swaps(&to->control, n);
|
swaps(&to->control);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SDevicePropertyNotifyEvent (devicePropertyNotify *from, devicePropertyNotify *to)
|
SDevicePropertyNotifyEvent (devicePropertyNotify *from, devicePropertyNotify *to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
swaps(&to->sequenceNumber,n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->time, n);
|
swapl(&to->time);
|
||||||
swapl(&to->atom, n);
|
swapl(&to->atom);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SDeviceLeaveNotifyEvent (xXILeaveEvent *from, xXILeaveEvent *to)
|
SDeviceLeaveNotifyEvent (xXILeaveEvent *from, xXILeaveEvent *to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
swaps(&to->sequenceNumber,n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->length, n);
|
swapl(&to->length);
|
||||||
swaps(&to->evtype, n);
|
swaps(&to->evtype);
|
||||||
swaps(&to->deviceid, n);
|
swaps(&to->deviceid);
|
||||||
swapl(&to->time, n);
|
swapl(&to->time);
|
||||||
swapl(&to->root, n);
|
swapl(&to->root);
|
||||||
swapl(&to->event, n);
|
swapl(&to->event);
|
||||||
swapl(&to->child, n);
|
swapl(&to->child);
|
||||||
swapl(&to->root_x, n);
|
swapl(&to->root_x);
|
||||||
swapl(&to->root_y, n);
|
swapl(&to->root_y);
|
||||||
swapl(&to->event_x, n);
|
swapl(&to->event_x);
|
||||||
swapl(&to->event_y, n);
|
swapl(&to->event_y);
|
||||||
swaps(&to->sourceid, n);
|
swaps(&to->sourceid);
|
||||||
swaps(&to->buttons_len, n);
|
swaps(&to->buttons_len);
|
||||||
swapl(&to->mods.base_mods, n);
|
swapl(&to->mods.base_mods);
|
||||||
swapl(&to->mods.latched_mods, n);
|
swapl(&to->mods.latched_mods);
|
||||||
swapl(&to->mods.locked_mods, n);
|
swapl(&to->mods.locked_mods);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SDeviceChangedEvent(xXIDeviceChangedEvent* from, xXIDeviceChangedEvent* to)
|
SDeviceChangedEvent(xXIDeviceChangedEvent* from, xXIDeviceChangedEvent* to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
int i, j;
|
int i, j;
|
||||||
xXIAnyInfo *any;
|
xXIAnyInfo *any;
|
||||||
|
|
||||||
|
|
@ -682,8 +663,8 @@ SDeviceChangedEvent(xXIDeviceChangedEvent* from, xXIDeviceChangedEvent* to)
|
||||||
xXIKeyInfo *ki = (xXIKeyInfo*)any;
|
xXIKeyInfo *ki = (xXIKeyInfo*)any;
|
||||||
uint32_t *key = (uint32_t*)&ki[1];
|
uint32_t *key = (uint32_t*)&ki[1];
|
||||||
for (j = 0; j < ki->num_keycodes; j++, key++)
|
for (j = 0; j < ki->num_keycodes; j++, key++)
|
||||||
swapl(key, n);
|
swapl(key);
|
||||||
swaps(&ki->num_keycodes, n);
|
swaps(&ki->num_keycodes);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ButtonClass:
|
case ButtonClass:
|
||||||
|
|
@ -692,71 +673,70 @@ SDeviceChangedEvent(xXIDeviceChangedEvent* from, xXIDeviceChangedEvent* to)
|
||||||
Atom *labels = (Atom*)((char*)bi + sizeof(xXIButtonInfo) +
|
Atom *labels = (Atom*)((char*)bi + sizeof(xXIButtonInfo) +
|
||||||
pad_to_int32(bits_to_bytes(bi->num_buttons)));
|
pad_to_int32(bits_to_bytes(bi->num_buttons)));
|
||||||
for (j = 0; j < bi->num_buttons; j++)
|
for (j = 0; j < bi->num_buttons; j++)
|
||||||
swapl(&labels[j], n);
|
swapl(&labels[j]);
|
||||||
swaps(&bi->num_buttons, n);
|
swaps(&bi->num_buttons);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ValuatorClass:
|
case ValuatorClass:
|
||||||
{
|
{
|
||||||
xXIValuatorInfo* ai = (xXIValuatorInfo*)any;
|
xXIValuatorInfo* ai = (xXIValuatorInfo*)any;
|
||||||
swapl(&ai->label, n);
|
swapl(&ai->label);
|
||||||
swapl(&ai->min.integral, n);
|
swapl(&ai->min.integral);
|
||||||
swapl(&ai->min.frac, n);
|
swapl(&ai->min.frac);
|
||||||
swapl(&ai->max.integral, n);
|
swapl(&ai->max.integral);
|
||||||
swapl(&ai->max.frac, n);
|
swapl(&ai->max.frac);
|
||||||
swapl(&ai->resolution, n);
|
swapl(&ai->resolution);
|
||||||
swaps(&ai->number, n);
|
swaps(&ai->number);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
swaps(&any->type, n);
|
swaps(&any->type);
|
||||||
swaps(&any->length, n);
|
swaps(&any->length);
|
||||||
swaps(&any->sourceid, n);
|
swaps(&any->sourceid);
|
||||||
|
|
||||||
any = (xXIAnyInfo*)((char*)any + length * 4);
|
any = (xXIAnyInfo*)((char*)any + length * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->length, n);
|
swapl(&to->length);
|
||||||
swaps(&to->evtype, n);
|
swaps(&to->evtype);
|
||||||
swaps(&to->deviceid, n);
|
swaps(&to->deviceid);
|
||||||
swapl(&to->time, n);
|
swapl(&to->time);
|
||||||
swaps(&to->num_classes, n);
|
swaps(&to->num_classes);
|
||||||
swaps(&to->sourceid, n);
|
swaps(&to->sourceid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SDeviceEvent(xXIDeviceEvent *from, xXIDeviceEvent *to)
|
static void SDeviceEvent(xXIDeviceEvent *from, xXIDeviceEvent *to)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char n;
|
|
||||||
char *ptr;
|
char *ptr;
|
||||||
char *vmask;
|
char *vmask;
|
||||||
|
|
||||||
memcpy(to, from, sizeof(xEvent) + from->length * 4);
|
memcpy(to, from, sizeof(xEvent) + from->length * 4);
|
||||||
|
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->length, n);
|
swapl(&to->length);
|
||||||
swaps(&to->evtype, n);
|
swaps(&to->evtype);
|
||||||
swaps(&to->deviceid, n);
|
swaps(&to->deviceid);
|
||||||
swapl(&to->time, n);
|
swapl(&to->time);
|
||||||
swapl(&to->detail, n);
|
swapl(&to->detail);
|
||||||
swapl(&to->root, n);
|
swapl(&to->root);
|
||||||
swapl(&to->event, n);
|
swapl(&to->event);
|
||||||
swapl(&to->child, n);
|
swapl(&to->child);
|
||||||
swapl(&to->root_x, n);
|
swapl(&to->root_x);
|
||||||
swapl(&to->root_y, n);
|
swapl(&to->root_y);
|
||||||
swapl(&to->event_x, n);
|
swapl(&to->event_x);
|
||||||
swapl(&to->event_y, n);
|
swapl(&to->event_y);
|
||||||
swaps(&to->buttons_len, n);
|
swaps(&to->buttons_len);
|
||||||
swaps(&to->valuators_len, n);
|
swaps(&to->valuators_len);
|
||||||
swaps(&to->sourceid, n);
|
swaps(&to->sourceid);
|
||||||
swapl(&to->mods.base_mods, n);
|
swapl(&to->mods.base_mods);
|
||||||
swapl(&to->mods.latched_mods, n);
|
swapl(&to->mods.latched_mods);
|
||||||
swapl(&to->mods.locked_mods, n);
|
swapl(&to->mods.locked_mods);
|
||||||
swapl(&to->mods.effective_mods, n);
|
swapl(&to->mods.effective_mods);
|
||||||
swapl(&to->flags, n);
|
swapl(&to->flags);
|
||||||
|
|
||||||
ptr = (char*)(&to[1]);
|
ptr = (char*)(&to[1]);
|
||||||
ptr += from->buttons_len * 4;
|
ptr += from->buttons_len * 4;
|
||||||
|
|
@ -766,9 +746,9 @@ static void SDeviceEvent(xXIDeviceEvent *from, xXIDeviceEvent *to)
|
||||||
{
|
{
|
||||||
if (BitIsOn(vmask, i))
|
if (BitIsOn(vmask, i))
|
||||||
{
|
{
|
||||||
swapl(((uint32_t*)ptr), n);
|
swapl(((uint32_t *)ptr));
|
||||||
ptr += 4;
|
ptr += 4;
|
||||||
swapl(((uint32_t*)ptr), n);
|
swapl(((uint32_t *)ptr));
|
||||||
ptr += 4;
|
ptr += 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -778,55 +758,51 @@ static void SDeviceHierarchyEvent(xXIHierarchyEvent *from,
|
||||||
xXIHierarchyEvent *to)
|
xXIHierarchyEvent *to)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char n;
|
|
||||||
xXIHierarchyInfo *info;
|
xXIHierarchyInfo *info;
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
memcpy(&to[1], &from[1], from->length * 4);
|
memcpy(&to[1], &from[1], from->length * 4);
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->length, n);
|
swapl(&to->length);
|
||||||
swaps(&to->evtype, n);
|
swaps(&to->evtype);
|
||||||
swaps(&to->deviceid, n);
|
swaps(&to->deviceid);
|
||||||
swapl(&to->time, n);
|
swapl(&to->time);
|
||||||
swapl(&to->flags, n);
|
swapl(&to->flags);
|
||||||
swaps(&to->num_info, n);
|
swaps(&to->num_info);
|
||||||
|
|
||||||
info = (xXIHierarchyInfo*)&to[1];
|
info = (xXIHierarchyInfo*)&to[1];
|
||||||
for (i = 0; i< from->num_info; i++)
|
for (i = 0; i< from->num_info; i++)
|
||||||
{
|
{
|
||||||
swaps(&info->deviceid, n);
|
swaps(&info->deviceid);
|
||||||
swaps(&info->attachment, n);
|
swaps(&info->attachment);
|
||||||
info++;
|
info++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SXIPropertyEvent(xXIPropertyEvent *from, xXIPropertyEvent *to)
|
static void SXIPropertyEvent(xXIPropertyEvent *from, xXIPropertyEvent *to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
*to = *from;
|
*to = *from;
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->length, n);
|
swapl(&to->length);
|
||||||
swaps(&to->evtype, n);
|
swaps(&to->evtype);
|
||||||
swaps(&to->deviceid, n);
|
swaps(&to->deviceid);
|
||||||
swapl(&to->property, n);
|
swapl(&to->property);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SRawEvent(xXIRawEvent *from, xXIRawEvent *to)
|
static void SRawEvent(xXIRawEvent *from, xXIRawEvent *to)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
int i;
|
int i;
|
||||||
FP3232 *values;
|
FP3232 *values;
|
||||||
unsigned char *mask;
|
unsigned char *mask;
|
||||||
|
|
||||||
memcpy(to, from, sizeof(xEvent) + from->length * 4);
|
memcpy(to, from, sizeof(xEvent) + from->length * 4);
|
||||||
|
|
||||||
swaps(&to->sequenceNumber, n);
|
swaps(&to->sequenceNumber);
|
||||||
swapl(&to->length, n);
|
swapl(&to->length);
|
||||||
swaps(&to->evtype, n);
|
swaps(&to->evtype);
|
||||||
swaps(&to->deviceid, n);
|
swaps(&to->deviceid);
|
||||||
swapl(&to->time, n);
|
swapl(&to->time);
|
||||||
swapl(&to->detail, n);
|
swapl(&to->detail);
|
||||||
|
|
||||||
|
|
||||||
mask = (unsigned char*)&to[1];
|
mask = (unsigned char*)&to[1];
|
||||||
|
|
@ -841,16 +817,16 @@ static void SRawEvent(xXIRawEvent *from, xXIRawEvent *to)
|
||||||
* they were in aAbBcC order because it's easier and really
|
* they were in aAbBcC order because it's easier and really
|
||||||
* doesn't matter.
|
* doesn't matter.
|
||||||
*/
|
*/
|
||||||
swapl(&values->integral, n);
|
swapl(&values->integral);
|
||||||
swapl(&values->frac, n);
|
swapl(&values->frac);
|
||||||
values++;
|
values++;
|
||||||
swapl(&values->integral, n);
|
swapl(&values->integral);
|
||||||
swapl(&values->frac, n);
|
swapl(&values->frac);
|
||||||
values++;
|
values++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
swaps(&to->valuators_len, n);
|
swaps(&to->valuators_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
10
Xi/getbmap.c
10
Xi/getbmap.c
|
|
@ -70,10 +70,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXGetDeviceButtonMapping(ClientPtr client)
|
SProcXGetDeviceButtonMapping(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGetDeviceButtonMappingReq);
|
REQUEST(xGetDeviceButtonMappingReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXGetDeviceButtonMapping(client));
|
return (ProcXGetDeviceButtonMapping(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -126,9 +124,7 @@ void
|
||||||
SRepXGetDeviceButtonMapping(ClientPtr client, int size,
|
SRepXGetDeviceButtonMapping(ClientPtr client, int size,
|
||||||
xGetDeviceButtonMappingReply * rep)
|
xGetDeviceButtonMappingReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
35
Xi/getdctl.c
35
Xi/getdctl.c
|
|
@ -71,12 +71,10 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXGetDeviceControl(ClientPtr client)
|
SProcXGetDeviceControl(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGetDeviceControlReq);
|
REQUEST(xGetDeviceControlReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xGetDeviceControlReq);
|
REQUEST_SIZE_MATCH(xGetDeviceControlReq);
|
||||||
swaps(&stuff->control, n);
|
swaps(&stuff->control);
|
||||||
return (ProcXGetDeviceControl(client));
|
return (ProcXGetDeviceControl(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -90,7 +88,6 @@ static void
|
||||||
CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf,
|
CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf,
|
||||||
int length)
|
int length)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
AxisInfoPtr a;
|
AxisInfoPtr a;
|
||||||
xDeviceResolutionState *r;
|
xDeviceResolutionState *r;
|
||||||
int i, *iptr;
|
int i, *iptr;
|
||||||
|
|
@ -108,19 +105,18 @@ CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf,
|
||||||
for (i = 0, a = v->axes; i < v->numAxes; i++, a++)
|
for (i = 0, a = v->axes; i < v->numAxes; i++, a++)
|
||||||
*iptr++ = a->max_resolution;
|
*iptr++ = a->max_resolution;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&r->control, n);
|
swaps(&r->control);
|
||||||
swaps(&r->length, n);
|
swaps(&r->length);
|
||||||
swapl(&r->num_valuators, n);
|
swapl(&r->num_valuators);
|
||||||
iptr = (int *)buf;
|
iptr = (int *)buf;
|
||||||
for (i = 0; i < (3 * v->numAxes); i++, iptr++) {
|
for (i = 0; i < (3 * v->numAxes); i++, iptr++) {
|
||||||
swapl(iptr, n);
|
swapl(iptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf)
|
static void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
xDeviceCoreState *c = (xDeviceCoreState *) buf;
|
xDeviceCoreState *c = (xDeviceCoreState *) buf;
|
||||||
|
|
||||||
c->control = DEVICE_CORE;
|
c->control = DEVICE_CORE;
|
||||||
|
|
@ -129,15 +125,14 @@ static void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf)
|
||||||
c->iscore = (dev == inputInfo.keyboard || dev == inputInfo.pointer);
|
c->iscore = (dev == inputInfo.keyboard || dev == inputInfo.pointer);
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&c->control, n);
|
swaps(&c->control);
|
||||||
swaps(&c->length, n);
|
swaps(&c->length);
|
||||||
swaps(&c->status, n);
|
swaps(&c->status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf)
|
static void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
xDeviceEnableState *e = (xDeviceEnableState *) buf;
|
xDeviceEnableState *e = (xDeviceEnableState *) buf;
|
||||||
|
|
||||||
e->control = DEVICE_ENABLE;
|
e->control = DEVICE_ENABLE;
|
||||||
|
|
@ -145,9 +140,9 @@ static void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf)
|
||||||
e->enable = dev->enabled;
|
e->enable = dev->enabled;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&e->control, n);
|
swaps(&e->control);
|
||||||
swaps(&e->length, n);
|
swaps(&e->length);
|
||||||
swaps(&e->enable, n);
|
swaps(&e->enable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -161,10 +156,8 @@ static void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf)
|
||||||
void
|
void
|
||||||
SRepXGetDeviceControl(ClientPtr client, int size, xGetDeviceControlReply * rep)
|
SRepXGetDeviceControl(ClientPtr client, int size, xGetDeviceControlReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
64
Xi/getfctl.c
64
Xi/getfctl.c
|
|
@ -71,10 +71,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXGetFeedbackControl(ClientPtr client)
|
SProcXGetFeedbackControl(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGetFeedbackControlReq);
|
REQUEST(xGetFeedbackControlReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXGetFeedbackControl(client));
|
return (ProcXGetFeedbackControl(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -88,7 +86,6 @@ static void
|
||||||
CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf)
|
CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char n;
|
|
||||||
xKbdFeedbackState *k2;
|
xKbdFeedbackState *k2;
|
||||||
|
|
||||||
k2 = (xKbdFeedbackState *) * buf;
|
k2 = (xKbdFeedbackState *) * buf;
|
||||||
|
|
@ -104,11 +101,11 @@ CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf)
|
||||||
for (i = 0; i < 32; i++)
|
for (i = 0; i < 32; i++)
|
||||||
k2->auto_repeats[i] = k->ctrl.autoRepeats[i];
|
k2->auto_repeats[i] = k->ctrl.autoRepeats[i];
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&k2->length, n);
|
swaps(&k2->length);
|
||||||
swaps(&k2->pitch, n);
|
swaps(&k2->pitch);
|
||||||
swaps(&k2->duration, n);
|
swaps(&k2->duration);
|
||||||
swapl(&k2->led_mask, n);
|
swapl(&k2->led_mask);
|
||||||
swapl(&k2->led_values, n);
|
swapl(&k2->led_values);
|
||||||
}
|
}
|
||||||
*buf += sizeof(xKbdFeedbackState);
|
*buf += sizeof(xKbdFeedbackState);
|
||||||
}
|
}
|
||||||
|
|
@ -122,7 +119,6 @@ CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf)
|
||||||
static void
|
static void
|
||||||
CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf)
|
CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
xPtrFeedbackState *p2;
|
xPtrFeedbackState *p2;
|
||||||
|
|
||||||
p2 = (xPtrFeedbackState *) * buf;
|
p2 = (xPtrFeedbackState *) * buf;
|
||||||
|
|
@ -133,10 +129,10 @@ CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf)
|
||||||
p2->accelDenom = p->ctrl.den;
|
p2->accelDenom = p->ctrl.den;
|
||||||
p2->threshold = p->ctrl.threshold;
|
p2->threshold = p->ctrl.threshold;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&p2->length, n);
|
swaps(&p2->length);
|
||||||
swaps(&p2->accelNum, n);
|
swaps(&p2->accelNum);
|
||||||
swaps(&p2->accelDenom, n);
|
swaps(&p2->accelDenom);
|
||||||
swaps(&p2->threshold, n);
|
swaps(&p2->threshold);
|
||||||
}
|
}
|
||||||
*buf += sizeof(xPtrFeedbackState);
|
*buf += sizeof(xPtrFeedbackState);
|
||||||
}
|
}
|
||||||
|
|
@ -150,7 +146,6 @@ CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf)
|
||||||
static void
|
static void
|
||||||
CopySwapIntegerFeedback(ClientPtr client, IntegerFeedbackPtr i, char **buf)
|
CopySwapIntegerFeedback(ClientPtr client, IntegerFeedbackPtr i, char **buf)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
xIntegerFeedbackState *i2;
|
xIntegerFeedbackState *i2;
|
||||||
|
|
||||||
i2 = (xIntegerFeedbackState *) * buf;
|
i2 = (xIntegerFeedbackState *) * buf;
|
||||||
|
|
@ -161,10 +156,10 @@ CopySwapIntegerFeedback(ClientPtr client, IntegerFeedbackPtr i, char **buf)
|
||||||
i2->min_value = i->ctrl.min_value;
|
i2->min_value = i->ctrl.min_value;
|
||||||
i2->max_value = i->ctrl.max_value;
|
i2->max_value = i->ctrl.max_value;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&i2->length, n);
|
swaps(&i2->length);
|
||||||
swapl(&i2->resolution, n);
|
swapl(&i2->resolution);
|
||||||
swapl(&i2->min_value, n);
|
swapl(&i2->min_value);
|
||||||
swapl(&i2->max_value, n);
|
swapl(&i2->max_value);
|
||||||
}
|
}
|
||||||
*buf += sizeof(xIntegerFeedbackState);
|
*buf += sizeof(xIntegerFeedbackState);
|
||||||
}
|
}
|
||||||
|
|
@ -179,7 +174,6 @@ static void
|
||||||
CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf)
|
CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char n;
|
|
||||||
xStringFeedbackState *s2;
|
xStringFeedbackState *s2;
|
||||||
KeySym *kptr;
|
KeySym *kptr;
|
||||||
|
|
||||||
|
|
@ -195,12 +189,12 @@ CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf)
|
||||||
for (i = 0; i < s->ctrl.num_symbols_supported; i++)
|
for (i = 0; i < s->ctrl.num_symbols_supported; i++)
|
||||||
*kptr++ = *(s->ctrl.symbols_supported + i);
|
*kptr++ = *(s->ctrl.symbols_supported + i);
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&s2->length, n);
|
swaps(&s2->length);
|
||||||
swaps(&s2->max_symbols, n);
|
swaps(&s2->max_symbols);
|
||||||
swaps(&s2->num_syms_supported, n);
|
swaps(&s2->num_syms_supported);
|
||||||
kptr = (KeySym *) (*buf);
|
kptr = (KeySym *) (*buf);
|
||||||
for (i = 0; i < s->ctrl.num_symbols_supported; i++, kptr++) {
|
for (i = 0; i < s->ctrl.num_symbols_supported; i++, kptr++) {
|
||||||
swapl(kptr, n);
|
swapl(kptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*buf += (s->ctrl.num_symbols_supported * sizeof(KeySym));
|
*buf += (s->ctrl.num_symbols_supported * sizeof(KeySym));
|
||||||
|
|
@ -215,7 +209,6 @@ CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf)
|
||||||
static void
|
static void
|
||||||
CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf)
|
CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
xLedFeedbackState *l2;
|
xLedFeedbackState *l2;
|
||||||
|
|
||||||
l2 = (xLedFeedbackState *) * buf;
|
l2 = (xLedFeedbackState *) * buf;
|
||||||
|
|
@ -225,9 +218,9 @@ CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf)
|
||||||
l2->led_values = l->ctrl.led_values;
|
l2->led_values = l->ctrl.led_values;
|
||||||
l2->led_mask = l->ctrl.led_mask;
|
l2->led_mask = l->ctrl.led_mask;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&l2->length, n);
|
swaps(&l2->length);
|
||||||
swapl(&l2->led_values, n);
|
swapl(&l2->led_values);
|
||||||
swapl(&l2->led_mask, n);
|
swapl(&l2->led_mask);
|
||||||
}
|
}
|
||||||
*buf += sizeof(xLedFeedbackState);
|
*buf += sizeof(xLedFeedbackState);
|
||||||
}
|
}
|
||||||
|
|
@ -241,7 +234,6 @@ CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf)
|
||||||
static void
|
static void
|
||||||
CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf)
|
CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
xBellFeedbackState *b2;
|
xBellFeedbackState *b2;
|
||||||
|
|
||||||
b2 = (xBellFeedbackState *) * buf;
|
b2 = (xBellFeedbackState *) * buf;
|
||||||
|
|
@ -252,9 +244,9 @@ CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf)
|
||||||
b2->pitch = b->ctrl.pitch;
|
b2->pitch = b->ctrl.pitch;
|
||||||
b2->duration = b->ctrl.duration;
|
b2->duration = b->ctrl.duration;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&b2->length, n);
|
swaps(&b2->length);
|
||||||
swaps(&b2->pitch, n);
|
swaps(&b2->pitch);
|
||||||
swaps(&b2->duration, n);
|
swaps(&b2->duration);
|
||||||
}
|
}
|
||||||
*buf += sizeof(xBellFeedbackState);
|
*buf += sizeof(xBellFeedbackState);
|
||||||
}
|
}
|
||||||
|
|
@ -270,11 +262,9 @@ void
|
||||||
SRepXGetFeedbackControl(ClientPtr client, int size,
|
SRepXGetFeedbackControl(ClientPtr client, int size,
|
||||||
xGetFeedbackControlReply * rep)
|
xGetFeedbackControlReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->num_feedbacks);
|
||||||
swapl(&rep->length, n);
|
|
||||||
swaps(&rep->num_feedbacks, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXGetDeviceFocus(ClientPtr client)
|
SProcXGetDeviceFocus(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGetDeviceFocusReq);
|
REQUEST(xGetDeviceFocusReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXGetDeviceFocus(client));
|
return (ProcXGetDeviceFocus(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -133,11 +131,9 @@ ProcXGetDeviceFocus(ClientPtr client)
|
||||||
void
|
void
|
||||||
SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep)
|
SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->focus);
|
||||||
swapl(&rep->length, n);
|
swapl(&rep->time);
|
||||||
swapl(&rep->focus, n);
|
|
||||||
swapl(&rep->time, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
Xi/getkmap.c
10
Xi/getkmap.c
|
|
@ -74,10 +74,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXGetDeviceKeyMapping(ClientPtr client)
|
SProcXGetDeviceKeyMapping(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGetDeviceKeyMappingReq);
|
REQUEST(xGetDeviceKeyMappingReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXGetDeviceKeyMapping(client));
|
return (ProcXGetDeviceKeyMapping(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -150,9 +148,7 @@ void
|
||||||
SRepXGetDeviceKeyMapping(ClientPtr client, int size,
|
SRepXGetDeviceKeyMapping(ClientPtr client, int size,
|
||||||
xGetDeviceKeyMappingReply * rep)
|
xGetDeviceKeyMappingReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
Xi/getmmap.c
10
Xi/getmmap.c
|
|
@ -71,10 +71,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXGetDeviceModifierMapping(ClientPtr client)
|
SProcXGetDeviceModifierMapping(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGetDeviceModifierMappingReq);
|
REQUEST(xGetDeviceModifierMappingReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXGetDeviceModifierMapping(client));
|
return (ProcXGetDeviceModifierMapping(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -129,9 +127,7 @@ void
|
||||||
SRepXGetDeviceModifierMapping(ClientPtr client, int size,
|
SRepXGetDeviceModifierMapping(ClientPtr client, int size,
|
||||||
xGetDeviceModifierMappingReply * rep)
|
xGetDeviceModifierMappingReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
14
Xi/getprop.c
14
Xi/getprop.c
|
|
@ -75,12 +75,10 @@ extern int ExtEventIndex;
|
||||||
int
|
int
|
||||||
SProcXGetDeviceDontPropagateList(ClientPtr client)
|
SProcXGetDeviceDontPropagateList(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGetDeviceDontPropagateListReq);
|
REQUEST(xGetDeviceDontPropagateListReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq);
|
REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (ProcXGetDeviceDontPropagateList(client));
|
return (ProcXGetDeviceDontPropagateList(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -178,10 +176,8 @@ void
|
||||||
SRepXGetDeviceDontPropagateList(ClientPtr client, int size,
|
SRepXGetDeviceDontPropagateList(ClientPtr client, int size,
|
||||||
xGetDeviceDontPropagateListReply * rep)
|
xGetDeviceDontPropagateListReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->count);
|
||||||
swapl(&rep->length, n);
|
|
||||||
swaps(&rep->count, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,12 +73,10 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXGetSelectedExtensionEvents(ClientPtr client)
|
SProcXGetSelectedExtensionEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGetSelectedExtensionEventsReq);
|
REQUEST(xGetSelectedExtensionEventsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq);
|
REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (ProcXGetSelectedExtensionEvents(client));
|
return (ProcXGetSelectedExtensionEvents(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,11 +166,9 @@ void
|
||||||
SRepXGetSelectedExtensionEvents(ClientPtr client, int size,
|
SRepXGetSelectedExtensionEvents(ClientPtr client, int size,
|
||||||
xGetSelectedExtensionEventsReply * rep)
|
xGetSelectedExtensionEventsReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->this_client_count);
|
||||||
swapl(&rep->length, n);
|
swaps(&rep->all_clients_count);
|
||||||
swaps(&rep->this_client_count, n);
|
|
||||||
swaps(&rep->all_clients_count, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
16
Xi/getvers.c
16
Xi/getvers.c
|
|
@ -73,12 +73,10 @@ XExtensionVersion XIVersion;
|
||||||
int
|
int
|
||||||
SProcXGetExtensionVersion(ClientPtr client)
|
SProcXGetExtensionVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGetExtensionVersionReq);
|
REQUEST(xGetExtensionVersionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
|
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
|
||||||
swaps(&stuff->nbytes, n);
|
swaps(&stuff->nbytes);
|
||||||
return (ProcXGetExtensionVersion(client));
|
return (ProcXGetExtensionVersion(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -125,11 +123,9 @@ void
|
||||||
SRepXGetExtensionVersion(ClientPtr client, int size,
|
SRepXGetExtensionVersion(ClientPtr client, int size,
|
||||||
xGetExtensionVersionReply * rep)
|
xGetExtensionVersionReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->major_version);
|
||||||
swapl(&rep->length, n);
|
swaps(&rep->minor_version);
|
||||||
swaps(&rep->major_version, n);
|
|
||||||
swaps(&rep->minor_version, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
16
Xi/grabdev.c
16
Xi/grabdev.c
|
|
@ -75,14 +75,12 @@ extern int ExtEventIndex;
|
||||||
int
|
int
|
||||||
SProcXGrabDevice(ClientPtr client)
|
SProcXGrabDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGrabDeviceReq);
|
REQUEST(xGrabDeviceReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
||||||
swapl(&stuff->grabWindow, n);
|
swapl(&stuff->grabWindow);
|
||||||
swapl(&stuff->time, n);
|
swapl(&stuff->time);
|
||||||
swaps(&stuff->event_count, n);
|
swaps(&stuff->event_count);
|
||||||
|
|
||||||
if (stuff->length != bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
|
if (stuff->length != bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
@ -210,9 +208,7 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count,
|
||||||
void
|
void
|
||||||
SRepXGrabDevice(ClientPtr client, int size, xGrabDeviceReply * rep)
|
SRepXGrabDevice(ClientPtr client, int size, xGrabDeviceReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,14 +74,12 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXGrabDeviceButton(ClientPtr client)
|
SProcXGrabDeviceButton(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGrabDeviceButtonReq);
|
REQUEST(xGrabDeviceButtonReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
||||||
swapl(&stuff->grabWindow, n);
|
swapl(&stuff->grabWindow);
|
||||||
swaps(&stuff->modifiers, n);
|
swaps(&stuff->modifiers);
|
||||||
swaps(&stuff->event_count, n);
|
swaps(&stuff->event_count);
|
||||||
REQUEST_FIXED_SIZE(xGrabDeviceButtonReq,
|
REQUEST_FIXED_SIZE(xGrabDeviceButtonReq,
|
||||||
stuff->event_count * sizeof(CARD32));
|
stuff->event_count * sizeof(CARD32));
|
||||||
SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count);
|
SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count);
|
||||||
|
|
|
||||||
|
|
@ -74,14 +74,12 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXGrabDeviceKey(ClientPtr client)
|
SProcXGrabDeviceKey(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGrabDeviceKeyReq);
|
REQUEST(xGrabDeviceKeyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
|
||||||
swapl(&stuff->grabWindow, n);
|
swapl(&stuff->grabWindow);
|
||||||
swaps(&stuff->modifiers, n);
|
swaps(&stuff->modifiers);
|
||||||
swaps(&stuff->event_count, n);
|
swaps(&stuff->event_count);
|
||||||
REQUEST_FIXED_SIZE(xGrabDeviceKeyReq, stuff->event_count * sizeof(CARD32));
|
REQUEST_FIXED_SIZE(xGrabDeviceKeyReq, stuff->event_count * sizeof(CARD32));
|
||||||
SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count);
|
SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count);
|
||||||
return (ProcXGrabDeviceKey(client));
|
return (ProcXGrabDeviceKey(client));
|
||||||
|
|
|
||||||
|
|
@ -71,13 +71,11 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXGetDeviceMotionEvents(ClientPtr client)
|
SProcXGetDeviceMotionEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xGetDeviceMotionEventsReq);
|
REQUEST(xGetDeviceMotionEventsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
|
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
|
||||||
swapl(&stuff->start, n);
|
swapl(&stuff->start);
|
||||||
swapl(&stuff->stop, n);
|
swapl(&stuff->stop);
|
||||||
return (ProcXGetDeviceMotionEvents(client));
|
return (ProcXGetDeviceMotionEvents(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -143,11 +141,9 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
|
||||||
WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep);
|
WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep);
|
||||||
if (nEvents) {
|
if (nEvents) {
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
char n;
|
|
||||||
|
|
||||||
bufptr = coords;
|
bufptr = coords;
|
||||||
for (i = 0; i < nEvents * (axes + 1); i++) {
|
for (i = 0; i < nEvents * (axes + 1); i++) {
|
||||||
swapl(bufptr, n);
|
swapl(bufptr);
|
||||||
bufptr++;
|
bufptr++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -168,10 +164,8 @@ void
|
||||||
SRepXGetDeviceMotionEvents(ClientPtr client, int size,
|
SRepXGetDeviceMotionEvents(ClientPtr client, int size,
|
||||||
xGetDeviceMotionEventsReply * rep)
|
xGetDeviceMotionEventsReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->nEvents);
|
||||||
swapl(&rep->length, n);
|
|
||||||
swapl(&rep->nEvents, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
28
Xi/listdev.c
28
Xi/listdev.c
|
|
@ -78,10 +78,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXListInputDevices(ClientPtr client)
|
SProcXListInputDevices(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xListInputDevicesReq);
|
REQUEST(xListInputDevicesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXListInputDevices(client));
|
return (ProcXListInputDevices(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -145,7 +143,6 @@ CopyDeviceName(char **namebuf, char *name)
|
||||||
static void
|
static void
|
||||||
CopySwapButtonClass(ClientPtr client, ButtonClassPtr b, char **buf)
|
CopySwapButtonClass(ClientPtr client, ButtonClassPtr b, char **buf)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
xButtonInfoPtr b2;
|
xButtonInfoPtr b2;
|
||||||
|
|
||||||
b2 = (xButtonInfoPtr) * buf;
|
b2 = (xButtonInfoPtr) * buf;
|
||||||
|
|
@ -153,7 +150,7 @@ CopySwapButtonClass(ClientPtr client, ButtonClassPtr b, char **buf)
|
||||||
b2->length = sizeof(xButtonInfo);
|
b2->length = sizeof(xButtonInfo);
|
||||||
b2->num_buttons = b->numButtons;
|
b2->num_buttons = b->numButtons;
|
||||||
if (client && client->swapped) {
|
if (client && client->swapped) {
|
||||||
swaps(&b2->num_buttons, n); /* macro - braces are required */
|
swaps(&b2->num_buttons);
|
||||||
}
|
}
|
||||||
*buf += sizeof(xButtonInfo);
|
*buf += sizeof(xButtonInfo);
|
||||||
}
|
}
|
||||||
|
|
@ -168,7 +165,6 @@ static void
|
||||||
CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes,
|
CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes,
|
||||||
char **buf)
|
char **buf)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
xDeviceInfoPtr dev;
|
xDeviceInfoPtr dev;
|
||||||
|
|
||||||
dev = (xDeviceInfoPtr) * buf;
|
dev = (xDeviceInfoPtr) * buf;
|
||||||
|
|
@ -188,7 +184,7 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes,
|
||||||
dev->use = IsXExtensionDevice;
|
dev->use = IsXExtensionDevice;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swapl(&dev->type, n); /* macro - braces are required */
|
swapl(&dev->type);
|
||||||
}
|
}
|
||||||
*buf += sizeof(xDeviceInfo);
|
*buf += sizeof(xDeviceInfo);
|
||||||
}
|
}
|
||||||
|
|
@ -202,7 +198,6 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes,
|
||||||
static void
|
static void
|
||||||
CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf)
|
CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
xKeyInfoPtr k2;
|
xKeyInfoPtr k2;
|
||||||
|
|
||||||
k2 = (xKeyInfoPtr) * buf;
|
k2 = (xKeyInfoPtr) * buf;
|
||||||
|
|
@ -212,7 +207,7 @@ CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf)
|
||||||
k2->max_keycode = k->xkbInfo->desc->max_key_code;
|
k2->max_keycode = k->xkbInfo->desc->max_key_code;
|
||||||
k2->num_keys = k2->max_keycode - k2->min_keycode + 1;
|
k2->num_keys = k2->max_keycode - k2->min_keycode + 1;
|
||||||
if (client && client->swapped) {
|
if (client && client->swapped) {
|
||||||
swaps(&k2->num_keys, n);
|
swaps(&k2->num_keys);
|
||||||
}
|
}
|
||||||
*buf += sizeof(xKeyInfo);
|
*buf += sizeof(xKeyInfo);
|
||||||
}
|
}
|
||||||
|
|
@ -233,7 +228,6 @@ static int
|
||||||
CopySwapValuatorClass(ClientPtr client, DeviceIntPtr dev, char **buf)
|
CopySwapValuatorClass(ClientPtr client, DeviceIntPtr dev, char **buf)
|
||||||
{
|
{
|
||||||
int i, j, axes, t_axes;
|
int i, j, axes, t_axes;
|
||||||
char n;
|
|
||||||
ValuatorClassPtr v = dev->valuator;
|
ValuatorClassPtr v = dev->valuator;
|
||||||
xValuatorInfoPtr v2;
|
xValuatorInfoPtr v2;
|
||||||
AxisInfo *a;
|
AxisInfo *a;
|
||||||
|
|
@ -251,7 +245,7 @@ CopySwapValuatorClass(ClientPtr client, DeviceIntPtr dev, char **buf)
|
||||||
v2->mode = valuator_get_mode(dev, 0);
|
v2->mode = valuator_get_mode(dev, 0);
|
||||||
v2->motion_buffer_size = v->numMotionEvents;
|
v2->motion_buffer_size = v->numMotionEvents;
|
||||||
if (client && client->swapped) {
|
if (client && client->swapped) {
|
||||||
swapl(&v2->motion_buffer_size, n);
|
swapl(&v2->motion_buffer_size);
|
||||||
}
|
}
|
||||||
*buf += sizeof(xValuatorInfo);
|
*buf += sizeof(xValuatorInfo);
|
||||||
a = v->axes + (VPC * i);
|
a = v->axes + (VPC * i);
|
||||||
|
|
@ -261,9 +255,9 @@ CopySwapValuatorClass(ClientPtr client, DeviceIntPtr dev, char **buf)
|
||||||
a2->max_value = a->max_value;
|
a2->max_value = a->max_value;
|
||||||
a2->resolution = a->resolution;
|
a2->resolution = a->resolution;
|
||||||
if (client && client->swapped) {
|
if (client && client->swapped) {
|
||||||
swapl(&a2->min_value, n);
|
swapl(&a2->min_value);
|
||||||
swapl(&a2->max_value, n);
|
swapl(&a2->max_value);
|
||||||
swapl(&a2->resolution, n);
|
swapl(&a2->resolution);
|
||||||
}
|
}
|
||||||
a2++;
|
a2++;
|
||||||
a++;
|
a++;
|
||||||
|
|
@ -424,9 +418,7 @@ ProcXListInputDevices(ClientPtr client)
|
||||||
void
|
void
|
||||||
SRepXListInputDevices(ClientPtr client, int size, xListInputDevicesReply * rep)
|
SRepXListInputDevices(ClientPtr client, int size, xListInputDevicesReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
Xi/opendev.c
10
Xi/opendev.c
|
|
@ -76,10 +76,8 @@ extern CARD8 event_base[];
|
||||||
int
|
int
|
||||||
SProcXOpenDevice(ClientPtr client)
|
SProcXOpenDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xOpenDeviceReq);
|
REQUEST(xOpenDeviceReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXOpenDevice(client));
|
return (ProcXOpenDevice(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -166,9 +164,7 @@ ProcXOpenDevice(ClientPtr client)
|
||||||
void
|
void
|
||||||
SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep)
|
SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
13
Xi/queryst.c
13
Xi/queryst.c
|
|
@ -56,10 +56,8 @@ from The Open Group.
|
||||||
int
|
int
|
||||||
SProcXQueryDeviceState(ClientPtr client)
|
SProcXQueryDeviceState(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xQueryDeviceStateReq);
|
REQUEST(xQueryDeviceStateReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXQueryDeviceState(client));
|
return (ProcXQueryDeviceState(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,7 +70,6 @@ SProcXQueryDeviceState(ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcXQueryDeviceState(ClientPtr client)
|
ProcXQueryDeviceState(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
int rc, i;
|
int rc, i;
|
||||||
int num_classes = 0;
|
int num_classes = 0;
|
||||||
int total_length = 0;
|
int total_length = 0;
|
||||||
|
|
@ -159,7 +156,7 @@ ProcXQueryDeviceState(ClientPtr client)
|
||||||
*((int *)buf) = *values;
|
*((int *)buf) = *values;
|
||||||
values++;
|
values++;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swapl((int *)buf, n); /* macro - braces needed */
|
swapl((int *)buf);
|
||||||
}
|
}
|
||||||
buf += sizeof(int);
|
buf += sizeof(int);
|
||||||
}
|
}
|
||||||
|
|
@ -184,9 +181,7 @@ ProcXQueryDeviceState(ClientPtr client)
|
||||||
void
|
void
|
||||||
SRepXQueryDeviceState(ClientPtr client, int size, xQueryDeviceStateReply * rep)
|
SRepXQueryDeviceState(ClientPtr client, int size, xQueryDeviceStateReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,13 +123,11 @@ HandleDevicePresenceMask(ClientPtr client, WindowPtr win,
|
||||||
int
|
int
|
||||||
SProcXSelectExtensionEvent(ClientPtr client)
|
SProcXSelectExtensionEvent(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xSelectExtensionEventReq);
|
REQUEST(xSelectExtensionEventReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
|
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
swaps(&stuff->count, n);
|
swaps(&stuff->count);
|
||||||
REQUEST_FIXED_SIZE(xSelectExtensionEventReq,
|
REQUEST_FIXED_SIZE(xSelectExtensionEventReq,
|
||||||
stuff->count * sizeof(CARD32));
|
stuff->count * sizeof(CARD32));
|
||||||
SwapLongs((CARD32 *) (&stuff[1]), stuff->count);
|
SwapLongs((CARD32 *) (&stuff[1]), stuff->count);
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,6 @@ extern int lastEvent; /* Defined in extension.c */
|
||||||
int
|
int
|
||||||
SProcXSendExtensionEvent(ClientPtr client)
|
SProcXSendExtensionEvent(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
CARD32 *p;
|
CARD32 *p;
|
||||||
int i;
|
int i;
|
||||||
xEvent eventT;
|
xEvent eventT;
|
||||||
|
|
@ -84,10 +83,10 @@ SProcXSendExtensionEvent(ClientPtr client)
|
||||||
EventSwapPtr proc;
|
EventSwapPtr proc;
|
||||||
|
|
||||||
REQUEST(xSendExtensionEventReq);
|
REQUEST(xSendExtensionEventReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
|
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
|
||||||
swapl(&stuff->destination, n);
|
swapl(&stuff->destination);
|
||||||
swaps(&stuff->count, n);
|
swaps(&stuff->count);
|
||||||
|
|
||||||
if (stuff->length != bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
|
if (stuff->length != bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
|
||||||
bytes_to_int32(stuff->num_events * sizeof(xEvent)))
|
bytes_to_int32(stuff->num_events * sizeof(xEvent)))
|
||||||
|
|
|
||||||
10
Xi/setbmap.c
10
Xi/setbmap.c
|
|
@ -71,10 +71,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXSetDeviceButtonMapping(ClientPtr client)
|
SProcXSetDeviceButtonMapping(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xSetDeviceButtonMappingReq);
|
REQUEST(xSetDeviceButtonMappingReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXSetDeviceButtonMapping(client));
|
return (ProcXSetDeviceButtonMapping(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,9 +130,7 @@ void
|
||||||
SRepXSetDeviceButtonMapping(ClientPtr client, int size,
|
SRepXSetDeviceButtonMapping(ClientPtr client, int size,
|
||||||
xSetDeviceButtonMappingReply * rep)
|
xSetDeviceButtonMappingReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
Xi/setdval.c
10
Xi/setdval.c
|
|
@ -71,10 +71,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXSetDeviceValuators(ClientPtr client)
|
SProcXSetDeviceValuators(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xSetDeviceValuatorsReq);
|
REQUEST(xSetDeviceValuatorsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXSetDeviceValuators(client));
|
return (ProcXSetDeviceValuators(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -138,9 +136,7 @@ void
|
||||||
SRepXSetDeviceValuators(ClientPtr client, int size,
|
SRepXSetDeviceValuators(ClientPtr client, int size,
|
||||||
xSetDeviceValuatorsReply * rep)
|
xSetDeviceValuatorsReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,13 +74,11 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXSetDeviceFocus(ClientPtr client)
|
SProcXSetDeviceFocus(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xSetDeviceFocusReq);
|
REQUEST(xSetDeviceFocusReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xSetDeviceFocusReq);
|
REQUEST_SIZE_MATCH(xSetDeviceFocusReq);
|
||||||
swapl(&stuff->focus, n);
|
swapl(&stuff->focus);
|
||||||
swapl(&stuff->time, n);
|
swapl(&stuff->time);
|
||||||
return (ProcXSetDeviceFocus(client));
|
return (ProcXSetDeviceFocus(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
10
Xi/setmmap.c
10
Xi/setmmap.c
|
|
@ -73,10 +73,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXSetDeviceModifierMapping(ClientPtr client)
|
SProcXSetDeviceModifierMapping(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xSetDeviceModifierMappingReq);
|
REQUEST(xSetDeviceModifierMappingReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXSetDeviceModifierMapping(client));
|
return (ProcXSetDeviceModifierMapping(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -140,9 +138,7 @@ void
|
||||||
SRepXSetDeviceModifierMapping(ClientPtr client, int size,
|
SRepXSetDeviceModifierMapping(ClientPtr client, int size,
|
||||||
xSetDeviceModifierMappingReply * rep)
|
xSetDeviceModifierMappingReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
Xi/setmode.c
10
Xi/setmode.c
|
|
@ -71,10 +71,8 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXSetDeviceMode(ClientPtr client)
|
SProcXSetDeviceMode(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xSetDeviceModeReq);
|
REQUEST(xSetDeviceModeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXSetDeviceMode(client));
|
return (ProcXSetDeviceMode(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -138,9 +136,7 @@ ProcXSetDeviceMode(ClientPtr client)
|
||||||
void
|
void
|
||||||
SRepXSetDeviceMode(ClientPtr client, int size, xSetDeviceModeReply * rep)
|
SRepXSetDeviceMode(ClientPtr client, int size, xSetDeviceModeReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,12 +70,10 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXUngrabDevice(ClientPtr client)
|
SProcXUngrabDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xUngrabDeviceReq);
|
REQUEST(xUngrabDeviceReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xUngrabDeviceReq);
|
REQUEST_SIZE_MATCH(xUngrabDeviceReq);
|
||||||
swapl(&stuff->time, n);
|
swapl(&stuff->time);
|
||||||
return (ProcXUngrabDevice(client));
|
return (ProcXUngrabDevice(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,13 +76,11 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXUngrabDeviceButton(ClientPtr client)
|
SProcXUngrabDeviceButton(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xUngrabDeviceButtonReq);
|
REQUEST(xUngrabDeviceButtonReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
|
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
|
||||||
swapl(&stuff->grabWindow, n);
|
swapl(&stuff->grabWindow);
|
||||||
swaps(&stuff->modifiers, n);
|
swaps(&stuff->modifiers);
|
||||||
return (ProcXUngrabDeviceButton(client));
|
return (ProcXUngrabDeviceButton(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,13 +78,11 @@ SOFTWARE.
|
||||||
int
|
int
|
||||||
SProcXUngrabDeviceKey(ClientPtr client)
|
SProcXUngrabDeviceKey(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xUngrabDeviceKeyReq);
|
REQUEST(xUngrabDeviceKeyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
|
REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
|
||||||
swapl(&stuff->grabWindow, n);
|
swapl(&stuff->grabWindow);
|
||||||
swaps(&stuff->modifiers, n);
|
swaps(&stuff->modifiers);
|
||||||
return (ProcXUngrabDeviceKey(client));
|
return (ProcXUngrabDeviceKey(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,13 +44,11 @@
|
||||||
int
|
int
|
||||||
SProcXIAllowEvents(ClientPtr client)
|
SProcXIAllowEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXIAllowEventsReq);
|
REQUEST(xXIAllowEventsReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->time, n);
|
swapl(&stuff->time);
|
||||||
|
|
||||||
return ProcXIAllowEvents(client);
|
return ProcXIAllowEvents(client);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,13 +56,11 @@
|
||||||
int
|
int
|
||||||
SProcXIChangeCursor(ClientPtr client)
|
SProcXIChangeCursor(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXIChangeCursorReq);
|
REQUEST(xXIChangeCursorReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->win, n);
|
swapl(&stuff->win);
|
||||||
swapl(&stuff->cursor, n);
|
swapl(&stuff->cursor);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
REQUEST_SIZE_MATCH(xXIChangeCursorReq);
|
REQUEST_SIZE_MATCH(xXIChangeCursorReq);
|
||||||
return (ProcXIChangeCursor(client));
|
return (ProcXIChangeCursor(client));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -133,10 +133,8 @@ void XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
|
||||||
|
|
||||||
int SProcXIChangeHierarchy(ClientPtr client)
|
int SProcXIChangeHierarchy(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXIChangeHierarchyReq);
|
REQUEST(xXIChangeHierarchyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (ProcXIChangeHierarchy(client));
|
return (ProcXIChangeHierarchy(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -424,7 +422,6 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||||
{
|
{
|
||||||
xXIAnyHierarchyChangeInfo *any;
|
xXIAnyHierarchyChangeInfo *any;
|
||||||
int required_len = sizeof(xXIChangeHierarchyReq);
|
int required_len = sizeof(xXIChangeHierarchyReq);
|
||||||
char n;
|
|
||||||
int rc = Success;
|
int rc = Success;
|
||||||
int flags[MAXDEVICES] = {0};
|
int flags[MAXDEVICES] = {0};
|
||||||
|
|
||||||
|
|
@ -437,8 +434,8 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||||
any = (xXIAnyHierarchyChangeInfo*)&stuff[1];
|
any = (xXIAnyHierarchyChangeInfo*)&stuff[1];
|
||||||
while(stuff->num_changes--)
|
while(stuff->num_changes--)
|
||||||
{
|
{
|
||||||
SWAPIF(swapl(&any->type, n));
|
SWAPIF(swapl(&any->type));
|
||||||
SWAPIF(swaps(&any->length, n));
|
SWAPIF(swaps(&any->length));
|
||||||
|
|
||||||
required_len += any->length;
|
required_len += any->length;
|
||||||
if ((stuff->length * 4) < required_len)
|
if ((stuff->length * 4) < required_len)
|
||||||
|
|
@ -449,7 +446,7 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||||
case XIAddMaster:
|
case XIAddMaster:
|
||||||
{
|
{
|
||||||
xXIAddMasterInfo* c = (xXIAddMasterInfo*)any;
|
xXIAddMasterInfo* c = (xXIAddMasterInfo*)any;
|
||||||
SWAPIF(swaps(&c->name_len, n));
|
SWAPIF(swaps(&c->name_len));
|
||||||
|
|
||||||
rc = add_master(client, c, flags);
|
rc = add_master(client, c, flags);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,10 @@
|
||||||
int
|
int
|
||||||
SProcXIGetClientPointer(ClientPtr client)
|
SProcXIGetClientPointer(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xXIGetClientPointerReq);
|
REQUEST(xXIGetClientPointerReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->win, n);
|
swapl(&stuff->win);
|
||||||
return ProcXIGetClientPointer(client);
|
return ProcXIGetClientPointer(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -97,10 +96,9 @@ void
|
||||||
SRepXIGetClientPointer(ClientPtr client, int size,
|
SRepXIGetClientPointer(ClientPtr client, int size,
|
||||||
xXIGetClientPointerReply* rep)
|
xXIGetClientPointerReply* rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->length);
|
||||||
swapl(&rep->length, n);
|
swaps(&rep->deviceid);
|
||||||
swaps(&rep->deviceid, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,16 +45,14 @@
|
||||||
int
|
int
|
||||||
SProcXIGrabDevice(ClientPtr client)
|
SProcXIGrabDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXIGrabDeviceReq);
|
REQUEST(xXIGrabDeviceReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->grab_window, n);
|
swapl(&stuff->grab_window);
|
||||||
swapl(&stuff->cursor, n);
|
swapl(&stuff->cursor);
|
||||||
swapl(&stuff->time, n);
|
swapl(&stuff->time);
|
||||||
swaps(&stuff->mask_len, n);
|
swaps(&stuff->mask_len);
|
||||||
|
|
||||||
return ProcXIGrabDevice(client);
|
return ProcXIGrabDevice(client);
|
||||||
}
|
}
|
||||||
|
|
@ -115,13 +113,11 @@ ProcXIGrabDevice(ClientPtr client)
|
||||||
int
|
int
|
||||||
SProcXIUngrabDevice(ClientPtr client)
|
SProcXIUngrabDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXIUngrabDeviceReq);
|
REQUEST(xXIUngrabDeviceReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->time, n);
|
swapl(&stuff->time);
|
||||||
|
|
||||||
return ProcXIUngrabDevice(client);
|
return ProcXIUngrabDevice(client);
|
||||||
}
|
}
|
||||||
|
|
@ -153,9 +149,7 @@ ProcXIUngrabDevice(ClientPtr client)
|
||||||
|
|
||||||
void SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep)
|
void SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
|
||||||
swapl(&rep->length, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,27 +49,26 @@ int
|
||||||
SProcXIPassiveGrabDevice(ClientPtr client)
|
SProcXIPassiveGrabDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char n;
|
|
||||||
xXIModifierInfo *mods;
|
xXIModifierInfo *mods;
|
||||||
|
|
||||||
REQUEST(xXIPassiveGrabDeviceReq);
|
REQUEST(xXIPassiveGrabDeviceReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->grab_window, n);
|
swapl(&stuff->grab_window);
|
||||||
swapl(&stuff->cursor, n);
|
swapl(&stuff->cursor);
|
||||||
swapl(&stuff->time, n);
|
swapl(&stuff->time);
|
||||||
swapl(&stuff->detail, n);
|
swapl(&stuff->detail);
|
||||||
swaps(&stuff->mask_len, n);
|
swaps(&stuff->mask_len);
|
||||||
swaps(&stuff->num_modifiers, n);
|
swaps(&stuff->num_modifiers);
|
||||||
|
|
||||||
mods = (xXIModifierInfo*)&stuff[1];
|
mods = (xXIModifierInfo*)&stuff[1];
|
||||||
|
|
||||||
for (i = 0; i < stuff->num_modifiers; i++, mods++)
|
for (i = 0; i < stuff->num_modifiers; i++, mods++)
|
||||||
{
|
{
|
||||||
swapl(&mods->base_mods, n);
|
swapl(&mods->base_mods);
|
||||||
swapl(&mods->latched_mods, n);
|
swapl(&mods->latched_mods);
|
||||||
swapl(&mods->locked_mods, n);
|
swapl(&mods->locked_mods);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ProcXIPassiveGrabDevice(client);
|
return ProcXIPassiveGrabDevice(client);
|
||||||
|
|
@ -88,7 +87,6 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
||||||
GrabParameters param;
|
GrabParameters param;
|
||||||
void *tmp;
|
void *tmp;
|
||||||
int mask_len;
|
int mask_len;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST(xXIPassiveGrabDeviceReq);
|
REQUEST(xXIPassiveGrabDeviceReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
|
REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
|
||||||
|
|
@ -198,7 +196,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
||||||
info->status = status;
|
info->status = status;
|
||||||
info->modifiers = *modifiers;
|
info->modifiers = *modifiers;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl(&info->modifiers, n);
|
swapl(&info->modifiers);
|
||||||
|
|
||||||
rep.num_modifiers++;
|
rep.num_modifiers++;
|
||||||
rep.length += bytes_to_int32(sizeof(xXIGrabModifierInfo));
|
rep.length += bytes_to_int32(sizeof(xXIGrabModifierInfo));
|
||||||
|
|
@ -217,11 +215,9 @@ void
|
||||||
SRepXIPassiveGrabDevice(ClientPtr client, int size,
|
SRepXIPassiveGrabDevice(ClientPtr client, int size,
|
||||||
xXIPassiveGrabDeviceReply * rep)
|
xXIPassiveGrabDeviceReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->num_modifiers);
|
||||||
swapl(&rep->length, n);
|
|
||||||
swaps(&rep->num_modifiers, n);
|
|
||||||
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
@ -229,22 +225,21 @@ SRepXIPassiveGrabDevice(ClientPtr client, int size,
|
||||||
int
|
int
|
||||||
SProcXIPassiveUngrabDevice(ClientPtr client)
|
SProcXIPassiveUngrabDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
int i;
|
int i;
|
||||||
uint32_t *modifiers;
|
uint32_t *modifiers;
|
||||||
|
|
||||||
REQUEST(xXIPassiveUngrabDeviceReq);
|
REQUEST(xXIPassiveUngrabDeviceReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->grab_window, n);
|
swapl(&stuff->grab_window);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->detail, n);
|
swapl(&stuff->detail);
|
||||||
swaps(&stuff->num_modifiers, n);
|
swaps(&stuff->num_modifiers);
|
||||||
|
|
||||||
modifiers = (uint32_t*)&stuff[1];
|
modifiers = (uint32_t*)&stuff[1];
|
||||||
|
|
||||||
for (i = 0; i < stuff->num_modifiers; i++, modifiers++)
|
for (i = 0; i < stuff->num_modifiers; i++, modifiers++)
|
||||||
swapl(modifiers, n);
|
swapl(modifiers);
|
||||||
|
|
||||||
return ProcXIPassiveUngrabDevice(client);
|
return ProcXIPassiveUngrabDevice(client);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
102
Xi/xiproperty.c
102
Xi/xiproperty.c
|
|
@ -1036,10 +1036,9 @@ ProcXGetDeviceProperty (ClientPtr client)
|
||||||
int
|
int
|
||||||
SProcXListDeviceProperties (ClientPtr client)
|
SProcXListDeviceProperties (ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xListDevicePropertiesReq);
|
REQUEST(xListDevicePropertiesReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
|
REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
|
||||||
return (ProcXListDeviceProperties(client));
|
return (ProcXListDeviceProperties(client));
|
||||||
|
|
@ -1048,25 +1047,23 @@ SProcXListDeviceProperties (ClientPtr client)
|
||||||
int
|
int
|
||||||
SProcXChangeDeviceProperty (ClientPtr client)
|
SProcXChangeDeviceProperty (ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xChangeDevicePropertyReq);
|
REQUEST(xChangeDevicePropertyReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq);
|
REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
swapl(&stuff->type, n);
|
swapl(&stuff->type);
|
||||||
swapl(&stuff->nUnits, n);
|
swapl(&stuff->nUnits);
|
||||||
return (ProcXChangeDeviceProperty(client));
|
return (ProcXChangeDeviceProperty(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcXDeleteDeviceProperty (ClientPtr client)
|
SProcXDeleteDeviceProperty (ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xDeleteDevicePropertyReq);
|
REQUEST(xDeleteDevicePropertyReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
|
REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
|
||||||
return (ProcXDeleteDeviceProperty(client));
|
return (ProcXDeleteDeviceProperty(client));
|
||||||
}
|
}
|
||||||
|
|
@ -1074,14 +1071,13 @@ SProcXDeleteDeviceProperty (ClientPtr client)
|
||||||
int
|
int
|
||||||
SProcXGetDeviceProperty (ClientPtr client)
|
SProcXGetDeviceProperty (ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xGetDevicePropertyReq);
|
REQUEST(xGetDevicePropertyReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
swapl(&stuff->type, n);
|
swapl(&stuff->type);
|
||||||
swapl(&stuff->longOffset, n);
|
swapl(&stuff->longOffset);
|
||||||
swapl(&stuff->longLength, n);
|
swapl(&stuff->longLength);
|
||||||
REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
|
REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
|
||||||
return (ProcXGetDeviceProperty(client));
|
return (ProcXGetDeviceProperty(client));
|
||||||
}
|
}
|
||||||
|
|
@ -1093,10 +1089,9 @@ void
|
||||||
SRepXListDeviceProperties(ClientPtr client, int size,
|
SRepXListDeviceProperties(ClientPtr client, int size,
|
||||||
xListDevicePropertiesReply *rep)
|
xListDevicePropertiesReply *rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->length);
|
||||||
swapl(&rep->length, n);
|
swaps(&rep->nAtoms);
|
||||||
swaps(&rep->nAtoms, n);
|
|
||||||
/* properties will be swapped later, see ProcXListDeviceProperties */
|
/* properties will be swapped later, see ProcXListDeviceProperties */
|
||||||
WriteToClient(client, size, (char*)rep);
|
WriteToClient(client, size, (char*)rep);
|
||||||
}
|
}
|
||||||
|
|
@ -1105,13 +1100,11 @@ void
|
||||||
SRepXGetDeviceProperty(ClientPtr client, int size,
|
SRepXGetDeviceProperty(ClientPtr client, int size,
|
||||||
xGetDevicePropertyReply *rep)
|
xGetDevicePropertyReply *rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->propertyType);
|
||||||
swapl(&rep->length, n);
|
swapl(&rep->bytesAfter);
|
||||||
swapl(&rep->propertyType, n);
|
swapl(&rep->nItems);
|
||||||
swapl(&rep->bytesAfter, n);
|
|
||||||
swapl(&rep->nItems, n);
|
|
||||||
/* data will be swapped, see ProcXGetDeviceProperty */
|
/* data will be swapped, see ProcXGetDeviceProperty */
|
||||||
WriteToClient(client, size, (char*)rep);
|
WriteToClient(client, size, (char*)rep);
|
||||||
}
|
}
|
||||||
|
|
@ -1279,11 +1272,10 @@ ProcXIGetProperty(ClientPtr client)
|
||||||
int
|
int
|
||||||
SProcXIListProperties(ClientPtr client)
|
SProcXIListProperties(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xXIListPropertiesReq);
|
REQUEST(xXIListPropertiesReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXIListPropertiesReq);
|
REQUEST_SIZE_MATCH(xXIListPropertiesReq);
|
||||||
return (ProcXIListProperties(client));
|
return (ProcXIListProperties(client));
|
||||||
|
|
@ -1292,27 +1284,25 @@ SProcXIListProperties(ClientPtr client)
|
||||||
int
|
int
|
||||||
SProcXIChangeProperty(ClientPtr client)
|
SProcXIChangeProperty(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xXIChangePropertyReq);
|
REQUEST(xXIChangePropertyReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq);
|
REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
swapl(&stuff->type, n);
|
swapl(&stuff->type);
|
||||||
swapl(&stuff->num_items, n);
|
swapl(&stuff->num_items);
|
||||||
return (ProcXIChangeProperty(client));
|
return (ProcXIChangeProperty(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
SProcXIDeleteProperty(ClientPtr client)
|
SProcXIDeleteProperty(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xXIDeletePropertyReq);
|
REQUEST(xXIDeletePropertyReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
REQUEST_SIZE_MATCH(xXIDeletePropertyReq);
|
REQUEST_SIZE_MATCH(xXIDeletePropertyReq);
|
||||||
return (ProcXIDeleteProperty(client));
|
return (ProcXIDeleteProperty(client));
|
||||||
}
|
}
|
||||||
|
|
@ -1320,15 +1310,14 @@ SProcXIDeleteProperty(ClientPtr client)
|
||||||
int
|
int
|
||||||
SProcXIGetProperty(ClientPtr client)
|
SProcXIGetProperty(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
REQUEST(xXIGetPropertyReq);
|
REQUEST(xXIGetPropertyReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
swapl(&stuff->type, n);
|
swapl(&stuff->type);
|
||||||
swapl(&stuff->offset, n);
|
swapl(&stuff->offset);
|
||||||
swapl(&stuff->len, n);
|
swapl(&stuff->len);
|
||||||
REQUEST_SIZE_MATCH(xXIGetPropertyReq);
|
REQUEST_SIZE_MATCH(xXIGetPropertyReq);
|
||||||
return (ProcXIGetProperty(client));
|
return (ProcXIGetProperty(client));
|
||||||
}
|
}
|
||||||
|
|
@ -1338,10 +1327,9 @@ void
|
||||||
SRepXIListProperties(ClientPtr client, int size,
|
SRepXIListProperties(ClientPtr client, int size,
|
||||||
xXIListPropertiesReply *rep)
|
xXIListPropertiesReply *rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->length);
|
||||||
swapl(&rep->length, n);
|
swaps(&rep->num_properties);
|
||||||
swaps(&rep->num_properties, n);
|
|
||||||
/* properties will be swapped later, see ProcXIListProperties */
|
/* properties will be swapped later, see ProcXIListProperties */
|
||||||
WriteToClient(client, size, (char*)rep);
|
WriteToClient(client, size, (char*)rep);
|
||||||
}
|
}
|
||||||
|
|
@ -1350,13 +1338,11 @@ void
|
||||||
SRepXIGetProperty(ClientPtr client, int size,
|
SRepXIGetProperty(ClientPtr client, int size,
|
||||||
xXIGetPropertyReply *rep)
|
xXIGetPropertyReply *rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->type);
|
||||||
swapl(&rep->length, n);
|
swapl(&rep->bytes_after);
|
||||||
swapl(&rep->type, n);
|
swapl(&rep->num_items);
|
||||||
swapl(&rep->bytes_after, n);
|
|
||||||
swapl(&rep->num_items, n);
|
|
||||||
/* data will be swapped, see ProcXIGetProperty */
|
/* data will be swapped, see ProcXIGetProperty */
|
||||||
WriteToClient(client, size, (char*)rep);
|
WriteToClient(client, size, (char*)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,12 +52,10 @@ static void SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info);
|
||||||
int
|
int
|
||||||
SProcXIQueryDevice(ClientPtr client)
|
SProcXIQueryDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXIQueryDeviceReq);
|
REQUEST(xXIQueryDeviceReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
|
|
||||||
return ProcXIQueryDevice(client);
|
return ProcXIQueryDevice(client);
|
||||||
}
|
}
|
||||||
|
|
@ -166,11 +164,9 @@ ProcXIQueryDevice(ClientPtr client)
|
||||||
void
|
void
|
||||||
SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply *rep)
|
SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply *rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->num_devices);
|
||||||
swapl(&rep->length, n);
|
|
||||||
swaps(&rep->num_devices, n);
|
|
||||||
|
|
||||||
/* Device info is already swapped, see ProcXIQueryDevice */
|
/* Device info is already swapped, see ProcXIQueryDevice */
|
||||||
|
|
||||||
|
|
@ -278,17 +274,16 @@ ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState)
|
||||||
static void
|
static void
|
||||||
SwapButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info)
|
SwapButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
Atom *btn;
|
Atom *btn;
|
||||||
int i;
|
int i;
|
||||||
swaps(&info->type, n);
|
swaps(&info->type);
|
||||||
swaps(&info->length, n);
|
swaps(&info->length);
|
||||||
swaps(&info->sourceid, n);
|
swaps(&info->sourceid);
|
||||||
|
|
||||||
for (i = 0, btn = (Atom*)&info[1]; i < info->num_buttons; i++, btn++)
|
for (i = 0, btn = (Atom*)&info[1]; i < info->num_buttons; i++, btn++)
|
||||||
swaps(btn, n);
|
swaps(btn);
|
||||||
|
|
||||||
swaps(&info->num_buttons, n);
|
swaps(&info->num_buttons);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -317,17 +312,16 @@ ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info)
|
||||||
static void
|
static void
|
||||||
SwapKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info)
|
SwapKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
uint32_t *key;
|
uint32_t *key;
|
||||||
int i;
|
int i;
|
||||||
swaps(&info->type, n);
|
swaps(&info->type);
|
||||||
swaps(&info->length, n);
|
swaps(&info->length);
|
||||||
swaps(&info->sourceid, n);
|
swaps(&info->sourceid);
|
||||||
|
|
||||||
for (i = 0, key = (uint32_t*)&info[1]; i < info->num_keycodes; i++, key++)
|
for (i = 0, key = (uint32_t*)&info[1]; i < info->num_keycodes; i++, key++)
|
||||||
swapl(key, n);
|
swapl(key);
|
||||||
|
|
||||||
swaps(&info->num_keycodes, n);
|
swaps(&info->num_keycodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -364,16 +358,15 @@ ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber,
|
||||||
static void
|
static void
|
||||||
SwapValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info)
|
SwapValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&info->type);
|
||||||
swaps(&info->type, n);
|
swaps(&info->length);
|
||||||
swaps(&info->length, n);
|
swapl(&info->label);
|
||||||
swapl(&info->label, n);
|
swapl(&info->min.integral);
|
||||||
swapl(&info->min.integral, n);
|
swapl(&info->min.frac);
|
||||||
swapl(&info->min.frac, n);
|
swapl(&info->max.integral);
|
||||||
swapl(&info->max.integral, n);
|
swapl(&info->max.frac);
|
||||||
swapl(&info->max.frac, n);
|
swaps(&info->number);
|
||||||
swaps(&info->number, n);
|
swaps(&info->sourceid);
|
||||||
swaps(&info->sourceid, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetDeviceUse(DeviceIntPtr dev, uint16_t *attachment)
|
int GetDeviceUse(DeviceIntPtr dev, uint16_t *attachment)
|
||||||
|
|
@ -471,7 +464,6 @@ ListDeviceClasses(ClientPtr client, DeviceIntPtr dev,
|
||||||
static void
|
static void
|
||||||
SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info)
|
SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
char *any = (char*)&info[1];
|
char *any = (char*)&info[1];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
@ -497,10 +489,10 @@ SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info)
|
||||||
any += len * 4;
|
any += len * 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
swaps(&info->deviceid, n);
|
swaps(&info->deviceid);
|
||||||
swaps(&info->use, n);
|
swaps(&info->use);
|
||||||
swaps(&info->attachment, n);
|
swaps(&info->attachment);
|
||||||
swaps(&info->num_classes, n);
|
swaps(&info->num_classes);
|
||||||
swaps(&info->name_len, n);
|
swaps(&info->name_len);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,12 +61,10 @@
|
||||||
int
|
int
|
||||||
SProcXIQueryPointer(ClientPtr client)
|
SProcXIQueryPointer(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXIQueryPointerReq);
|
REQUEST(xXIQueryPointerReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->win, n);
|
swapl(&stuff->win);
|
||||||
return (ProcXIQueryPointer(client));
|
return (ProcXIQueryPointer(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -212,17 +210,15 @@ void
|
||||||
SRepXIQueryPointer(ClientPtr client, int size,
|
SRepXIQueryPointer(ClientPtr client, int size,
|
||||||
xXIQueryPointerReply * rep)
|
xXIQueryPointerReply * rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->root);
|
||||||
swapl(&rep->length, n);
|
swapl(&rep->child);
|
||||||
swapl(&rep->root, n);
|
swapl(&rep->root_x);
|
||||||
swapl(&rep->child, n);
|
swapl(&rep->root_y);
|
||||||
swapl(&rep->root_x, n);
|
swapl(&rep->win_x);
|
||||||
swapl(&rep->root_y, n);
|
swapl(&rep->win_y);
|
||||||
swapl(&rep->win_x, n);
|
swaps(&rep->buttons_len);
|
||||||
swapl(&rep->win_y, n);
|
|
||||||
swaps(&rep->buttons_len, n);
|
|
||||||
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,23 +103,20 @@ ProcXIQueryVersion(ClientPtr client)
|
||||||
int
|
int
|
||||||
SProcXIQueryVersion(ClientPtr client)
|
SProcXIQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXIQueryVersionReq);
|
REQUEST(xXIQueryVersionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq);
|
REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq);
|
||||||
swaps(&stuff->major_version, n);
|
swaps(&stuff->major_version);
|
||||||
swaps(&stuff->minor_version, n);
|
swaps(&stuff->minor_version);
|
||||||
return (ProcXIQueryVersion(client));
|
return (ProcXIQueryVersion(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply *rep)
|
SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply *rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->length);
|
||||||
swapl(&rep->length, n);
|
swaps(&rep->major_version);
|
||||||
swaps(&rep->major_version, n);
|
swaps(&rep->minor_version);
|
||||||
swaps(&rep->minor_version, n);
|
|
||||||
WriteToClient(client, size, (char *)rep);
|
WriteToClient(client, size, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,21 +63,20 @@ int XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len)
|
||||||
int
|
int
|
||||||
SProcXISelectEvents(ClientPtr client)
|
SProcXISelectEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
int i;
|
int i;
|
||||||
xXIEventMask* evmask;
|
xXIEventMask* evmask;
|
||||||
|
|
||||||
REQUEST(xXISelectEventsReq);
|
REQUEST(xXISelectEventsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xXISelectEventsReq);
|
REQUEST_AT_LEAST_SIZE(xXISelectEventsReq);
|
||||||
swapl(&stuff->win, n);
|
swapl(&stuff->win);
|
||||||
swaps(&stuff->num_masks, n);
|
swaps(&stuff->num_masks);
|
||||||
|
|
||||||
evmask = (xXIEventMask*)&stuff[1];
|
evmask = (xXIEventMask*)&stuff[1];
|
||||||
for (i = 0; i < stuff->num_masks; i++)
|
for (i = 0; i < stuff->num_masks; i++)
|
||||||
{
|
{
|
||||||
swaps(&evmask->deviceid, n);
|
swaps(&evmask->deviceid);
|
||||||
swaps(&evmask->mask_len, n);
|
swaps(&evmask->mask_len);
|
||||||
evmask = (xXIEventMask*)(((char*)&evmask[1]) + evmask->mask_len * 4);
|
evmask = (xXIEventMask*)(((char*)&evmask[1]) + evmask->mask_len * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -192,12 +191,10 @@ ProcXISelectEvents(ClientPtr client)
|
||||||
int
|
int
|
||||||
SProcXIGetSelectedEvents(ClientPtr client)
|
SProcXIGetSelectedEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXIGetSelectedEventsReq);
|
REQUEST(xXIGetSelectedEventsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq);
|
REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq);
|
||||||
swapl(&stuff->win, n);
|
swapl(&stuff->win);
|
||||||
|
|
||||||
return (ProcXIGetSelectedEvents(client));
|
return (ProcXIGetSelectedEvents(client));
|
||||||
}
|
}
|
||||||
|
|
@ -207,7 +204,6 @@ ProcXIGetSelectedEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
int rc, i;
|
int rc, i;
|
||||||
WindowPtr win;
|
WindowPtr win;
|
||||||
char n;
|
|
||||||
char *buffer = NULL;
|
char *buffer = NULL;
|
||||||
xXIGetSelectedEventsReply reply;
|
xXIGetSelectedEventsReply reply;
|
||||||
OtherInputMasks *masks;
|
OtherInputMasks *masks;
|
||||||
|
|
@ -275,8 +271,8 @@ ProcXIGetSelectedEvents(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&evmask->deviceid, n);
|
swaps(&evmask->deviceid);
|
||||||
swaps(&evmask->mask_len, n);
|
swaps(&evmask->mask_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&evmask[1], devmask, j + 1);
|
memcpy(&evmask[1], devmask, j + 1);
|
||||||
|
|
@ -299,11 +295,9 @@ ProcXIGetSelectedEvents(ClientPtr client)
|
||||||
void SRepXIGetSelectedEvents(ClientPtr client,
|
void SRepXIGetSelectedEvents(ClientPtr client,
|
||||||
int len, xXIGetSelectedEventsReply *rep)
|
int len, xXIGetSelectedEventsReply *rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
|
swapl(&rep->length);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->num_masks);
|
||||||
swapl(&rep->length, n);
|
|
||||||
swaps(&rep->num_masks, n);
|
|
||||||
WriteToClient(client, len, (char *)rep);
|
WriteToClient(client, len, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,12 +51,10 @@
|
||||||
int
|
int
|
||||||
SProcXISetClientPointer(ClientPtr client)
|
SProcXISetClientPointer(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXISetClientPointerReq);
|
REQUEST(xXISetClientPointerReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->win, n);
|
swapl(&stuff->win);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
REQUEST_SIZE_MATCH(xXISetClientPointerReq);
|
REQUEST_SIZE_MATCH(xXISetClientPointerReq);
|
||||||
return (ProcXISetClientPointer(client));
|
return (ProcXISetClientPointer(client));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,13 +43,11 @@
|
||||||
int
|
int
|
||||||
SProcXISetFocus(ClientPtr client)
|
SProcXISetFocus(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXISetFocusReq);
|
REQUEST(xXISetFocusReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
swapl(&stuff->focus, n);
|
swapl(&stuff->focus);
|
||||||
swapl(&stuff->time, n);
|
swapl(&stuff->time);
|
||||||
|
|
||||||
return ProcXISetFocus(client);
|
return ProcXISetFocus(client);
|
||||||
}
|
}
|
||||||
|
|
@ -57,11 +55,9 @@ SProcXISetFocus(ClientPtr client)
|
||||||
int
|
int
|
||||||
SProcXIGetFocus(ClientPtr client)
|
SProcXIGetFocus(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXIGetFocusReq);
|
REQUEST(xXIGetFocusReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
|
|
||||||
return ProcXIGetFocus(client);
|
return ProcXIGetFocus(client);
|
||||||
}
|
}
|
||||||
|
|
@ -122,9 +118,8 @@ ProcXIGetFocus(ClientPtr client)
|
||||||
void
|
void
|
||||||
SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply *rep)
|
SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply *rep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->length);
|
||||||
swapl(&rep->length, n);
|
swapl(&rep->focus);
|
||||||
swapl(&rep->focus, n);
|
|
||||||
WriteToClient(client, len, (char *)rep);
|
WriteToClient(client, len, (char *)rep);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,19 +56,17 @@
|
||||||
int
|
int
|
||||||
SProcXIWarpPointer(ClientPtr client)
|
SProcXIWarpPointer(ClientPtr client)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
|
|
||||||
REQUEST(xXIWarpPointerReq);
|
REQUEST(xXIWarpPointerReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->src_win, n);
|
swapl(&stuff->src_win);
|
||||||
swapl(&stuff->dst_win, n);
|
swapl(&stuff->dst_win);
|
||||||
swapl(&stuff->src_x, n);
|
swapl(&stuff->src_x);
|
||||||
swapl(&stuff->src_y, n);
|
swapl(&stuff->src_y);
|
||||||
swaps(&stuff->src_width, n);
|
swaps(&stuff->src_width);
|
||||||
swaps(&stuff->src_height, n);
|
swaps(&stuff->src_height);
|
||||||
swapl(&stuff->dst_x, n);
|
swapl(&stuff->dst_x);
|
||||||
swapl(&stuff->dst_y, n);
|
swapl(&stuff->dst_y);
|
||||||
swaps(&stuff->deviceid, n);
|
swaps(&stuff->deviceid);
|
||||||
return (ProcXIWarpPointer(client));
|
return (ProcXIWarpPointer(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,6 @@ ProcCompositeQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
CompositeClientPtr pCompositeClient = GetCompositeClient (client);
|
CompositeClientPtr pCompositeClient = GetCompositeClient (client);
|
||||||
xCompositeQueryVersionReply rep;
|
xCompositeQueryVersionReply rep;
|
||||||
register int n;
|
|
||||||
REQUEST(xCompositeQueryVersionReq);
|
REQUEST(xCompositeQueryVersionReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xCompositeQueryVersionReq);
|
REQUEST_SIZE_MATCH(xCompositeQueryVersionReq);
|
||||||
|
|
@ -126,10 +125,10 @@ ProcCompositeQueryVersion (ClientPtr client)
|
||||||
pCompositeClient->major_version = rep.majorVersion;
|
pCompositeClient->major_version = rep.majorVersion;
|
||||||
pCompositeClient->minor_version = rep.minorVersion;
|
pCompositeClient->minor_version = rep.minorVersion;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.majorVersion, n);
|
swapl(&rep.majorVersion);
|
||||||
swapl(&rep.minorVersion, n);
|
swapl(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xCompositeQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xCompositeQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -315,10 +314,9 @@ ProcCompositeGetOverlayWindow (ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.overlayWin);
|
||||||
swapl(&rep.overlayWin, n);
|
|
||||||
}
|
}
|
||||||
(void) WriteToClient(client, sz_xCompositeGetOverlayWindowReply, (char *)&rep);
|
(void) WriteToClient(client, sz_xCompositeGetOverlayWindowReply, (char *)&rep);
|
||||||
|
|
||||||
|
|
@ -377,111 +375,102 @@ ProcCompositeDispatch (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcCompositeQueryVersion (ClientPtr client)
|
SProcCompositeQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xCompositeQueryVersionReq);
|
REQUEST(xCompositeQueryVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xCompositeQueryVersionReq);
|
REQUEST_SIZE_MATCH(xCompositeQueryVersionReq);
|
||||||
swapl(&stuff->majorVersion, n);
|
swapl(&stuff->majorVersion);
|
||||||
swapl(&stuff->minorVersion, n);
|
swapl(&stuff->minorVersion);
|
||||||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcCompositeRedirectWindow (ClientPtr client)
|
SProcCompositeRedirectWindow (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xCompositeRedirectWindowReq);
|
REQUEST(xCompositeRedirectWindowReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq);
|
REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcCompositeRedirectSubwindows (ClientPtr client)
|
SProcCompositeRedirectSubwindows (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xCompositeRedirectSubwindowsReq);
|
REQUEST(xCompositeRedirectSubwindowsReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq);
|
REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcCompositeUnredirectWindow (ClientPtr client)
|
SProcCompositeUnredirectWindow (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xCompositeUnredirectWindowReq);
|
REQUEST(xCompositeUnredirectWindowReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq);
|
REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcCompositeUnredirectSubwindows (ClientPtr client)
|
SProcCompositeUnredirectSubwindows (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xCompositeUnredirectSubwindowsReq);
|
REQUEST(xCompositeUnredirectSubwindowsReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq);
|
REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcCompositeCreateRegionFromBorderClip (ClientPtr client)
|
SProcCompositeCreateRegionFromBorderClip (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xCompositeCreateRegionFromBorderClipReq);
|
REQUEST(xCompositeCreateRegionFromBorderClipReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq);
|
REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq);
|
||||||
swapl (&stuff->region, n);
|
swapl(&stuff->region);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcCompositeNameWindowPixmap (ClientPtr client)
|
SProcCompositeNameWindowPixmap (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xCompositeNameWindowPixmapReq);
|
REQUEST(xCompositeNameWindowPixmapReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq);
|
REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
swapl (&stuff->pixmap, n);
|
swapl(&stuff->pixmap);
|
||||||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcCompositeGetOverlayWindow (ClientPtr client)
|
SProcCompositeGetOverlayWindow (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xCompositeGetOverlayWindowReq);
|
REQUEST(xCompositeGetOverlayWindowReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq);
|
REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcCompositeReleaseOverlayWindow (ClientPtr client)
|
SProcCompositeReleaseOverlayWindow (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xCompositeReleaseOverlayWindowReq);
|
REQUEST(xCompositeReleaseOverlayWindowReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq);
|
REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -839,10 +828,9 @@ PanoramiXCompositeGetOverlayWindow (ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.overlayWin);
|
||||||
swapl(&rep.overlayWin, n);
|
|
||||||
}
|
}
|
||||||
(void) WriteToClient(client, sz_xCompositeGetOverlayWindowReply, (char *)&rep);
|
(void) WriteToClient(client, sz_xCompositeGetOverlayWindowReply, (char *)&rep);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,6 @@ ProcDamageQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
DamageClientPtr pDamageClient = GetDamageClient (client);
|
DamageClientPtr pDamageClient = GetDamageClient (client);
|
||||||
xDamageQueryVersionReply rep;
|
xDamageQueryVersionReply rep;
|
||||||
register int n;
|
|
||||||
REQUEST(xDamageQueryVersionReq);
|
REQUEST(xDamageQueryVersionReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDamageQueryVersionReq);
|
REQUEST_SIZE_MATCH(xDamageQueryVersionReq);
|
||||||
|
|
@ -150,10 +149,10 @@ ProcDamageQueryVersion(ClientPtr client)
|
||||||
pDamageClient->major_version = rep.majorVersion;
|
pDamageClient->major_version = rep.majorVersion;
|
||||||
pDamageClient->minor_version = rep.minorVersion;
|
pDamageClient->minor_version = rep.minorVersion;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.majorVersion, n);
|
swapl(&rep.majorVersion);
|
||||||
swapl(&rep.minorVersion, n);
|
swapl(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDamageQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDamageQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -334,65 +333,60 @@ ProcDamageDispatch (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcDamageQueryVersion(ClientPtr client)
|
SProcDamageQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xDamageQueryVersionReq);
|
REQUEST(xDamageQueryVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDamageQueryVersionReq);
|
REQUEST_SIZE_MATCH(xDamageQueryVersionReq);
|
||||||
swapl(&stuff->majorVersion, n);
|
swapl(&stuff->majorVersion);
|
||||||
swapl(&stuff->minorVersion, n);
|
swapl(&stuff->minorVersion);
|
||||||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcDamageCreate (ClientPtr client)
|
SProcDamageCreate (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xDamageCreateReq);
|
REQUEST(xDamageCreateReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDamageCreateReq);
|
REQUEST_SIZE_MATCH(xDamageCreateReq);
|
||||||
swapl (&stuff->damage, n);
|
swapl(&stuff->damage);
|
||||||
swapl (&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcDamageDestroy (ClientPtr client)
|
SProcDamageDestroy (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xDamageDestroyReq);
|
REQUEST(xDamageDestroyReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDamageDestroyReq);
|
REQUEST_SIZE_MATCH(xDamageDestroyReq);
|
||||||
swapl (&stuff->damage, n);
|
swapl(&stuff->damage);
|
||||||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcDamageSubtract (ClientPtr client)
|
SProcDamageSubtract (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xDamageSubtractReq);
|
REQUEST(xDamageSubtractReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDamageSubtractReq);
|
REQUEST_SIZE_MATCH(xDamageSubtractReq);
|
||||||
swapl (&stuff->damage, n);
|
swapl(&stuff->damage);
|
||||||
swapl (&stuff->repair, n);
|
swapl(&stuff->repair);
|
||||||
swapl (&stuff->parts, n);
|
swapl(&stuff->parts);
|
||||||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcDamageAdd (ClientPtr client)
|
SProcDamageAdd (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xDamageAddReq);
|
REQUEST(xDamageAddReq);
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDamageSubtractReq);
|
REQUEST_SIZE_MATCH(xDamageSubtractReq);
|
||||||
swapl (&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swapl (&stuff->region, n);
|
swapl(&stuff->region);
|
||||||
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
return (*ProcDamageVector[stuff->damageReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
63
dbe/dbe.c
63
dbe/dbe.c
|
|
@ -127,8 +127,6 @@ ProcDbeGetVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
/* REQUEST(xDbeGetVersionReq); */
|
/* REQUEST(xDbeGetVersionReq); */
|
||||||
xDbeGetVersionReply rep;
|
xDbeGetVersionReply rep;
|
||||||
register int n;
|
|
||||||
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDbeGetVersionReq);
|
REQUEST_SIZE_MATCH(xDbeGetVersionReq);
|
||||||
|
|
||||||
|
|
@ -140,7 +138,7 @@ ProcDbeGetVersion(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xDbeGetVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDbeGetVersionReply), (char *)&rep);
|
||||||
|
|
@ -656,7 +654,7 @@ ProcDbeGetVisualInfo(ClientPtr client)
|
||||||
xDbeGetVisualInfoReply rep;
|
xDbeGetVisualInfoReply rep;
|
||||||
Drawable *drawables;
|
Drawable *drawables;
|
||||||
DrawablePtr *pDrawables = NULL;
|
DrawablePtr *pDrawables = NULL;
|
||||||
register int i, j, n, rc;
|
register int i, j, rc;
|
||||||
register int count; /* number of visual infos in reply */
|
register int count; /* number of visual infos in reply */
|
||||||
register int length; /* length of reply */
|
register int length; /* length of reply */
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
|
@ -732,9 +730,9 @@ ProcDbeGetVisualInfo(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.m, n);
|
swapl(&rep.m);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send off reply. */
|
/* Send off reply. */
|
||||||
|
|
@ -751,7 +749,7 @@ ProcDbeGetVisualInfo(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swapl(&data32, n);
|
swapl(&data32);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(CARD32), (char *)&data32);
|
WriteToClient(client, sizeof(CARD32), (char *)&data32);
|
||||||
|
|
@ -772,7 +770,7 @@ ProcDbeGetVisualInfo(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swapl(&visInfo.visualID, n);
|
swapl(&visInfo.visualID);
|
||||||
|
|
||||||
/* We do not need to swap depth and perfLevel since they are
|
/* We do not need to swap depth and perfLevel since they are
|
||||||
* already 1 byte quantities.
|
* already 1 byte quantities.
|
||||||
|
|
@ -822,7 +820,7 @@ ProcDbeGetBackBufferAttributes(ClientPtr client)
|
||||||
REQUEST(xDbeGetBackBufferAttributesReq);
|
REQUEST(xDbeGetBackBufferAttributesReq);
|
||||||
xDbeGetBackBufferAttributesReply rep;
|
xDbeGetBackBufferAttributesReply rep;
|
||||||
DbeWindowPrivPtr pDbeWindowPriv;
|
DbeWindowPrivPtr pDbeWindowPriv;
|
||||||
int rc, n;
|
int rc;
|
||||||
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq);
|
REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq);
|
||||||
|
|
@ -845,9 +843,9 @@ ProcDbeGetBackBufferAttributes(ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.attributes, n);
|
swapl(&rep.attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xDbeGetBackBufferAttributesReply),
|
WriteToClient(client, sizeof(xDbeGetBackBufferAttributesReply),
|
||||||
|
|
@ -926,10 +924,8 @@ static int
|
||||||
SProcDbeGetVersion(ClientPtr client)
|
SProcDbeGetVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDbeGetVersionReq);
|
REQUEST(xDbeGetVersionReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->length, n);
|
|
||||||
return(ProcDbeGetVersion(client));
|
return(ProcDbeGetVersion(client));
|
||||||
|
|
||||||
} /* SProcDbeGetVersion() */
|
} /* SProcDbeGetVersion() */
|
||||||
|
|
@ -962,13 +958,12 @@ static int
|
||||||
SProcDbeAllocateBackBufferName(ClientPtr client)
|
SProcDbeAllocateBackBufferName(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDbeAllocateBackBufferNameReq);
|
REQUEST(xDbeAllocateBackBufferNameReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq);
|
REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq);
|
||||||
|
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
swapl(&stuff->buffer, n);
|
swapl(&stuff->buffer);
|
||||||
/* stuff->swapAction is a byte. We do not need to swap this field. */
|
/* stuff->swapAction is a byte. We do not need to swap this field. */
|
||||||
|
|
||||||
return(ProcDbeAllocateBackBufferName(client));
|
return(ProcDbeAllocateBackBufferName(client));
|
||||||
|
|
@ -997,13 +992,11 @@ static int
|
||||||
SProcDbeDeallocateBackBufferName(ClientPtr client)
|
SProcDbeDeallocateBackBufferName(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST (xDbeDeallocateBackBufferNameReq);
|
REQUEST (xDbeDeallocateBackBufferNameReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH(xDbeDeallocateBackBufferNameReq);
|
REQUEST_SIZE_MATCH(xDbeDeallocateBackBufferNameReq);
|
||||||
|
|
||||||
swapl(&stuff->buffer, n);
|
swapl(&stuff->buffer);
|
||||||
|
|
||||||
return(ProcDbeDeallocateBackBufferName(client));
|
return(ProcDbeDeallocateBackBufferName(client));
|
||||||
|
|
||||||
|
|
@ -1035,14 +1028,14 @@ static int
|
||||||
SProcDbeSwapBuffers(ClientPtr client)
|
SProcDbeSwapBuffers(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDbeSwapBuffersReq);
|
REQUEST(xDbeSwapBuffersReq);
|
||||||
register int i, n;
|
register int i;
|
||||||
xDbeSwapInfo *pSwapInfo;
|
xDbeSwapInfo *pSwapInfo;
|
||||||
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq);
|
REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq);
|
||||||
|
|
||||||
swapl(&stuff->n, n);
|
swapl(&stuff->n);
|
||||||
|
|
||||||
if (stuff->n != 0)
|
if (stuff->n != 0)
|
||||||
{
|
{
|
||||||
|
|
@ -1054,7 +1047,7 @@ SProcDbeSwapBuffers(ClientPtr client)
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < stuff->n; i++)
|
for (i = 0; i < stuff->n; i++)
|
||||||
{
|
{
|
||||||
swapl(&pSwapInfo->window, n);
|
swapl(&pSwapInfo->window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1083,9 +1076,8 @@ static int
|
||||||
SProcDbeBeginIdiom(ClientPtr client)
|
SProcDbeBeginIdiom(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDbeBeginIdiomReq);
|
REQUEST(xDbeBeginIdiomReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return(ProcDbeBeginIdiom(client));
|
return(ProcDbeBeginIdiom(client));
|
||||||
|
|
||||||
} /* SProcDbeBeginIdiom() */
|
} /* SProcDbeBeginIdiom() */
|
||||||
|
|
@ -1112,13 +1104,11 @@ static int
|
||||||
SProcDbeGetVisualInfo(ClientPtr client)
|
SProcDbeGetVisualInfo(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDbeGetVisualInfoReq);
|
REQUEST(xDbeGetVisualInfoReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->length, n);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xDbeGetVisualInfoReq);
|
REQUEST_AT_LEAST_SIZE(xDbeGetVisualInfoReq);
|
||||||
|
|
||||||
swapl(&stuff->n, n);
|
swapl(&stuff->n);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
|
|
||||||
return(ProcDbeGetVisualInfo(client));
|
return(ProcDbeGetVisualInfo(client));
|
||||||
|
|
@ -1146,12 +1136,11 @@ static int
|
||||||
SProcDbeGetBackBufferAttributes(ClientPtr client)
|
SProcDbeGetBackBufferAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST (xDbeGetBackBufferAttributesReq);
|
REQUEST (xDbeGetBackBufferAttributesReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq);
|
REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq);
|
||||||
|
|
||||||
swapl(&stuff->buffer, n);
|
swapl(&stuff->buffer);
|
||||||
|
|
||||||
return(ProcDbeGetBackBufferAttributes(client));
|
return(ProcDbeGetBackBufferAttributes(client));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3584,7 +3584,7 @@ ProcInitialConnection(ClientPtr client)
|
||||||
bytes_to_int32(prefix->nbytesAuthString);
|
bytes_to_int32(prefix->nbytesAuthString);
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&stuff->length, whichbyte);
|
swaps(&stuff->length);
|
||||||
}
|
}
|
||||||
ResetCurrentRequest(client);
|
ResetCurrentRequest(client);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
||||||
401
dix/swaprep.c
401
dix/swaprep.c
|
|
@ -74,14 +74,13 @@ void
|
||||||
Swap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
|
Swap32Write(ClientPtr pClient, int size, CARD32 *pbuf)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char n;
|
|
||||||
|
|
||||||
size >>= 2;
|
size >>= 2;
|
||||||
for(i = 0; i < size; i++)
|
for(i = 0; i < size; i++)
|
||||||
/* brackets are mandatory here, because "swapl" macro expands
|
/* brackets are mandatory here, because "swapl" macro expands
|
||||||
to several statements */
|
to several statements */
|
||||||
{
|
{
|
||||||
swapl(&pbuf[i], n);
|
swapl(&pbuf[i]);
|
||||||
}
|
}
|
||||||
(void)WriteToClient(pClient, size << 2, (char *) pbuf);
|
(void)WriteToClient(pClient, size << 2, (char *) pbuf);
|
||||||
}
|
}
|
||||||
|
|
@ -187,9 +186,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf)
|
||||||
void
|
void
|
||||||
SGenericReply(ClientPtr pClient, int size, xGenericReply *pRep)
|
SGenericReply(ClientPtr pClient, int size, xGenericReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
|
||||||
swaps(&pRep->sequenceNumber, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -198,67 +195,57 @@ void
|
||||||
SGetWindowAttributesReply(ClientPtr pClient, int size,
|
SGetWindowAttributesReply(ClientPtr pClient, int size,
|
||||||
xGetWindowAttributesReply *pRep)
|
xGetWindowAttributesReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swapl(&pRep->visualID);
|
||||||
swapl(&pRep->length, n);
|
swaps(&pRep->class);
|
||||||
swapl(&pRep->visualID, n);
|
swapl(&pRep->backingBitPlanes);
|
||||||
swaps(&pRep->class, n);
|
swapl(&pRep->backingPixel);
|
||||||
swapl(&pRep->backingBitPlanes, n);
|
swapl(&pRep->colormap);
|
||||||
swapl(&pRep->backingPixel, n);
|
swapl(&pRep->allEventMasks);
|
||||||
swapl(&pRep->colormap, n);
|
swapl(&pRep->yourEventMask);
|
||||||
swapl(&pRep->allEventMasks, n);
|
swaps(&pRep->doNotPropagateMask);
|
||||||
swapl(&pRep->yourEventMask, n);
|
|
||||||
swaps(&pRep->doNotPropagateMask, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep)
|
SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->root);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->x);
|
||||||
swapl(&pRep->root, n);
|
swaps(&pRep->y);
|
||||||
swaps(&pRep->x, n);
|
swaps(&pRep->width);
|
||||||
swaps(&pRep->y, n);
|
swaps(&pRep->height);
|
||||||
swaps(&pRep->width, n);
|
swaps(&pRep->borderWidth);
|
||||||
swaps(&pRep->height, n);
|
|
||||||
swaps(&pRep->borderWidth, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep)
|
SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swapl(&pRep->root);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->parent);
|
||||||
swapl(&pRep->root, n);
|
swaps(&pRep->nChildren);
|
||||||
swapl(&pRep->parent, n);
|
|
||||||
swaps(&pRep->nChildren, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep)
|
SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->atom);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
|
||||||
swapl(&pRep->atom, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
|
SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->nameLength);
|
||||||
swapl(&pRep->length, n);
|
|
||||||
swaps(&pRep->nameLength, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -266,24 +253,20 @@ SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply *pRep)
|
||||||
void
|
void
|
||||||
SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep)
|
SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swapl(&pRep->propertyType);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->bytesAfter);
|
||||||
swapl(&pRep->propertyType, n);
|
swapl(&pRep->nItems);
|
||||||
swapl(&pRep->bytesAfter, n);
|
|
||||||
swapl(&pRep->nItems, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply *pRep)
|
SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->nProperties);
|
||||||
swapl(&pRep->length, n);
|
|
||||||
swaps(&pRep->nProperties, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -291,10 +274,8 @@ void
|
||||||
SGetSelectionOwnerReply(ClientPtr pClient, int size,
|
SGetSelectionOwnerReply(ClientPtr pClient, int size,
|
||||||
xGetSelectionOwnerReply *pRep)
|
xGetSelectionOwnerReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->owner);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
|
||||||
swapl(&pRep->owner, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -302,27 +283,23 @@ SGetSelectionOwnerReply(ClientPtr pClient, int size,
|
||||||
void
|
void
|
||||||
SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
|
SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->root);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swapl(&pRep->child);
|
||||||
swapl(&pRep->root, n);
|
swaps(&pRep->rootX);
|
||||||
swapl(&pRep->child, n);
|
swaps(&pRep->rootY);
|
||||||
swaps(&pRep->rootX, n);
|
swaps(&pRep->winX);
|
||||||
swaps(&pRep->rootY, n);
|
swaps(&pRep->winY);
|
||||||
swaps(&pRep->winX, n);
|
swaps(&pRep->mask);
|
||||||
swaps(&pRep->winY, n);
|
|
||||||
swaps(&pRep->mask, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SwapTimecoord(xTimecoord* pCoord)
|
SwapTimecoord(xTimecoord* pCoord)
|
||||||
{
|
{
|
||||||
char n;
|
swapl(&pCoord->time);
|
||||||
|
swaps(&pCoord->x);
|
||||||
swapl(&pCoord->time, n);
|
swaps(&pCoord->y);
|
||||||
swaps(&pCoord->x, n);
|
|
||||||
swaps(&pCoord->y, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -344,33 +321,27 @@ SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord *pRep)
|
||||||
void
|
void
|
||||||
SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep)
|
SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swapl(&pRep->nEvents);
|
||||||
swapl(&pRep->length, n);
|
|
||||||
swapl(&pRep->nEvents, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep)
|
STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->child);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->dstX);
|
||||||
swapl(&pRep->child, n);
|
swaps(&pRep->dstY);
|
||||||
swaps(&pRep->dstX, n);
|
|
||||||
swaps(&pRep->dstY, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
|
SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->focus);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
|
||||||
swapl(&pRep->focus, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -378,40 +349,34 @@ SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply *pRep)
|
||||||
void
|
void
|
||||||
SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep)
|
SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
|
||||||
swapl(&pRep->length, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SwapCharInfo(xCharInfo *pInfo)
|
SwapCharInfo(xCharInfo *pInfo)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pInfo->leftSideBearing);
|
||||||
|
swaps(&pInfo->rightSideBearing);
|
||||||
swaps(&pInfo->leftSideBearing, n);
|
swaps(&pInfo->characterWidth);
|
||||||
swaps(&pInfo->rightSideBearing, n);
|
swaps(&pInfo->ascent);
|
||||||
swaps(&pInfo->characterWidth, n);
|
swaps(&pInfo->descent);
|
||||||
swaps(&pInfo->ascent, n);
|
swaps(&pInfo->attributes);
|
||||||
swaps(&pInfo->descent, n);
|
|
||||||
swaps(&pInfo->attributes, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SwapFontInfo(xQueryFontReply *pr)
|
SwapFontInfo(xQueryFontReply *pr)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pr->minCharOrByte2);
|
||||||
|
swaps(&pr->maxCharOrByte2);
|
||||||
swaps(&pr->minCharOrByte2, n);
|
swaps(&pr->defaultChar);
|
||||||
swaps(&pr->maxCharOrByte2, n);
|
swaps(&pr->nFontProps);
|
||||||
swaps(&pr->defaultChar, n);
|
swaps(&pr->fontAscent);
|
||||||
swaps(&pr->nFontProps, n);
|
swaps(&pr->fontDescent);
|
||||||
swaps(&pr->fontAscent, n);
|
|
||||||
swaps(&pr->fontDescent, n);
|
|
||||||
SwapCharInfo( &pr->minBounds);
|
SwapCharInfo( &pr->minBounds);
|
||||||
SwapCharInfo( &pr->maxBounds);
|
SwapCharInfo( &pr->maxBounds);
|
||||||
swapl(&pr->nCharInfos, n);
|
swapl(&pr->nCharInfos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -421,10 +386,9 @@ SwapFont(xQueryFontReply *pr, Bool hasGlyphs)
|
||||||
xCharInfo * pxci;
|
xCharInfo * pxci;
|
||||||
unsigned nchars, nprops;
|
unsigned nchars, nprops;
|
||||||
char *pby;
|
char *pby;
|
||||||
char n;
|
|
||||||
|
|
||||||
swaps(&pr->sequenceNumber, n);
|
swaps(&pr->sequenceNumber);
|
||||||
swapl(&pr->length, n);
|
swapl(&pr->length);
|
||||||
nchars = pr->nCharInfos;
|
nchars = pr->nCharInfos;
|
||||||
nprops = pr->nFontProps;
|
nprops = pr->nFontProps;
|
||||||
SwapFontInfo(pr);
|
SwapFontInfo(pr);
|
||||||
|
|
@ -433,9 +397,9 @@ SwapFont(xQueryFontReply *pr, Bool hasGlyphs)
|
||||||
* they are always 2 4 byte values */
|
* they are always 2 4 byte values */
|
||||||
for(i = 0; i < nprops; i++)
|
for(i = 0; i < nprops; i++)
|
||||||
{
|
{
|
||||||
swapl(pby, n);
|
swapl(pby);
|
||||||
pby += 4;
|
pby += 4;
|
||||||
swapl(pby, n);
|
swapl(pby);
|
||||||
pby += 4;
|
pby += 4;
|
||||||
}
|
}
|
||||||
if (hasGlyphs)
|
if (hasGlyphs)
|
||||||
|
|
@ -456,27 +420,23 @@ SQueryFontReply(ClientPtr pClient, int size, xQueryFontReply *pRep)
|
||||||
void
|
void
|
||||||
SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep)
|
SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swaps(&pRep->fontAscent);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->fontDescent);
|
||||||
swaps(&pRep->fontAscent, n);
|
swaps(&pRep->overallAscent);
|
||||||
swaps(&pRep->fontDescent, n);
|
swaps(&pRep->overallDescent);
|
||||||
swaps(&pRep->overallAscent, n);
|
swapl(&pRep->overallWidth);
|
||||||
swaps(&pRep->overallDescent, n);
|
swapl(&pRep->overallLeft);
|
||||||
swapl(&pRep->overallWidth, n);
|
swapl(&pRep->overallRight);
|
||||||
swapl(&pRep->overallLeft, n);
|
|
||||||
swapl(&pRep->overallRight, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SListFontsReply(ClientPtr pClient, int size, xListFontsReply *pRep)
|
SListFontsReply(ClientPtr pClient, int size, xListFontsReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->nFonts);
|
||||||
swapl(&pRep->length, n);
|
|
||||||
swaps(&pRep->nFonts, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -491,22 +451,18 @@ SListFontsWithInfoReply(ClientPtr pClient, int size,
|
||||||
void
|
void
|
||||||
SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep)
|
SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->nPaths);
|
||||||
swapl(&pRep->length, n);
|
|
||||||
swaps(&pRep->nPaths, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SGetImageReply(ClientPtr pClient, int size, xGetImageReply *pRep)
|
SGetImageReply(ClientPtr pClient, int size, xGetImageReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swapl(&pRep->visual);
|
||||||
swapl(&pRep->length, n);
|
|
||||||
swapl(&pRep->visual, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
/* Fortunately, image doesn't need swapping */
|
/* Fortunately, image doesn't need swapping */
|
||||||
}
|
}
|
||||||
|
|
@ -515,52 +471,44 @@ void
|
||||||
SListInstalledColormapsReply(ClientPtr pClient, int size,
|
SListInstalledColormapsReply(ClientPtr pClient, int size,
|
||||||
xListInstalledColormapsReply *pRep)
|
xListInstalledColormapsReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->nColormaps);
|
||||||
swapl(&pRep->length, n);
|
|
||||||
swaps(&pRep->nColormaps, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SAllocColorReply(ClientPtr pClient, int size, xAllocColorReply *pRep)
|
SAllocColorReply(ClientPtr pClient, int size, xAllocColorReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swaps(&pRep->red);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->green);
|
||||||
swaps(&pRep->red, n);
|
swaps(&pRep->blue);
|
||||||
swaps(&pRep->green, n);
|
swapl(&pRep->pixel);
|
||||||
swaps(&pRep->blue, n);
|
|
||||||
swapl(&pRep->pixel, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep)
|
SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->pixel);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->exactRed);
|
||||||
swapl(&pRep->pixel, n);
|
swaps(&pRep->exactGreen);
|
||||||
swaps(&pRep->exactRed, n);
|
swaps(&pRep->exactBlue);
|
||||||
swaps(&pRep->exactGreen, n);
|
swaps(&pRep->screenRed);
|
||||||
swaps(&pRep->exactBlue, n);
|
swaps(&pRep->screenGreen);
|
||||||
swaps(&pRep->screenRed, n);
|
swaps(&pRep->screenBlue);
|
||||||
swaps(&pRep->screenGreen, n);
|
|
||||||
swaps(&pRep->screenBlue, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
|
SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->nPixels);
|
||||||
swapl(&pRep->length, n);
|
swaps(&pRep->nMasks);
|
||||||
swaps(&pRep->nPixels, n);
|
|
||||||
swaps(&pRep->nMasks, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -568,25 +516,21 @@ SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply *pRep)
|
||||||
void
|
void
|
||||||
SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep)
|
SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->nPixels);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->redMask);
|
||||||
swaps(&pRep->nPixels, n);
|
swapl(&pRep->greenMask);
|
||||||
swapl(&pRep->redMask, n);
|
swapl(&pRep->blueMask);
|
||||||
swapl(&pRep->greenMask, n);
|
|
||||||
swapl(&pRep->blueMask, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SwapRGB(xrgb *prgb)
|
SwapRGB(xrgb *prgb)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&prgb->red);
|
||||||
|
swaps(&prgb->green);
|
||||||
swaps(&prgb->red, n);
|
swaps(&prgb->blue);
|
||||||
swaps(&prgb->green, n);
|
|
||||||
swaps(&prgb->blue, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -608,47 +552,39 @@ SQColorsExtend(ClientPtr pClient, int size, xrgb *prgb)
|
||||||
void
|
void
|
||||||
SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep)
|
SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply* pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->nColors);
|
||||||
swapl(&pRep->length, n);
|
|
||||||
swaps(&pRep->nColors, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep)
|
SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swaps(&pRep->exactRed);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->exactGreen);
|
||||||
swaps(&pRep->exactRed, n);
|
swaps(&pRep->exactBlue);
|
||||||
swaps(&pRep->exactGreen, n);
|
swaps(&pRep->screenRed);
|
||||||
swaps(&pRep->exactBlue, n);
|
swaps(&pRep->screenGreen);
|
||||||
swaps(&pRep->screenRed, n);
|
swaps(&pRep->screenBlue);
|
||||||
swaps(&pRep->screenGreen, n);
|
|
||||||
swaps(&pRep->screenBlue, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep)
|
SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swaps(&pRep->width);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->height);
|
||||||
swaps(&pRep->width, n);
|
|
||||||
swaps(&pRep->height, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply *pRep)
|
SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
|
||||||
swapl(&pRep->length, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -656,10 +592,8 @@ void
|
||||||
SGetKeyboardMappingReply(ClientPtr pClient, int size,
|
SGetKeyboardMappingReply(ClientPtr pClient, int size,
|
||||||
xGetKeyboardMappingReply *pRep)
|
xGetKeyboardMappingReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
|
||||||
swapl(&pRep->length, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -667,10 +601,8 @@ void
|
||||||
SGetPointerMappingReply(ClientPtr pClient, int size,
|
SGetPointerMappingReply(ClientPtr pClient, int size,
|
||||||
xGetPointerMappingReply *pRep)
|
xGetPointerMappingReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
|
||||||
swapl(&pRep->length, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -678,46 +610,38 @@ void
|
||||||
SGetModifierMappingReply(ClientPtr pClient, int size,
|
SGetModifierMappingReply(ClientPtr pClient, int size,
|
||||||
xGetModifierMappingReply *pRep)
|
xGetModifierMappingReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
|
||||||
swapl(&pRep->length, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *pRep)
|
SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swapl(&pRep->ledMask);
|
||||||
swapl(&pRep->length, n);
|
swaps(&pRep->bellPitch);
|
||||||
swapl(&pRep->ledMask, n);
|
swaps(&pRep->bellDuration);
|
||||||
swaps(&pRep->bellPitch, n);
|
|
||||||
swaps(&pRep->bellDuration, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pRep)
|
SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swaps(&pRep->accelNumerator);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->accelDenominator);
|
||||||
swaps(&pRep->accelNumerator, n);
|
swaps(&pRep->threshold);
|
||||||
swaps(&pRep->accelDenominator, n);
|
|
||||||
swaps(&pRep->threshold, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply *pRep)
|
SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swaps(&pRep->timeout);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->interval);
|
||||||
swaps(&pRep->timeout, n);
|
|
||||||
swaps(&pRep->interval, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -729,8 +653,7 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf)
|
||||||
while (bufT < endbuf) {
|
while (bufT < endbuf) {
|
||||||
xHostEntry *host = (xHostEntry *) bufT;
|
xHostEntry *host = (xHostEntry *) bufT;
|
||||||
int len = host->length;
|
int len = host->length;
|
||||||
char n;
|
swaps(&host->length);
|
||||||
swaps (&host->length, n);
|
|
||||||
bufT += sizeof (xHostEntry) + pad_to_int32(len);
|
bufT += sizeof (xHostEntry) + pad_to_int32(len);
|
||||||
}
|
}
|
||||||
(void)WriteToClient (pClient, size, buf);
|
(void)WriteToClient (pClient, size, buf);
|
||||||
|
|
@ -739,11 +662,9 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf)
|
||||||
void
|
void
|
||||||
SListHostsReply(ClientPtr pClient, int size, xListHostsReply *pRep)
|
SListHostsReply(ClientPtr pClient, int size, xListHostsReply *pRep)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&pRep->sequenceNumber);
|
||||||
|
swapl(&pRep->length);
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->nHosts);
|
||||||
swapl(&pRep->length, n);
|
|
||||||
swaps(&pRep->nHosts, n);
|
|
||||||
(void)WriteToClient(pClient, size, (char *) pRep);
|
(void)WriteToClient(pClient, size, (char *) pRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
728
dix/swapreq.c
728
dix/swapreq.c
File diff suppressed because it is too large
Load diff
241
hw/dmx/dmx.c
241
hw/dmx/dmx.c
|
|
@ -174,7 +174,6 @@ static int dmxFetchInputAttributes(unsigned int mask,
|
||||||
static int ProcDMXQueryVersion(ClientPtr client)
|
static int ProcDMXQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
xDMXQueryVersionReply rep;
|
xDMXQueryVersionReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDMXQueryVersionReq);
|
REQUEST_SIZE_MATCH(xDMXQueryVersionReq);
|
||||||
|
|
||||||
|
|
@ -185,11 +184,11 @@ static int ProcDMXQueryVersion(ClientPtr client)
|
||||||
rep.minorVersion = SERVER_DMX_MINOR_VERSION;
|
rep.minorVersion = SERVER_DMX_MINOR_VERSION;
|
||||||
rep.patchVersion = SERVER_DMX_PATCH_VERSION;
|
rep.patchVersion = SERVER_DMX_PATCH_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.majorVersion, n);
|
swapl(&rep.majorVersion);
|
||||||
swapl(&rep.minorVersion, n);
|
swapl(&rep.minorVersion);
|
||||||
swapl(&rep.patchVersion, n);
|
swapl(&rep.patchVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDMXQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDMXQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -198,7 +197,6 @@ static int ProcDMXQueryVersion(ClientPtr client)
|
||||||
static int ProcDMXSync(ClientPtr client)
|
static int ProcDMXSync(ClientPtr client)
|
||||||
{
|
{
|
||||||
xDMXSyncReply rep;
|
xDMXSyncReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDMXSyncReq);
|
REQUEST_SIZE_MATCH(xDMXSyncReq);
|
||||||
|
|
||||||
|
|
@ -209,9 +207,9 @@ static int ProcDMXSync(ClientPtr client)
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.status = 0;
|
rep.status = 0;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.status, n);
|
swapl(&rep.status);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDMXSyncReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDMXSyncReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -222,7 +220,6 @@ static int ProcDMXForceWindowCreation(ClientPtr client)
|
||||||
xDMXForceWindowCreationReply rep;
|
xDMXForceWindowCreationReply rep;
|
||||||
REQUEST(xDMXForceWindowCreationReq);
|
REQUEST(xDMXForceWindowCreationReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq);
|
REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq);
|
||||||
|
|
||||||
|
|
@ -259,9 +256,9 @@ static int ProcDMXForceWindowCreation(ClientPtr client)
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.status = 0;
|
rep.status = 0;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.status, n);
|
swapl(&rep.status);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDMXForceWindowCreationReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDMXForceWindowCreationReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -270,7 +267,6 @@ static int ProcDMXForceWindowCreation(ClientPtr client)
|
||||||
static int ProcDMXGetScreenCount(ClientPtr client)
|
static int ProcDMXGetScreenCount(ClientPtr client)
|
||||||
{
|
{
|
||||||
xDMXGetScreenCountReply rep;
|
xDMXGetScreenCountReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDMXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xDMXGetScreenCountReq);
|
||||||
|
|
||||||
|
|
@ -279,9 +275,9 @@ static int ProcDMXGetScreenCount(ClientPtr client)
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.screenCount = dmxGetNumScreens();
|
rep.screenCount = dmxGetNumScreens();
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.screenCount, n);
|
swapl(&rep.screenCount);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDMXGetScreenCountReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDMXGetScreenCountReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -291,7 +287,6 @@ static int ProcDMXGetScreenAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDMXGetScreenAttributesReq);
|
REQUEST(xDMXGetScreenAttributesReq);
|
||||||
xDMXGetScreenAttributesReply rep;
|
xDMXGetScreenAttributesReply rep;
|
||||||
int n;
|
|
||||||
int length;
|
int length;
|
||||||
int paddedLength;
|
int paddedLength;
|
||||||
DMXScreenAttributesRec attr;
|
DMXScreenAttributesRec attr;
|
||||||
|
|
@ -325,20 +320,20 @@ static int ProcDMXGetScreenAttributes(ClientPtr client)
|
||||||
rep.displayNameLength = length;
|
rep.displayNameLength = length;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.displayNameLength, n);
|
swapl(&rep.displayNameLength);
|
||||||
swapl(&rep.logicalScreen, n);
|
swapl(&rep.logicalScreen);
|
||||||
swaps(&rep.screenWindowWidth, n);
|
swaps(&rep.screenWindowWidth);
|
||||||
swaps(&rep.screenWindowHeight, n);
|
swaps(&rep.screenWindowHeight);
|
||||||
swaps(&rep.screenWindowXoffset, n);
|
swaps(&rep.screenWindowXoffset);
|
||||||
swaps(&rep.screenWindowYoffset, n);
|
swaps(&rep.screenWindowYoffset);
|
||||||
swaps(&rep.rootWindowWidth, n);
|
swaps(&rep.rootWindowWidth);
|
||||||
swaps(&rep.rootWindowHeight, n);
|
swaps(&rep.rootWindowHeight);
|
||||||
swaps(&rep.rootWindowXoffset, n);
|
swaps(&rep.rootWindowXoffset);
|
||||||
swaps(&rep.rootWindowYoffset, n);
|
swaps(&rep.rootWindowYoffset);
|
||||||
swaps(&rep.rootWindowXorigin, n);
|
swaps(&rep.rootWindowXorigin);
|
||||||
swaps(&rep.rootWindowYorigin, n);
|
swaps(&rep.rootWindowYorigin);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDMXGetScreenAttributesReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDMXGetScreenAttributesReply), (char *)&rep);
|
||||||
if (length) WriteToClient(client, length, (char *)attr.displayName);
|
if (length) WriteToClient(client, length, (char *)attr.displayName);
|
||||||
|
|
@ -349,7 +344,6 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDMXChangeScreensAttributesReq);
|
REQUEST(xDMXChangeScreensAttributesReq);
|
||||||
xDMXChangeScreensAttributesReply rep;
|
xDMXChangeScreensAttributesReply rep;
|
||||||
int n;
|
|
||||||
int status = DMX_BAD_XINERAMA;
|
int status = DMX_BAD_XINERAMA;
|
||||||
unsigned int mask = 0;
|
unsigned int mask = 0;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
@ -407,10 +401,10 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
|
||||||
rep.status = status;
|
rep.status = status;
|
||||||
rep.errorScreen = errorScreen;
|
rep.errorScreen = errorScreen;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.status, n);
|
swapl(&rep.status);
|
||||||
swapl(&rep.errorScreen, n);
|
swapl(&rep.errorScreen);
|
||||||
}
|
}
|
||||||
WriteToClient(client,
|
WriteToClient(client,
|
||||||
sizeof(xDMXChangeScreensAttributesReply),
|
sizeof(xDMXChangeScreensAttributesReply),
|
||||||
|
|
@ -422,7 +416,6 @@ static int ProcDMXAddScreen(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDMXAddScreenReq);
|
REQUEST(xDMXAddScreenReq);
|
||||||
xDMXAddScreenReply rep;
|
xDMXAddScreenReply rep;
|
||||||
int n;
|
|
||||||
int status = 0;
|
int status = 0;
|
||||||
CARD32 *value_list;
|
CARD32 *value_list;
|
||||||
DMXScreenAttributesRec attr;
|
DMXScreenAttributesRec attr;
|
||||||
|
|
@ -458,10 +451,10 @@ static int ProcDMXAddScreen(ClientPtr client)
|
||||||
rep.status = status;
|
rep.status = status;
|
||||||
rep.physicalScreen = stuff->physicalScreen;
|
rep.physicalScreen = stuff->physicalScreen;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.status, n);
|
swapl(&rep.status);
|
||||||
swapl(&rep.physicalScreen, n);
|
swapl(&rep.physicalScreen);
|
||||||
}
|
}
|
||||||
WriteToClient(client,
|
WriteToClient(client,
|
||||||
sizeof(xDMXAddScreenReply),
|
sizeof(xDMXAddScreenReply),
|
||||||
|
|
@ -473,7 +466,6 @@ static int ProcDMXRemoveScreen(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDMXRemoveScreenReq);
|
REQUEST(xDMXRemoveScreenReq);
|
||||||
xDMXRemoveScreenReply rep;
|
xDMXRemoveScreenReply rep;
|
||||||
int n;
|
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDMXRemoveScreenReq);
|
REQUEST_SIZE_MATCH(xDMXRemoveScreenReq);
|
||||||
|
|
@ -485,9 +477,9 @@ static int ProcDMXRemoveScreen(ClientPtr client)
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.status = status;
|
rep.status = status;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.status, n);
|
swapl(&rep.status);
|
||||||
}
|
}
|
||||||
WriteToClient(client,
|
WriteToClient(client,
|
||||||
sizeof(xDMXRemoveScreenReply),
|
sizeof(xDMXRemoveScreenReply),
|
||||||
|
|
@ -563,7 +555,7 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDMXGetWindowAttributesReq);
|
REQUEST(xDMXGetWindowAttributesReq);
|
||||||
xDMXGetWindowAttributesReply rep;
|
xDMXGetWindowAttributesReply rep;
|
||||||
int i, n;
|
int i;
|
||||||
CARD32 *screens;
|
CARD32 *screens;
|
||||||
CARD32 *windows;
|
CARD32 *windows;
|
||||||
xRectangle *pos, *vis;
|
xRectangle *pos, *vis;
|
||||||
|
|
@ -603,22 +595,22 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
|
||||||
rep.length = count * 6;
|
rep.length = count * 6;
|
||||||
rep.screenCount = count;
|
rep.screenCount = count;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.screenCount, n);
|
swapl(&rep.screenCount);
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
swapl(&screens[i], n);
|
swapl(&screens[i]);
|
||||||
swapl(&windows[i], n);
|
swapl(&windows[i]);
|
||||||
|
|
||||||
swaps(&pos[i].x, n);
|
swaps(&pos[i].x);
|
||||||
swaps(&pos[i].y, n);
|
swaps(&pos[i].y);
|
||||||
swaps(&pos[i].width, n);
|
swaps(&pos[i].width);
|
||||||
swaps(&pos[i].height, n);
|
swaps(&pos[i].height);
|
||||||
|
|
||||||
swaps(&vis[i].x, n);
|
swaps(&vis[i].x);
|
||||||
swaps(&vis[i].y, n);
|
swaps(&vis[i].y);
|
||||||
swaps(&vis[i].width, n);
|
swaps(&vis[i].width);
|
||||||
swaps(&vis[i].height, n);
|
swaps(&vis[i].height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -643,7 +635,6 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
|
||||||
static int ProcDMXGetDesktopAttributes(ClientPtr client)
|
static int ProcDMXGetDesktopAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
xDMXGetDesktopAttributesReply rep;
|
xDMXGetDesktopAttributesReply rep;
|
||||||
int n;
|
|
||||||
DMXDesktopAttributesRec attr;
|
DMXDesktopAttributesRec attr;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq);
|
REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq);
|
||||||
|
|
@ -660,12 +651,12 @@ static int ProcDMXGetDesktopAttributes(ClientPtr client)
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.width, n);
|
swapl(&rep.width);
|
||||||
swapl(&rep.height, n);
|
swapl(&rep.height);
|
||||||
swapl(&rep.shiftX, n);
|
swapl(&rep.shiftX);
|
||||||
swapl(&rep.shiftY, n);
|
swapl(&rep.shiftY);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDMXGetDesktopAttributesReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDMXGetDesktopAttributesReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -675,7 +666,6 @@ static int ProcDMXChangeDesktopAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDMXChangeDesktopAttributesReq);
|
REQUEST(xDMXChangeDesktopAttributesReq);
|
||||||
xDMXChangeDesktopAttributesReply rep;
|
xDMXChangeDesktopAttributesReply rep;
|
||||||
int n;
|
|
||||||
int status = DMX_BAD_XINERAMA;
|
int status = DMX_BAD_XINERAMA;
|
||||||
CARD32 *value_list;
|
CARD32 *value_list;
|
||||||
DMXDesktopAttributesRec attr;
|
DMXDesktopAttributesRec attr;
|
||||||
|
|
@ -704,9 +694,9 @@ static int ProcDMXChangeDesktopAttributes(ClientPtr client)
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.status = status;
|
rep.status = status;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.status, n);
|
swapl(&rep.status);
|
||||||
}
|
}
|
||||||
WriteToClient(client,
|
WriteToClient(client,
|
||||||
sizeof(xDMXChangeDesktopAttributesReply),
|
sizeof(xDMXChangeDesktopAttributesReply),
|
||||||
|
|
@ -717,7 +707,6 @@ static int ProcDMXChangeDesktopAttributes(ClientPtr client)
|
||||||
static int ProcDMXGetInputCount(ClientPtr client)
|
static int ProcDMXGetInputCount(ClientPtr client)
|
||||||
{
|
{
|
||||||
xDMXGetInputCountReply rep;
|
xDMXGetInputCountReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDMXGetInputCountReq);
|
REQUEST_SIZE_MATCH(xDMXGetInputCountReq);
|
||||||
|
|
||||||
|
|
@ -726,9 +715,9 @@ static int ProcDMXGetInputCount(ClientPtr client)
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.inputCount = dmxGetInputCount();
|
rep.inputCount = dmxGetInputCount();
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.inputCount, n);
|
swapl(&rep.inputCount);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDMXGetInputCountReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDMXGetInputCountReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -738,7 +727,6 @@ static int ProcDMXGetInputAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDMXGetInputAttributesReq);
|
REQUEST(xDMXGetInputAttributesReq);
|
||||||
xDMXGetInputAttributesReply rep;
|
xDMXGetInputAttributesReply rep;
|
||||||
int n;
|
|
||||||
int length;
|
int length;
|
||||||
int paddedLength;
|
int paddedLength;
|
||||||
DMXInputAttributesRec attr;
|
DMXInputAttributesRec attr;
|
||||||
|
|
@ -760,12 +748,12 @@ static int ProcDMXGetInputAttributes(ClientPtr client)
|
||||||
rep.length = bytes_to_int32(paddedLength);
|
rep.length = bytes_to_int32(paddedLength);
|
||||||
rep.nameLength = length;
|
rep.nameLength = length;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.inputType, n);
|
swapl(&rep.inputType);
|
||||||
swapl(&rep.physicalScreen, n);
|
swapl(&rep.physicalScreen);
|
||||||
swapl(&rep.physicalId, n);
|
swapl(&rep.physicalId);
|
||||||
swapl(&rep.nameLength, n);
|
swapl(&rep.nameLength);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDMXGetInputAttributesReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDMXGetInputAttributesReply), (char *)&rep);
|
||||||
if (length) WriteToClient(client, length, (char *)attr.name);
|
if (length) WriteToClient(client, length, (char *)attr.name);
|
||||||
|
|
@ -776,7 +764,6 @@ static int ProcDMXAddInput(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDMXAddInputReq);
|
REQUEST(xDMXAddInputReq);
|
||||||
xDMXAddInputReply rep;
|
xDMXAddInputReply rep;
|
||||||
int n;
|
|
||||||
int status = 0;
|
int status = 0;
|
||||||
CARD32 *value_list;
|
CARD32 *value_list;
|
||||||
DMXInputAttributesRec attr;
|
DMXInputAttributesRec attr;
|
||||||
|
|
@ -814,10 +801,10 @@ static int ProcDMXAddInput(ClientPtr client)
|
||||||
rep.status = status;
|
rep.status = status;
|
||||||
rep.physicalId = id;
|
rep.physicalId = id;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.status, n);
|
swapl(&rep.status);
|
||||||
swapl(&rep.physicalId, n);
|
swapl(&rep.physicalId);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDMXAddInputReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDMXAddInputReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -827,7 +814,6 @@ static int ProcDMXRemoveInput(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDMXRemoveInputReq);
|
REQUEST(xDMXRemoveInputReq);
|
||||||
xDMXRemoveInputReply rep;
|
xDMXRemoveInputReply rep;
|
||||||
int n;
|
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDMXRemoveInputReq);
|
REQUEST_SIZE_MATCH(xDMXRemoveInputReq);
|
||||||
|
|
@ -841,9 +827,9 @@ static int ProcDMXRemoveInput(ClientPtr client)
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.status = status;
|
rep.status = status;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.status, n);
|
swapl(&rep.status);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xDMXRemoveInputReply), (char *)&rep);
|
WriteToClient(client, sizeof(xDMXRemoveInputReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -883,79 +869,72 @@ static int ProcDMXDispatch(ClientPtr client)
|
||||||
|
|
||||||
static int SProcDMXQueryVersion(ClientPtr client)
|
static int SProcDMXQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXQueryVersionReq);
|
REQUEST(xDMXQueryVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDMXQueryVersionReq);
|
REQUEST_SIZE_MATCH(xDMXQueryVersionReq);
|
||||||
return ProcDMXQueryVersion(client);
|
return ProcDMXQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXSync(ClientPtr client)
|
static int SProcDMXSync(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXSyncReq);
|
REQUEST(xDMXSyncReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDMXSyncReq);
|
REQUEST_SIZE_MATCH(xDMXSyncReq);
|
||||||
return ProcDMXSync(client);
|
return ProcDMXSync(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXForceWindowCreation(ClientPtr client)
|
static int SProcDMXForceWindowCreation(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXForceWindowCreationReq);
|
REQUEST(xDMXForceWindowCreationReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq);
|
REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq);
|
||||||
swaps(&stuff->window, n);
|
swaps(&stuff->window);
|
||||||
return ProcDMXForceWindowCreation(client);
|
return ProcDMXForceWindowCreation(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXGetScreenCount(ClientPtr client)
|
static int SProcDMXGetScreenCount(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXGetScreenCountReq);
|
REQUEST(xDMXGetScreenCountReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDMXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xDMXGetScreenCountReq);
|
||||||
return ProcDMXGetScreenCount(client);
|
return ProcDMXGetScreenCount(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXGetScreenAttributes(ClientPtr client)
|
static int SProcDMXGetScreenAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXGetScreenAttributesReq);
|
REQUEST(xDMXGetScreenAttributesReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDMXGetScreenAttributesReq);
|
REQUEST_SIZE_MATCH(xDMXGetScreenAttributesReq);
|
||||||
swapl(&stuff->physicalScreen, n);
|
swapl(&stuff->physicalScreen);
|
||||||
return ProcDMXGetScreenAttributes(client);
|
return ProcDMXGetScreenAttributes(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXChangeScreensAttributes(ClientPtr client)
|
static int SProcDMXChangeScreensAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXChangeScreensAttributesReq);
|
REQUEST(xDMXChangeScreensAttributesReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xDMXGetScreenAttributesReq);
|
REQUEST_AT_LEAST_SIZE(xDMXGetScreenAttributesReq);
|
||||||
swapl(&stuff->screenCount, n);
|
swapl(&stuff->screenCount);
|
||||||
swapl(&stuff->maskCount, n);
|
swapl(&stuff->maskCount);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return ProcDMXGetScreenAttributes(client);
|
return ProcDMXGetScreenAttributes(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXAddScreen(ClientPtr client)
|
static int SProcDMXAddScreen(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
int paddedLength;
|
int paddedLength;
|
||||||
REQUEST(xDMXAddScreenReq);
|
REQUEST(xDMXAddScreenReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xDMXAddScreenReq);
|
REQUEST_AT_LEAST_SIZE(xDMXAddScreenReq);
|
||||||
swapl(&stuff->displayNameLength, n);
|
swapl(&stuff->displayNameLength);
|
||||||
swapl(&stuff->valueMask, n);
|
swapl(&stuff->valueMask);
|
||||||
paddedLength = pad_to_int32(stuff->displayNameLength);
|
paddedLength = pad_to_int32(stuff->displayNameLength);
|
||||||
SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4);
|
SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4);
|
||||||
return ProcDMXAddScreen(client);
|
return ProcDMXAddScreen(client);
|
||||||
|
|
@ -963,79 +942,72 @@ static int SProcDMXAddScreen(ClientPtr client)
|
||||||
|
|
||||||
static int SProcDMXRemoveScreen(ClientPtr client)
|
static int SProcDMXRemoveScreen(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXRemoveScreenReq);
|
REQUEST(xDMXRemoveScreenReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDMXRemoveScreenReq);
|
REQUEST_SIZE_MATCH(xDMXRemoveScreenReq);
|
||||||
swapl(&stuff->physicalScreen, n);
|
swapl(&stuff->physicalScreen);
|
||||||
return ProcDMXRemoveScreen(client);
|
return ProcDMXRemoveScreen(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXGetWindowAttributes(ClientPtr client)
|
static int SProcDMXGetWindowAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXGetWindowAttributesReq);
|
REQUEST(xDMXGetWindowAttributesReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq);
|
REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return ProcDMXGetWindowAttributes(client);
|
return ProcDMXGetWindowAttributes(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXGetDesktopAttributes(ClientPtr client)
|
static int SProcDMXGetDesktopAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXGetDesktopAttributesReq);
|
REQUEST(xDMXGetDesktopAttributesReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq);
|
REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq);
|
||||||
return ProcDMXGetDesktopAttributes(client);
|
return ProcDMXGetDesktopAttributes(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXChangeDesktopAttributes(ClientPtr client)
|
static int SProcDMXChangeDesktopAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXChangeDesktopAttributesReq);
|
REQUEST(xDMXChangeDesktopAttributesReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xDMXChangeDesktopAttributesReq);
|
REQUEST_AT_LEAST_SIZE(xDMXChangeDesktopAttributesReq);
|
||||||
swapl(&stuff->valueMask, n);
|
swapl(&stuff->valueMask);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return ProcDMXChangeDesktopAttributes(client);
|
return ProcDMXChangeDesktopAttributes(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXGetInputCount(ClientPtr client)
|
static int SProcDMXGetInputCount(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXGetInputCountReq);
|
REQUEST(xDMXGetInputCountReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDMXGetInputCountReq);
|
REQUEST_SIZE_MATCH(xDMXGetInputCountReq);
|
||||||
return ProcDMXGetInputCount(client);
|
return ProcDMXGetInputCount(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXGetInputAttributes(ClientPtr client)
|
static int SProcDMXGetInputAttributes(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXGetInputAttributesReq);
|
REQUEST(xDMXGetInputAttributesReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDMXGetInputAttributesReq);
|
REQUEST_SIZE_MATCH(xDMXGetInputAttributesReq);
|
||||||
swapl(&stuff->deviceId, n);
|
swapl(&stuff->deviceId);
|
||||||
return ProcDMXGetInputAttributes(client);
|
return ProcDMXGetInputAttributes(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SProcDMXAddInput(ClientPtr client)
|
static int SProcDMXAddInput(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
int paddedLength;
|
int paddedLength;
|
||||||
REQUEST(xDMXAddInputReq);
|
REQUEST(xDMXAddInputReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xDMXAddInputReq);
|
REQUEST_AT_LEAST_SIZE(xDMXAddInputReq);
|
||||||
swapl(&stuff->displayNameLength, n);
|
swapl(&stuff->displayNameLength);
|
||||||
swapl(&stuff->valueMask, n);
|
swapl(&stuff->valueMask);
|
||||||
paddedLength = pad_to_int32(stuff->displayNameLength);
|
paddedLength = pad_to_int32(stuff->displayNameLength);
|
||||||
SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4);
|
SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4);
|
||||||
return ProcDMXAddInput(client);
|
return ProcDMXAddInput(client);
|
||||||
|
|
@ -1043,12 +1015,11 @@ static int SProcDMXAddInput(ClientPtr client)
|
||||||
|
|
||||||
static int SProcDMXRemoveInput(ClientPtr client)
|
static int SProcDMXRemoveInput(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xDMXRemoveInputReq);
|
REQUEST(xDMXRemoveInputReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xDMXRemoveInputReq);
|
REQUEST_SIZE_MATCH(xDMXRemoveInputReq);
|
||||||
swapl(&stuff->physicalId, n);
|
swapl(&stuff->physicalId);
|
||||||
return ProcDMXRemoveInput(client);
|
return ProcDMXRemoveInput(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -541,7 +541,6 @@ static int
|
||||||
ProcXF86DRIQueryVersion (register ClientPtr client)
|
ProcXF86DRIQueryVersion (register ClientPtr client)
|
||||||
{
|
{
|
||||||
xXF86DRIQueryVersionReply rep;
|
xXF86DRIQueryVersionReply rep;
|
||||||
register int n;
|
|
||||||
REQUEST_SIZE_MATCH(xXF86DRIQueryVersionReq);
|
REQUEST_SIZE_MATCH(xXF86DRIQueryVersionReq);
|
||||||
|
|
||||||
EPHYR_LOG ("enter\n") ;
|
EPHYR_LOG ("enter\n") ;
|
||||||
|
|
@ -553,11 +552,11 @@ ProcXF86DRIQueryVersion (register ClientPtr client)
|
||||||
rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION;
|
rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION;
|
||||||
rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION;
|
rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
swapl(&rep.patchVersion, n);
|
swapl(&rep.patchVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
|
||||||
EPHYR_LOG ("leave\n") ;
|
EPHYR_LOG ("leave\n") ;
|
||||||
|
|
@ -569,7 +568,6 @@ ProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client)
|
||||||
{
|
{
|
||||||
xXF86DRIQueryDirectRenderingCapableReply rep;
|
xXF86DRIQueryDirectRenderingCapableReply rep;
|
||||||
Bool isCapable;
|
Bool isCapable;
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
||||||
REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
|
REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
|
||||||
|
|
||||||
|
|
@ -592,8 +590,8 @@ ProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client)
|
||||||
rep.isCapable = 0;
|
rep.isCapable = 0;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xXF86DRIQueryDirectRenderingCapableReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXF86DRIQueryDirectRenderingCapableReply), (char *)&rep);
|
||||||
|
|
@ -1311,19 +1309,17 @@ ProcXF86DRIDispatch (register ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcXF86DRIQueryVersion (register ClientPtr client)
|
SProcXF86DRIQueryVersion (register ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86DRIQueryVersionReq);
|
REQUEST(xXF86DRIQueryVersionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return ProcXF86DRIQueryVersion(client);
|
return ProcXF86DRIQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client)
|
SProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->screen, n);
|
swapl(&stuff->screen);
|
||||||
return ProcXF86DRIQueryDirectRenderingCapable(client);
|
return ProcXF86DRIQueryDirectRenderingCapable(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ ephyrHostProxyDoForward (pointer a_request_buffer,
|
||||||
EPHYR_LOG ("enter\n") ;
|
EPHYR_LOG ("enter\n") ;
|
||||||
|
|
||||||
if (a_do_swap) {
|
if (a_do_swap) {
|
||||||
swaps (&in_req->length, n) ;
|
swaps(&in_req->length) ;
|
||||||
}
|
}
|
||||||
EPHYR_LOG ("Req {type:%d, data:%d, length:%d}\n",
|
EPHYR_LOG ("Req {type:%d, data:%d, length:%d}\n",
|
||||||
in_req->reqType, in_req->data, in_req->length) ;
|
in_req->reqType, in_req->data, in_req->length) ;
|
||||||
|
|
|
||||||
|
|
@ -760,8 +760,7 @@ vfbWriteXWDFileHeader(ScreenPtr pScreen)
|
||||||
SwapLongs((CARD32 *)pXWDHeader, SIZEOF(XWDheader)/4);
|
SwapLongs((CARD32 *)pXWDHeader, SIZEOF(XWDheader)/4);
|
||||||
for (i = 0; i < pvfb->ncolors; i++)
|
for (i = 0; i < pvfb->ncolors; i++)
|
||||||
{
|
{
|
||||||
register char n;
|
swapl(&pvfb->pXWDCmap[i].pixel);
|
||||||
swapl(&pvfb->pXWDCmap[i].pixel, n);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,6 @@ static int
|
||||||
ProcXF86VidModeQueryVersion(ClientPtr client)
|
ProcXF86VidModeQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
xXF86VidModeQueryVersionReply rep;
|
xXF86VidModeQueryVersionReply rep;
|
||||||
register int n;
|
|
||||||
|
|
||||||
DEBUG_P("XF86VidModeQueryVersion");
|
DEBUG_P("XF86VidModeQueryVersion");
|
||||||
|
|
||||||
|
|
@ -293,10 +292,10 @@ ProcXF86VidModeQueryVersion(ClientPtr client)
|
||||||
rep.majorVersion = SERVER_XF86VIDMODE_MAJOR_VERSION;
|
rep.majorVersion = SERVER_XF86VIDMODE_MAJOR_VERSION;
|
||||||
rep.minorVersion = SERVER_XF86VIDMODE_MINOR_VERSION;
|
rep.minorVersion = SERVER_XF86VIDMODE_MINOR_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -309,7 +308,6 @@ ProcXF86VidModeGetModeLine(ClientPtr client)
|
||||||
xXF86VidModeGetModeLineReply rep;
|
xXF86VidModeGetModeLineReply rep;
|
||||||
xXF86OldVidModeGetModeLineReply oldrep;
|
xXF86OldVidModeGetModeLineReply oldrep;
|
||||||
pointer mode;
|
pointer mode;
|
||||||
register int n;
|
|
||||||
int dotClock;
|
int dotClock;
|
||||||
int ver;
|
int ver;
|
||||||
|
|
||||||
|
|
@ -364,20 +362,20 @@ ProcXF86VidModeGetModeLine(ClientPtr client)
|
||||||
rep.privsize = 0;
|
rep.privsize = 0;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.dotclock, n);
|
swapl(&rep.dotclock);
|
||||||
swaps(&rep.hdisplay, n);
|
swaps(&rep.hdisplay);
|
||||||
swaps(&rep.hsyncstart, n);
|
swaps(&rep.hsyncstart);
|
||||||
swaps(&rep.hsyncend, n);
|
swaps(&rep.hsyncend);
|
||||||
swaps(&rep.htotal, n);
|
swaps(&rep.htotal);
|
||||||
swaps(&rep.hskew, n);
|
swaps(&rep.hskew);
|
||||||
swaps(&rep.vdisplay, n);
|
swaps(&rep.vdisplay);
|
||||||
swaps(&rep.vsyncstart, n);
|
swaps(&rep.vsyncstart);
|
||||||
swaps(&rep.vsyncend, n);
|
swaps(&rep.vsyncend);
|
||||||
swaps(&rep.vtotal, n);
|
swaps(&rep.vtotal);
|
||||||
swapl(&rep.flags, n);
|
swapl(&rep.flags);
|
||||||
swapl(&rep.privsize, n);
|
swapl(&rep.privsize);
|
||||||
}
|
}
|
||||||
if (ver < 2) {
|
if (ver < 2) {
|
||||||
oldrep.type = rep.type;
|
oldrep.type = rep.type;
|
||||||
|
|
@ -412,7 +410,6 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client)
|
||||||
xXF86OldVidModeModeInfo oldmdinf;
|
xXF86OldVidModeModeInfo oldmdinf;
|
||||||
pointer mode;
|
pointer mode;
|
||||||
int modecount, dotClock;
|
int modecount, dotClock;
|
||||||
register int n;
|
|
||||||
int ver;
|
int ver;
|
||||||
|
|
||||||
DEBUG_P("XF86VidModeGetAllModelines");
|
DEBUG_P("XF86VidModeGetAllModelines");
|
||||||
|
|
@ -442,9 +439,9 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.modecount = modecount;
|
rep.modecount = modecount;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.modecount, n);
|
swapl(&rep.modecount);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXF86VidModeGetAllModeLinesReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXF86VidModeGetAllModeLinesReply), (char *)&rep);
|
||||||
|
|
||||||
|
|
@ -462,18 +459,18 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client)
|
||||||
mdinf.flags = VidModeGetModeValue(mode, VIDMODE_FLAGS);
|
mdinf.flags = VidModeGetModeValue(mode, VIDMODE_FLAGS);
|
||||||
mdinf.privsize = 0;
|
mdinf.privsize = 0;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swapl(&mdinf.dotclock, n);
|
swapl(&mdinf.dotclock);
|
||||||
swaps(&mdinf.hdisplay, n);
|
swaps(&mdinf.hdisplay);
|
||||||
swaps(&mdinf.hsyncstart, n);
|
swaps(&mdinf.hsyncstart);
|
||||||
swaps(&mdinf.hsyncend, n);
|
swaps(&mdinf.hsyncend);
|
||||||
swaps(&mdinf.htotal, n);
|
swaps(&mdinf.htotal);
|
||||||
swaps(&mdinf.hskew, n);
|
swaps(&mdinf.hskew);
|
||||||
swaps(&mdinf.vdisplay, n);
|
swaps(&mdinf.vdisplay);
|
||||||
swaps(&mdinf.vsyncstart, n);
|
swaps(&mdinf.vsyncstart);
|
||||||
swaps(&mdinf.vsyncend, n);
|
swaps(&mdinf.vsyncend);
|
||||||
swaps(&mdinf.vtotal, n);
|
swaps(&mdinf.vtotal);
|
||||||
swapl(&mdinf.flags, n);
|
swapl(&mdinf.flags);
|
||||||
swapl(&mdinf.privsize, n);
|
swapl(&mdinf.privsize);
|
||||||
}
|
}
|
||||||
if (ver < 2) {
|
if (ver < 2) {
|
||||||
oldmdinf.dotclock = mdinf.dotclock;
|
oldmdinf.dotclock = mdinf.dotclock;
|
||||||
|
|
@ -1016,10 +1013,9 @@ status_reply:
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.status = status;
|
rep.status = status;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
register int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.status);
|
||||||
swapl(&rep.status, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXF86VidModeValidateModeLineReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXF86VidModeValidateModeLineReply), (char *)&rep);
|
||||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
|
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
|
||||||
|
|
@ -1164,7 +1160,6 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXF86VidModeGetMonitorReq);
|
REQUEST(xXF86VidModeGetMonitorReq);
|
||||||
xXF86VidModeGetMonitorReply rep;
|
xXF86VidModeGetMonitorReply rep;
|
||||||
register int n;
|
|
||||||
CARD32 *hsyncdata, *vsyncdata;
|
CARD32 *hsyncdata, *vsyncdata;
|
||||||
int i, nHsync, nVrefresh;
|
int i, nHsync, nVrefresh;
|
||||||
pointer monitor;
|
pointer monitor;
|
||||||
|
|
@ -1226,8 +1221,8 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
}
|
}
|
||||||
WriteToClient(client, SIZEOF(xXF86VidModeGetMonitorReply), (char *)&rep);
|
WriteToClient(client, SIZEOF(xXF86VidModeGetMonitorReply), (char *)&rep);
|
||||||
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
|
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
|
||||||
|
|
@ -1251,7 +1246,7 @@ ProcXF86VidModeGetViewPort(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXF86VidModeGetViewPortReq);
|
REQUEST(xXF86VidModeGetViewPortReq);
|
||||||
xXF86VidModeGetViewPortReply rep;
|
xXF86VidModeGetViewPortReply rep;
|
||||||
int x, y, n;
|
int x, y;
|
||||||
|
|
||||||
DEBUG_P("XF86VidModeGetViewPort");
|
DEBUG_P("XF86VidModeGetViewPort");
|
||||||
|
|
||||||
|
|
@ -1269,10 +1264,10 @@ ProcXF86VidModeGetViewPort(ClientPtr client)
|
||||||
rep.y = y;
|
rep.y = y;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.x, n);
|
swapl(&rep.x);
|
||||||
swapl(&rep.y, n);
|
swapl(&rep.y);
|
||||||
}
|
}
|
||||||
WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply), (char *)&rep);
|
WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -1301,7 +1296,7 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXF86VidModeGetDotClocksReq);
|
REQUEST(xXF86VidModeGetDotClocksReq);
|
||||||
xXF86VidModeGetDotClocksReply rep;
|
xXF86VidModeGetDotClocksReply rep;
|
||||||
register int n;
|
int n;
|
||||||
int numClocks;
|
int numClocks;
|
||||||
CARD32 dotclock;
|
CARD32 dotclock;
|
||||||
int *Clocks = NULL;
|
int *Clocks = NULL;
|
||||||
|
|
@ -1338,11 +1333,11 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
|
||||||
rep.flags |= CLKFLAG_PROGRAMABLE;
|
rep.flags |= CLKFLAG_PROGRAMABLE;
|
||||||
}
|
}
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.clocks, n);
|
swapl(&rep.clocks);
|
||||||
swapl(&rep.maxclocks, n);
|
swapl(&rep.maxclocks);
|
||||||
swapl(&rep.flags, n);
|
swapl(&rep.flags);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXF86VidModeGetDotClocksReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXF86VidModeGetDotClocksReply), (char *)&rep);
|
||||||
if (!ClockProg) {
|
if (!ClockProg) {
|
||||||
|
|
@ -1384,7 +1379,6 @@ ProcXF86VidModeGetGamma(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXF86VidModeGetGammaReq);
|
REQUEST(xXF86VidModeGetGammaReq);
|
||||||
xXF86VidModeGetGammaReply rep;
|
xXF86VidModeGetGammaReply rep;
|
||||||
register int n;
|
|
||||||
float red, green, blue;
|
float red, green, blue;
|
||||||
|
|
||||||
DEBUG_P("XF86VidModeGetGamma");
|
DEBUG_P("XF86VidModeGetGamma");
|
||||||
|
|
@ -1403,11 +1397,11 @@ ProcXF86VidModeGetGamma(ClientPtr client)
|
||||||
rep.green = (CARD32)(green * 10000.);
|
rep.green = (CARD32)(green * 10000.);
|
||||||
rep.blue = (CARD32)(blue * 10000.);
|
rep.blue = (CARD32)(blue * 10000.);
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.red, n);
|
swapl(&rep.red);
|
||||||
swapl(&rep.green, n);
|
swapl(&rep.green);
|
||||||
swapl(&rep.blue, n);
|
swapl(&rep.blue);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -1444,7 +1438,7 @@ static int
|
||||||
ProcXF86VidModeGetGammaRamp(ClientPtr client)
|
ProcXF86VidModeGetGammaRamp(ClientPtr client)
|
||||||
{
|
{
|
||||||
CARD16 *ramp = NULL;
|
CARD16 *ramp = NULL;
|
||||||
int n, length;
|
int length;
|
||||||
size_t ramplen = 0;
|
size_t ramplen = 0;
|
||||||
xXF86VidModeGetGammaRampReply rep;
|
xXF86VidModeGetGammaRampReply rep;
|
||||||
REQUEST(xXF86VidModeGetGammaRampReq);
|
REQUEST(xXF86VidModeGetGammaRampReq);
|
||||||
|
|
@ -1476,9 +1470,9 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.size = stuff->size;
|
rep.size = stuff->size;
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.size, n);
|
swaps(&rep.size);
|
||||||
SwapShorts((short*)ramp, length * 3);
|
SwapShorts((short*)ramp, length * 3);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), (char *)&rep);
|
||||||
|
|
@ -1496,7 +1490,6 @@ static int
|
||||||
ProcXF86VidModeGetGammaRampSize(ClientPtr client)
|
ProcXF86VidModeGetGammaRampSize(ClientPtr client)
|
||||||
{
|
{
|
||||||
xXF86VidModeGetGammaRampSizeReply rep;
|
xXF86VidModeGetGammaRampSizeReply rep;
|
||||||
int n;
|
|
||||||
REQUEST(xXF86VidModeGetGammaRampSizeReq);
|
REQUEST(xXF86VidModeGetGammaRampSizeReq);
|
||||||
|
|
||||||
if(stuff->screen >= screenInfo.numScreens)
|
if(stuff->screen >= screenInfo.numScreens)
|
||||||
|
|
@ -1509,9 +1502,9 @@ ProcXF86VidModeGetGammaRampSize(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.size = VidModeGetGammaRampSize(stuff->screen);
|
rep.size = VidModeGetGammaRampSize(stuff->screen);
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.size, n);
|
swaps(&rep.size);
|
||||||
}
|
}
|
||||||
WriteToClient(client,sizeof(xXF86VidModeGetGammaRampSizeReply),(char*)&rep);
|
WriteToClient(client,sizeof(xXF86VidModeGetGammaRampSizeReply),(char*)&rep);
|
||||||
|
|
||||||
|
|
@ -1522,7 +1515,6 @@ static int
|
||||||
ProcXF86VidModeGetPermissions(ClientPtr client)
|
ProcXF86VidModeGetPermissions(ClientPtr client)
|
||||||
{
|
{
|
||||||
xXF86VidModeGetPermissionsReply rep;
|
xXF86VidModeGetPermissionsReply rep;
|
||||||
int n;
|
|
||||||
REQUEST(xXF86VidModeGetPermissionsReq);
|
REQUEST(xXF86VidModeGetPermissionsReq);
|
||||||
|
|
||||||
if(stuff->screen >= screenInfo.numScreens)
|
if(stuff->screen >= screenInfo.numScreens)
|
||||||
|
|
@ -1539,9 +1531,9 @@ ProcXF86VidModeGetPermissions(ClientPtr client)
|
||||||
rep.permissions |= XF86VM_WRITE_PERMISSION;
|
rep.permissions |= XF86VM_WRITE_PERMISSION;
|
||||||
}
|
}
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.permissions, n);
|
swapl(&rep.permissions);
|
||||||
}
|
}
|
||||||
WriteToClient(client,sizeof(xXF86VidModeGetPermissionsReply),(char*)&rep);
|
WriteToClient(client,sizeof(xXF86VidModeGetPermissionsReply),(char*)&rep);
|
||||||
|
|
||||||
|
|
@ -1636,31 +1628,28 @@ ProcXF86VidModeDispatch(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeQueryVersion(ClientPtr client)
|
SProcXF86VidModeQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeQueryVersionReq);
|
REQUEST(xXF86VidModeQueryVersionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return ProcXF86VidModeQueryVersion(client);
|
return ProcXF86VidModeQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeGetModeLine(ClientPtr client)
|
SProcXF86VidModeGetModeLine(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeGetModeLineReq);
|
REQUEST(xXF86VidModeGetModeLineReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
return ProcXF86VidModeGetModeLine(client);
|
return ProcXF86VidModeGetModeLine(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeGetAllModeLines(ClientPtr client)
|
SProcXF86VidModeGetAllModeLines(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeGetAllModeLinesReq);
|
REQUEST(xXF86VidModeGetAllModeLinesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
return ProcXF86VidModeGetAllModeLines(client);
|
return ProcXF86VidModeGetAllModeLines(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1670,40 +1659,39 @@ SProcXF86VidModeAddModeLine(ClientPtr client)
|
||||||
xXF86OldVidModeAddModeLineReq *oldstuff =
|
xXF86OldVidModeAddModeLineReq *oldstuff =
|
||||||
(xXF86OldVidModeAddModeLineReq *)client->requestBuffer;
|
(xXF86OldVidModeAddModeLineReq *)client->requestBuffer;
|
||||||
int ver;
|
int ver;
|
||||||
register int n;
|
|
||||||
|
|
||||||
REQUEST(xXF86VidModeAddModeLineReq);
|
REQUEST(xXF86VidModeAddModeLineReq);
|
||||||
ver = ClientMajorVersion(client);
|
ver = ClientMajorVersion(client);
|
||||||
if (ver < 2) {
|
if (ver < 2) {
|
||||||
swaps(&oldstuff->length, n);
|
swaps(&oldstuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq);
|
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq);
|
||||||
swapl(&oldstuff->screen, n);
|
swapl(&oldstuff->screen);
|
||||||
swaps(&oldstuff->hdisplay, n);
|
swaps(&oldstuff->hdisplay);
|
||||||
swaps(&oldstuff->hsyncstart, n);
|
swaps(&oldstuff->hsyncstart);
|
||||||
swaps(&oldstuff->hsyncend, n);
|
swaps(&oldstuff->hsyncend);
|
||||||
swaps(&oldstuff->htotal, n);
|
swaps(&oldstuff->htotal);
|
||||||
swaps(&oldstuff->vdisplay, n);
|
swaps(&oldstuff->vdisplay);
|
||||||
swaps(&oldstuff->vsyncstart, n);
|
swaps(&oldstuff->vsyncstart);
|
||||||
swaps(&oldstuff->vsyncend, n);
|
swaps(&oldstuff->vsyncend);
|
||||||
swaps(&oldstuff->vtotal, n);
|
swaps(&oldstuff->vtotal);
|
||||||
swapl(&oldstuff->flags, n);
|
swapl(&oldstuff->flags);
|
||||||
swapl(&oldstuff->privsize, n);
|
swapl(&oldstuff->privsize);
|
||||||
SwapRestL(oldstuff);
|
SwapRestL(oldstuff);
|
||||||
} else {
|
} else {
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq);
|
REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq);
|
||||||
swapl(&stuff->screen, n);
|
swapl(&stuff->screen);
|
||||||
swaps(&stuff->hdisplay, n);
|
swaps(&stuff->hdisplay);
|
||||||
swaps(&stuff->hsyncstart, n);
|
swaps(&stuff->hsyncstart);
|
||||||
swaps(&stuff->hsyncend, n);
|
swaps(&stuff->hsyncend);
|
||||||
swaps(&stuff->htotal, n);
|
swaps(&stuff->htotal);
|
||||||
swaps(&stuff->hskew, n);
|
swaps(&stuff->hskew);
|
||||||
swaps(&stuff->vdisplay, n);
|
swaps(&stuff->vdisplay);
|
||||||
swaps(&stuff->vsyncstart, n);
|
swaps(&stuff->vsyncstart);
|
||||||
swaps(&stuff->vsyncend, n);
|
swaps(&stuff->vsyncend);
|
||||||
swaps(&stuff->vtotal, n);
|
swaps(&stuff->vtotal);
|
||||||
swapl(&stuff->flags, n);
|
swapl(&stuff->flags);
|
||||||
swapl(&stuff->privsize, n);
|
swapl(&stuff->privsize);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
}
|
}
|
||||||
return ProcXF86VidModeAddModeLine(client);
|
return ProcXF86VidModeAddModeLine(client);
|
||||||
|
|
@ -1715,40 +1703,39 @@ SProcXF86VidModeDeleteModeLine(ClientPtr client)
|
||||||
xXF86OldVidModeDeleteModeLineReq *oldstuff =
|
xXF86OldVidModeDeleteModeLineReq *oldstuff =
|
||||||
(xXF86OldVidModeDeleteModeLineReq *)client->requestBuffer;
|
(xXF86OldVidModeDeleteModeLineReq *)client->requestBuffer;
|
||||||
int ver;
|
int ver;
|
||||||
register int n;
|
|
||||||
|
|
||||||
REQUEST(xXF86VidModeDeleteModeLineReq);
|
REQUEST(xXF86VidModeDeleteModeLineReq);
|
||||||
ver = ClientMajorVersion(client);
|
ver = ClientMajorVersion(client);
|
||||||
if (ver < 2) {
|
if (ver < 2) {
|
||||||
swaps(&oldstuff->length, n);
|
swaps(&oldstuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq);
|
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq);
|
||||||
swapl(&oldstuff->screen, n);
|
swapl(&oldstuff->screen);
|
||||||
swaps(&oldstuff->hdisplay, n);
|
swaps(&oldstuff->hdisplay);
|
||||||
swaps(&oldstuff->hsyncstart, n);
|
swaps(&oldstuff->hsyncstart);
|
||||||
swaps(&oldstuff->hsyncend, n);
|
swaps(&oldstuff->hsyncend);
|
||||||
swaps(&oldstuff->htotal, n);
|
swaps(&oldstuff->htotal);
|
||||||
swaps(&oldstuff->vdisplay, n);
|
swaps(&oldstuff->vdisplay);
|
||||||
swaps(&oldstuff->vsyncstart, n);
|
swaps(&oldstuff->vsyncstart);
|
||||||
swaps(&oldstuff->vsyncend, n);
|
swaps(&oldstuff->vsyncend);
|
||||||
swaps(&oldstuff->vtotal, n);
|
swaps(&oldstuff->vtotal);
|
||||||
swapl(&oldstuff->flags, n);
|
swapl(&oldstuff->flags);
|
||||||
swapl(&oldstuff->privsize, n);
|
swapl(&oldstuff->privsize);
|
||||||
SwapRestL(oldstuff);
|
SwapRestL(oldstuff);
|
||||||
} else {
|
} else {
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq);
|
REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq);
|
||||||
swapl(&stuff->screen, n);
|
swapl(&stuff->screen);
|
||||||
swaps(&stuff->hdisplay, n);
|
swaps(&stuff->hdisplay);
|
||||||
swaps(&stuff->hsyncstart, n);
|
swaps(&stuff->hsyncstart);
|
||||||
swaps(&stuff->hsyncend, n);
|
swaps(&stuff->hsyncend);
|
||||||
swaps(&stuff->htotal, n);
|
swaps(&stuff->htotal);
|
||||||
swaps(&stuff->hskew, n);
|
swaps(&stuff->hskew);
|
||||||
swaps(&stuff->vdisplay, n);
|
swaps(&stuff->vdisplay);
|
||||||
swaps(&stuff->vsyncstart, n);
|
swaps(&stuff->vsyncstart);
|
||||||
swaps(&stuff->vsyncend, n);
|
swaps(&stuff->vsyncend);
|
||||||
swaps(&stuff->vtotal, n);
|
swaps(&stuff->vtotal);
|
||||||
swapl(&stuff->flags, n);
|
swapl(&stuff->flags);
|
||||||
swapl(&stuff->privsize, n);
|
swapl(&stuff->privsize);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
}
|
}
|
||||||
return ProcXF86VidModeDeleteModeLine(client);
|
return ProcXF86VidModeDeleteModeLine(client);
|
||||||
|
|
@ -1760,40 +1747,39 @@ SProcXF86VidModeModModeLine(ClientPtr client)
|
||||||
xXF86OldVidModeModModeLineReq *oldstuff =
|
xXF86OldVidModeModModeLineReq *oldstuff =
|
||||||
(xXF86OldVidModeModModeLineReq *)client->requestBuffer;
|
(xXF86OldVidModeModModeLineReq *)client->requestBuffer;
|
||||||
int ver;
|
int ver;
|
||||||
register int n;
|
|
||||||
|
|
||||||
REQUEST(xXF86VidModeModModeLineReq);
|
REQUEST(xXF86VidModeModModeLineReq);
|
||||||
ver = ClientMajorVersion(client);
|
ver = ClientMajorVersion(client);
|
||||||
if (ver < 2) {
|
if (ver < 2) {
|
||||||
swaps(&oldstuff->length, n);
|
swaps(&oldstuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq);
|
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq);
|
||||||
swapl(&oldstuff->screen, n);
|
swapl(&oldstuff->screen);
|
||||||
swaps(&oldstuff->hdisplay, n);
|
swaps(&oldstuff->hdisplay);
|
||||||
swaps(&oldstuff->hsyncstart, n);
|
swaps(&oldstuff->hsyncstart);
|
||||||
swaps(&oldstuff->hsyncend, n);
|
swaps(&oldstuff->hsyncend);
|
||||||
swaps(&oldstuff->htotal, n);
|
swaps(&oldstuff->htotal);
|
||||||
swaps(&oldstuff->vdisplay, n);
|
swaps(&oldstuff->vdisplay);
|
||||||
swaps(&oldstuff->vsyncstart, n);
|
swaps(&oldstuff->vsyncstart);
|
||||||
swaps(&oldstuff->vsyncend, n);
|
swaps(&oldstuff->vsyncend);
|
||||||
swaps(&oldstuff->vtotal, n);
|
swaps(&oldstuff->vtotal);
|
||||||
swapl(&oldstuff->flags, n);
|
swapl(&oldstuff->flags);
|
||||||
swapl(&oldstuff->privsize, n);
|
swapl(&oldstuff->privsize);
|
||||||
SwapRestL(oldstuff);
|
SwapRestL(oldstuff);
|
||||||
} else {
|
} else {
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq);
|
REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq);
|
||||||
swapl(&stuff->screen, n);
|
swapl(&stuff->screen);
|
||||||
swaps(&stuff->hdisplay, n);
|
swaps(&stuff->hdisplay);
|
||||||
swaps(&stuff->hsyncstart, n);
|
swaps(&stuff->hsyncstart);
|
||||||
swaps(&stuff->hsyncend, n);
|
swaps(&stuff->hsyncend);
|
||||||
swaps(&stuff->htotal, n);
|
swaps(&stuff->htotal);
|
||||||
swaps(&stuff->hskew, n);
|
swaps(&stuff->hskew);
|
||||||
swaps(&stuff->vdisplay, n);
|
swaps(&stuff->vdisplay);
|
||||||
swaps(&stuff->vsyncstart, n);
|
swaps(&stuff->vsyncstart);
|
||||||
swaps(&stuff->vsyncend, n);
|
swaps(&stuff->vsyncend);
|
||||||
swaps(&stuff->vtotal, n);
|
swaps(&stuff->vtotal);
|
||||||
swapl(&stuff->flags, n);
|
swapl(&stuff->flags);
|
||||||
swapl(&stuff->privsize, n);
|
swapl(&stuff->privsize);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
}
|
}
|
||||||
return ProcXF86VidModeModModeLine(client);
|
return ProcXF86VidModeModModeLine(client);
|
||||||
|
|
@ -1805,40 +1791,39 @@ SProcXF86VidModeValidateModeLine(ClientPtr client)
|
||||||
xXF86OldVidModeValidateModeLineReq *oldstuff =
|
xXF86OldVidModeValidateModeLineReq *oldstuff =
|
||||||
(xXF86OldVidModeValidateModeLineReq *)client->requestBuffer;
|
(xXF86OldVidModeValidateModeLineReq *)client->requestBuffer;
|
||||||
int ver;
|
int ver;
|
||||||
register int n;
|
|
||||||
|
|
||||||
REQUEST(xXF86VidModeValidateModeLineReq);
|
REQUEST(xXF86VidModeValidateModeLineReq);
|
||||||
ver = ClientMajorVersion(client);
|
ver = ClientMajorVersion(client);
|
||||||
if (ver < 2) {
|
if (ver < 2) {
|
||||||
swaps(&oldstuff->length, n);
|
swaps(&oldstuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq);
|
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq);
|
||||||
swapl(&oldstuff->screen, n);
|
swapl(&oldstuff->screen);
|
||||||
swaps(&oldstuff->hdisplay, n);
|
swaps(&oldstuff->hdisplay);
|
||||||
swaps(&oldstuff->hsyncstart, n);
|
swaps(&oldstuff->hsyncstart);
|
||||||
swaps(&oldstuff->hsyncend, n);
|
swaps(&oldstuff->hsyncend);
|
||||||
swaps(&oldstuff->htotal, n);
|
swaps(&oldstuff->htotal);
|
||||||
swaps(&oldstuff->vdisplay, n);
|
swaps(&oldstuff->vdisplay);
|
||||||
swaps(&oldstuff->vsyncstart, n);
|
swaps(&oldstuff->vsyncstart);
|
||||||
swaps(&oldstuff->vsyncend, n);
|
swaps(&oldstuff->vsyncend);
|
||||||
swaps(&oldstuff->vtotal, n);
|
swaps(&oldstuff->vtotal);
|
||||||
swapl(&oldstuff->flags, n);
|
swapl(&oldstuff->flags);
|
||||||
swapl(&oldstuff->privsize, n);
|
swapl(&oldstuff->privsize);
|
||||||
SwapRestL(oldstuff);
|
SwapRestL(oldstuff);
|
||||||
} else {
|
} else {
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq);
|
REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq);
|
||||||
swapl(&stuff->screen, n);
|
swapl(&stuff->screen);
|
||||||
swaps(&stuff->hdisplay, n);
|
swaps(&stuff->hdisplay);
|
||||||
swaps(&stuff->hsyncstart, n);
|
swaps(&stuff->hsyncstart);
|
||||||
swaps(&stuff->hsyncend, n);
|
swaps(&stuff->hsyncend);
|
||||||
swaps(&stuff->htotal, n);
|
swaps(&stuff->htotal);
|
||||||
swaps(&stuff->hskew, n);
|
swaps(&stuff->hskew);
|
||||||
swaps(&stuff->vdisplay, n);
|
swaps(&stuff->vdisplay);
|
||||||
swaps(&stuff->vsyncstart, n);
|
swaps(&stuff->vsyncstart);
|
||||||
swaps(&stuff->vsyncend, n);
|
swaps(&stuff->vsyncend);
|
||||||
swaps(&stuff->vtotal, n);
|
swaps(&stuff->vtotal);
|
||||||
swapl(&stuff->flags, n);
|
swapl(&stuff->flags);
|
||||||
swapl(&stuff->privsize, n);
|
swapl(&stuff->privsize);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
}
|
}
|
||||||
return ProcXF86VidModeValidateModeLine(client);
|
return ProcXF86VidModeValidateModeLine(client);
|
||||||
|
|
@ -1847,130 +1832,120 @@ SProcXF86VidModeValidateModeLine(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeSwitchMode(ClientPtr client)
|
SProcXF86VidModeSwitchMode(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeSwitchModeReq);
|
REQUEST(xXF86VidModeSwitchModeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
swaps(&stuff->zoom, n);
|
swaps(&stuff->zoom);
|
||||||
return ProcXF86VidModeSwitchMode(client);
|
return ProcXF86VidModeSwitchMode(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeSwitchToMode(ClientPtr client)
|
SProcXF86VidModeSwitchToMode(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeSwitchToModeReq);
|
REQUEST(xXF86VidModeSwitchToModeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeSwitchToModeReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeSwitchToModeReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
return ProcXF86VidModeSwitchToMode(client);
|
return ProcXF86VidModeSwitchToMode(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeLockModeSwitch(ClientPtr client)
|
SProcXF86VidModeLockModeSwitch(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeLockModeSwitchReq);
|
REQUEST(xXF86VidModeLockModeSwitchReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
swaps(&stuff->lock, n);
|
swaps(&stuff->lock);
|
||||||
return ProcXF86VidModeLockModeSwitch(client);
|
return ProcXF86VidModeLockModeSwitch(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeGetMonitor(ClientPtr client)
|
SProcXF86VidModeGetMonitor(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeGetMonitorReq);
|
REQUEST(xXF86VidModeGetMonitorReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
return ProcXF86VidModeGetMonitor(client);
|
return ProcXF86VidModeGetMonitor(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeGetViewPort(ClientPtr client)
|
SProcXF86VidModeGetViewPort(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeGetViewPortReq);
|
REQUEST(xXF86VidModeGetViewPortReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
return ProcXF86VidModeGetViewPort(client);
|
return ProcXF86VidModeGetViewPort(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeSetViewPort(ClientPtr client)
|
SProcXF86VidModeSetViewPort(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeSetViewPortReq);
|
REQUEST(xXF86VidModeSetViewPortReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
swapl(&stuff->x, n);
|
swapl(&stuff->x);
|
||||||
swapl(&stuff->y, n);
|
swapl(&stuff->y);
|
||||||
return ProcXF86VidModeSetViewPort(client);
|
return ProcXF86VidModeSetViewPort(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeGetDotClocks(ClientPtr client)
|
SProcXF86VidModeGetDotClocks(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeGetDotClocksReq);
|
REQUEST(xXF86VidModeGetDotClocksReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
return ProcXF86VidModeGetDotClocks(client);
|
return ProcXF86VidModeGetDotClocks(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeSetClientVersion(ClientPtr client)
|
SProcXF86VidModeSetClientVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeSetClientVersionReq);
|
REQUEST(xXF86VidModeSetClientVersionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq);
|
||||||
swaps(&stuff->major, n);
|
swaps(&stuff->major);
|
||||||
swaps(&stuff->minor, n);
|
swaps(&stuff->minor);
|
||||||
return ProcXF86VidModeSetClientVersion(client);
|
return ProcXF86VidModeSetClientVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeSetGamma(ClientPtr client)
|
SProcXF86VidModeSetGamma(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeSetGammaReq);
|
REQUEST(xXF86VidModeSetGammaReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
swapl(&stuff->red, n);
|
swapl(&stuff->red);
|
||||||
swapl(&stuff->green, n);
|
swapl(&stuff->green);
|
||||||
swapl(&stuff->blue, n);
|
swapl(&stuff->blue);
|
||||||
return ProcXF86VidModeSetGamma(client);
|
return ProcXF86VidModeSetGamma(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeGetGamma(ClientPtr client)
|
SProcXF86VidModeGetGamma(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86VidModeGetGammaReq);
|
REQUEST(xXF86VidModeGetGammaReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
return ProcXF86VidModeGetGamma(client);
|
return ProcXF86VidModeGetGamma(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeSetGammaRamp(ClientPtr client)
|
SProcXF86VidModeSetGammaRamp(ClientPtr client)
|
||||||
{
|
{
|
||||||
int length, n;
|
int length;
|
||||||
REQUEST(xXF86VidModeSetGammaRampReq);
|
REQUEST(xXF86VidModeSetGammaRampReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq);
|
REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq);
|
||||||
swaps(&stuff->size, n);
|
swaps(&stuff->size);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
length = ((stuff->size + 1) & ~1) * 6;
|
length = ((stuff->size + 1) & ~1) * 6;
|
||||||
REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length);
|
REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length);
|
||||||
SwapRestS(stuff);
|
SwapRestS(stuff);
|
||||||
|
|
@ -1980,34 +1955,31 @@ SProcXF86VidModeSetGammaRamp(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeGetGammaRamp(ClientPtr client)
|
SProcXF86VidModeGetGammaRamp(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xXF86VidModeGetGammaRampReq);
|
REQUEST(xXF86VidModeGetGammaRampReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq);
|
||||||
swaps(&stuff->size, n);
|
swaps(&stuff->size);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
return ProcXF86VidModeGetGammaRamp(client);
|
return ProcXF86VidModeGetGammaRamp(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeGetGammaRampSize(ClientPtr client)
|
SProcXF86VidModeGetGammaRampSize(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xXF86VidModeGetGammaRampSizeReq);
|
REQUEST(xXF86VidModeGetGammaRampSizeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
return ProcXF86VidModeGetGammaRampSize(client);
|
return ProcXF86VidModeGetGammaRampSize(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcXF86VidModeGetPermissions(ClientPtr client)
|
SProcXF86VidModeGetPermissions(ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xXF86VidModeGetPermissionsReq);
|
REQUEST(xXF86VidModeGetPermissionsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq);
|
REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq);
|
||||||
swaps(&stuff->screen, n);
|
swaps(&stuff->screen);
|
||||||
return ProcXF86VidModeGetPermissions(client);
|
return ProcXF86VidModeGetPermissions(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,6 @@ ProcXF86DRIQueryVersion(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
xXF86DRIQueryVersionReply rep;
|
xXF86DRIQueryVersionReply rep;
|
||||||
register int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXF86DRIQueryVersionReq);
|
REQUEST_SIZE_MATCH(xXF86DRIQueryVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
|
@ -96,11 +95,11 @@ ProcXF86DRIQueryVersion(
|
||||||
rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION;
|
rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION;
|
||||||
rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION;
|
rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
swapl(&rep.patchVersion, n);
|
swapl(&rep.patchVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -113,7 +112,6 @@ ProcXF86DRIQueryDirectRenderingCapable(
|
||||||
{
|
{
|
||||||
xXF86DRIQueryDirectRenderingCapableReply rep;
|
xXF86DRIQueryDirectRenderingCapableReply rep;
|
||||||
Bool isCapable;
|
Bool isCapable;
|
||||||
register int n;
|
|
||||||
|
|
||||||
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
||||||
REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
|
REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
|
||||||
|
|
@ -136,8 +134,8 @@ ProcXF86DRIQueryDirectRenderingCapable(
|
||||||
rep.isCapable = 0;
|
rep.isCapable = 0;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client,
|
WriteToClient(client,
|
||||||
|
|
@ -595,9 +593,8 @@ SProcXF86DRIQueryVersion(
|
||||||
register ClientPtr client
|
register ClientPtr client
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86DRIQueryVersionReq);
|
REQUEST(xXF86DRIQueryVersionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return ProcXF86DRIQueryVersion(client);
|
return ProcXF86DRIQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -606,10 +603,9 @@ SProcXF86DRIQueryDirectRenderingCapable(
|
||||||
register ClientPtr client
|
register ClientPtr client
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->screen, n);
|
swapl(&stuff->screen);
|
||||||
return ProcXF86DRIQueryDirectRenderingCapable(client);
|
return ProcXF86DRIQueryDirectRenderingCapable(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,9 @@ ProcDRI2QueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDRI2QueryVersionReq);
|
REQUEST(xDRI2QueryVersionReq);
|
||||||
xDRI2QueryVersionReply rep;
|
xDRI2QueryVersionReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xDRI2QueryVersionReq);
|
REQUEST_SIZE_MATCH(xDRI2QueryVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
|
@ -84,10 +83,10 @@ ProcDRI2QueryVersion(ClientPtr client)
|
||||||
rep.minorVersion = dri2_minor;
|
rep.minorVersion = dri2_minor;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.majorVersion, n);
|
swapl(&rep.majorVersion);
|
||||||
swapl(&rep.minorVersion, n);
|
swapl(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xDRI2QueryVersionReply), &rep);
|
WriteToClient(client, sizeof(xDRI2QueryVersionReply), &rep);
|
||||||
|
|
@ -585,16 +584,15 @@ SProcDRI2Connect(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xDRI2ConnectReq);
|
REQUEST(xDRI2ConnectReq);
|
||||||
xDRI2ConnectReply rep;
|
xDRI2ConnectReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
/* If the client is swapped, it's not local. Talk to the hand. */
|
/* If the client is swapped, it's not local. Talk to the hand. */
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
if (sizeof(*stuff) / 4 != client->req_len)
|
if (sizeof(*stuff) / 4 != client->req_len)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
|
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.driverNameLength = 0;
|
rep.driverNameLength = 0;
|
||||||
rep.deviceNameLength = 0;
|
rep.deviceNameLength = 0;
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,6 @@ ProcAppleWMQueryVersion(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
xAppleWMQueryVersionReply rep;
|
xAppleWMQueryVersionReply rep;
|
||||||
register int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xAppleWMQueryVersionReq);
|
REQUEST_SIZE_MATCH(xAppleWMQueryVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
|
@ -157,8 +156,8 @@ ProcAppleWMQueryVersion(
|
||||||
rep.minorVersion = SERVER_APPLEWM_MINOR_VERSION;
|
rep.minorVersion = SERVER_APPLEWM_MINOR_VERSION;
|
||||||
rep.patchVersion = SERVER_APPLEWM_PATCH_VERSION;
|
rep.patchVersion = SERVER_APPLEWM_PATCH_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xAppleWMQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xAppleWMQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -681,9 +680,8 @@ SProcAppleWMQueryVersion(
|
||||||
register ClientPtr client
|
register ClientPtr client
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xAppleWMQueryVersionReq);
|
REQUEST(xAppleWMQueryVersionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return ProcAppleWMQueryVersion(client);
|
return ProcAppleWMQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ static int ProcPseudoramiXGetState(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetStateReq);
|
REQUEST(xPanoramiXGetStateReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetStateReply rep;
|
xPanoramiXGetStateReply rep;
|
||||||
register int n, rc;
|
register int rc;
|
||||||
|
|
||||||
TRACE();
|
TRACE();
|
||||||
|
|
||||||
|
|
@ -197,9 +197,9 @@ static int ProcPseudoramiXGetState(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.state = !noPseudoramiXExtension;
|
rep.state = !noPseudoramiXExtension;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps (&rep.state, n);
|
swaps(&rep.state);
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
|
WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -212,7 +212,7 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetScreenCountReq);
|
REQUEST(xPanoramiXGetScreenCountReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetScreenCountReply rep;
|
xPanoramiXGetScreenCountReply rep;
|
||||||
register int n, rc;
|
register int rc;
|
||||||
|
|
||||||
TRACE();
|
TRACE();
|
||||||
|
|
||||||
|
|
@ -226,9 +226,9 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.ScreenCount = pseudoramiXNumScreens;
|
rep.ScreenCount = pseudoramiXNumScreens;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps (&rep.ScreenCount, n);
|
swaps(&rep.ScreenCount);
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);
|
WriteToClient (client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -259,10 +259,10 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client)
|
||||||
rep.height = pseudoramiXScreens[stuff->screen].h;
|
rep.height = pseudoramiXScreens[stuff->screen].h;
|
||||||
// was screenInfo.screens[stuff->screen]->height;
|
// was screenInfo.screens[stuff->screen]->height;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps (&rep.width, n);
|
swaps(&rep.width);
|
||||||
swaps (&rep.height, n);
|
swaps(&rep.height);
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep);
|
WriteToClient (client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -284,10 +284,9 @@ static int ProcPseudoramiXIsActive(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.state = !noPseudoramiXExtension;
|
rep.state = !noPseudoramiXExtension;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
register int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps (&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.state);
|
||||||
swapl (&rep.state, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
|
WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -309,10 +308,9 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client)
|
||||||
rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens;
|
rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens;
|
||||||
rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
|
rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
register int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps (&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.number);
|
||||||
swapl (&rep.number, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep);
|
WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep);
|
||||||
|
|
||||||
|
|
@ -327,11 +325,10 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client)
|
||||||
scratch.height = pseudoramiXScreens[i].h;
|
scratch.height = pseudoramiXScreens[i].h;
|
||||||
|
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
register int n;
|
swaps(&scratch.x_org);
|
||||||
swaps (&scratch.x_org, n);
|
swaps(&scratch.y_org);
|
||||||
swaps (&scratch.y_org, n);
|
swaps(&scratch.width);
|
||||||
swaps (&scratch.width, n);
|
swaps(&scratch.height);
|
||||||
swaps (&scratch.height, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch);
|
WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch);
|
||||||
}
|
}
|
||||||
|
|
@ -369,11 +366,10 @@ static int
|
||||||
SProcPseudoramiXQueryVersion (ClientPtr client)
|
SProcPseudoramiXQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXQueryVersionReq);
|
REQUEST(xPanoramiXQueryVersionReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
TRACE();
|
TRACE();
|
||||||
|
|
||||||
swaps(&stuff->length,n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
||||||
return ProcPseudoramiXQueryVersion(client);
|
return ProcPseudoramiXQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
@ -382,11 +378,10 @@ static int
|
||||||
SProcPseudoramiXGetState(ClientPtr client)
|
SProcPseudoramiXGetState(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetStateReq);
|
REQUEST(xPanoramiXGetStateReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
TRACE();
|
TRACE();
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||||
return ProcPseudoramiXGetState(client);
|
return ProcPseudoramiXGetState(client);
|
||||||
}
|
}
|
||||||
|
|
@ -395,11 +390,10 @@ static int
|
||||||
SProcPseudoramiXGetScreenCount(ClientPtr client)
|
SProcPseudoramiXGetScreenCount(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetScreenCountReq);
|
REQUEST(xPanoramiXGetScreenCountReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
TRACE();
|
TRACE();
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||||
return ProcPseudoramiXGetScreenCount(client);
|
return ProcPseudoramiXGetScreenCount(client);
|
||||||
}
|
}
|
||||||
|
|
@ -408,11 +402,10 @@ static int
|
||||||
SProcPseudoramiXGetScreenSize(ClientPtr client)
|
SProcPseudoramiXGetScreenSize(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetScreenSizeReq);
|
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
TRACE();
|
TRACE();
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||||
return ProcPseudoramiXGetScreenSize(client);
|
return ProcPseudoramiXGetScreenSize(client);
|
||||||
}
|
}
|
||||||
|
|
@ -422,11 +415,10 @@ static int
|
||||||
SProcPseudoramiXIsActive(ClientPtr client)
|
SProcPseudoramiXIsActive(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXineramaIsActiveReq);
|
REQUEST(xXineramaIsActiveReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
TRACE();
|
TRACE();
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
||||||
return ProcPseudoramiXIsActive(client);
|
return ProcPseudoramiXIsActive(client);
|
||||||
}
|
}
|
||||||
|
|
@ -436,11 +428,10 @@ static int
|
||||||
SProcPseudoramiXQueryScreens(ClientPtr client)
|
SProcPseudoramiXQueryScreens(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXineramaQueryScreensReq);
|
REQUEST(xXineramaQueryScreensReq);
|
||||||
register int n;
|
|
||||||
|
|
||||||
TRACE();
|
TRACE();
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
||||||
return ProcPseudoramiXQueryScreens(client);
|
return ProcPseudoramiXQueryScreens(client);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,6 @@ ProcAppleDRIQueryVersion(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
xAppleDRIQueryVersionReply rep;
|
xAppleDRIQueryVersionReply rep;
|
||||||
register int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xAppleDRIQueryVersionReq);
|
REQUEST_SIZE_MATCH(xAppleDRIQueryVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
|
@ -101,8 +100,8 @@ ProcAppleDRIQueryVersion(
|
||||||
rep.minorVersion = SERVER_APPLEDRI_MINOR_VERSION;
|
rep.minorVersion = SERVER_APPLEDRI_MINOR_VERSION;
|
||||||
rep.patchVersion = SERVER_APPLEDRI_PATCH_VERSION;
|
rep.patchVersion = SERVER_APPLEDRI_PATCH_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xAppleDRIQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xAppleDRIQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -372,9 +371,8 @@ SProcAppleDRIQueryVersion(
|
||||||
register ClientPtr client
|
register ClientPtr client
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xAppleDRIQueryVersionReq);
|
REQUEST(xAppleDRIQueryVersionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return ProcAppleDRIQueryVersion(client);
|
return ProcAppleDRIQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,8 +91,8 @@ ProcWindowsWMQueryVersion(ClientPtr client)
|
||||||
rep.patchVersion = SERVER_WINDOWSWM_PATCH_VERSION;
|
rep.patchVersion = SERVER_WINDOWSWM_PATCH_VERSION;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xWindowsWMQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xWindowsWMQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -588,7 +588,7 @@ SProcWindowsWMQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
REQUEST(xWindowsWMQueryVersionReq);
|
REQUEST(xWindowsWMQueryVersionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return ProcWindowsWMQueryVersion(client);
|
return ProcWindowsWMQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -256,19 +256,21 @@ version_compare(uint16_t a_major, uint16_t a_minor,
|
||||||
SwapLongs((CARD32 *)(stuff + 1), LengthRestL(stuff))
|
SwapLongs((CARD32 *)(stuff + 1), LengthRestL(stuff))
|
||||||
|
|
||||||
/* byte swap a 32-bit value */
|
/* byte swap a 32-bit value */
|
||||||
#define swapl(x, n) { \
|
#define swapl(x) do { \
|
||||||
n = ((char *) (x))[0];\
|
char n = ((char *) (x))[0];\
|
||||||
((char *) (x))[0] = ((char *) (x))[3];\
|
((char *) (x))[0] = ((char *) (x))[3];\
|
||||||
((char *) (x))[3] = n;\
|
((char *) (x))[3] = n;\
|
||||||
n = ((char *) (x))[1];\
|
n = ((char *) (x))[1];\
|
||||||
((char *) (x))[1] = ((char *) (x))[2];\
|
((char *) (x))[1] = ((char *) (x))[2];\
|
||||||
((char *) (x))[2] = n; }
|
((char *) (x))[2] = n;\
|
||||||
|
} while (0)
|
||||||
|
|
||||||
/* byte swap a short */
|
/* byte swap a short */
|
||||||
#define swaps(x, n) { \
|
#define swaps(x) do { \
|
||||||
n = ((char *) (x))[0];\
|
char n = ((char *) (x))[0];\
|
||||||
((char *) (x))[0] = ((char *) (x))[1];\
|
((char *) (x))[0] = ((char *) (x))[1];\
|
||||||
((char *) (x))[1] = n; }
|
((char *) (x))[1] = n;\
|
||||||
|
} while (0)
|
||||||
|
|
||||||
/* copy 32-bit value from src to dst byteswapping on the way */
|
/* copy 32-bit value from src to dst byteswapping on the way */
|
||||||
#define cpswapl(src, dst) { \
|
#define cpswapl(src, dst) { \
|
||||||
|
|
|
||||||
|
|
@ -905,9 +905,9 @@ ErrorConnMax(XtransConnInfo trans_conn)
|
||||||
if (((*(char *) &whichbyte) && (byteOrder == 'B')) ||
|
if (((*(char *) &whichbyte) && (byteOrder == 'B')) ||
|
||||||
(!(*(char *) &whichbyte) && (byteOrder == 'l')))
|
(!(*(char *) &whichbyte) && (byteOrder == 'l')))
|
||||||
{
|
{
|
||||||
swaps(&csp.majorVersion, whichbyte);
|
swaps(&csp.majorVersion);
|
||||||
swaps(&csp.minorVersion, whichbyte);
|
swaps(&csp.minorVersion);
|
||||||
swaps(&csp.length, whichbyte);
|
swaps(&csp.length);
|
||||||
}
|
}
|
||||||
iov[0].iov_len = sz_xConnSetupPrefix;
|
iov[0].iov_len = sz_xConnSetupPrefix;
|
||||||
iov[0].iov_base = (char *) &csp;
|
iov[0].iov_base = (char *) &csp;
|
||||||
|
|
|
||||||
6
os/io.c
6
os/io.c
|
|
@ -598,8 +598,7 @@ ResetCurrentRequest(ClientPtr client)
|
||||||
((xBigReq *)oci->bufptr)->length = client->req_len;
|
((xBigReq *)oci->bufptr)->length = client->req_len;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swapl(&((xBigReq *)oci->bufptr)->length);
|
||||||
swapl(&((xBigReq *)oci->bufptr)->length, n);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gotnow >= (needed << 2))
|
if (gotnow >= (needed << 2))
|
||||||
|
|
@ -822,11 +821,10 @@ WriteToClient (ClientPtr who, int count, const void *__buf)
|
||||||
{ /* start of new reply */
|
{ /* start of new reply */
|
||||||
CARD32 replylen;
|
CARD32 replylen;
|
||||||
unsigned long bytesleft;
|
unsigned long bytesleft;
|
||||||
char n;
|
|
||||||
|
|
||||||
replylen = ((xGenericReply *)buf)->length;
|
replylen = ((xGenericReply *)buf)->length;
|
||||||
if (who->swapped)
|
if (who->swapped)
|
||||||
swapl(&replylen, n);
|
swapl(&replylen);
|
||||||
bytesleft = (replylen * 4) + SIZEOF(xReply) - count - padBytes;
|
bytesleft = (replylen * 4) + SIZEOF(xReply) - count - padBytes;
|
||||||
replyinfo.startOfReply = TRUE;
|
replyinfo.startOfReply = TRUE;
|
||||||
replyinfo.bytesRemaining = who->replyBytesRemaining = bytesleft;
|
replyinfo.bytesRemaining = who->replyBytesRemaining = bytesleft;
|
||||||
|
|
|
||||||
100
randr/rrcrtc.c
100
randr/rrcrtc.c
|
|
@ -751,7 +751,7 @@ ProcRRGetCrtcInfo (ClientPtr client)
|
||||||
RRModePtr mode;
|
RRModePtr mode;
|
||||||
RROutput *outputs;
|
RROutput *outputs;
|
||||||
RROutput *possible;
|
RROutput *possible;
|
||||||
int i, j, k, n;
|
int i, j, k;
|
||||||
int width, height;
|
int width, height;
|
||||||
BoxRec panned_area;
|
BoxRec panned_area;
|
||||||
|
|
||||||
|
|
@ -818,7 +818,7 @@ ProcRRGetCrtcInfo (ClientPtr client)
|
||||||
{
|
{
|
||||||
outputs[i] = crtc->outputs[i]->id;
|
outputs[i] = crtc->outputs[i]->id;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl (&outputs[i], n);
|
swapl(&outputs[i]);
|
||||||
}
|
}
|
||||||
k = 0;
|
k = 0;
|
||||||
for (i = 0; i < pScrPriv->numOutputs; i++)
|
for (i = 0; i < pScrPriv->numOutputs; i++)
|
||||||
|
|
@ -827,23 +827,23 @@ ProcRRGetCrtcInfo (ClientPtr client)
|
||||||
{
|
{
|
||||||
possible[k] = pScrPriv->outputs[i]->id;
|
possible[k] = pScrPriv->outputs[i]->id;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl (&possible[k], n);
|
swapl(&possible[k]);
|
||||||
k++;
|
k++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.timestamp, n);
|
swapl(&rep.timestamp);
|
||||||
swaps(&rep.x, n);
|
swaps(&rep.x);
|
||||||
swaps(&rep.y, n);
|
swaps(&rep.y);
|
||||||
swaps(&rep.width, n);
|
swaps(&rep.width);
|
||||||
swaps(&rep.height, n);
|
swaps(&rep.height);
|
||||||
swapl(&rep.mode, n);
|
swapl(&rep.mode);
|
||||||
swaps(&rep.rotation, n);
|
swaps(&rep.rotation);
|
||||||
swaps(&rep.rotations, n);
|
swaps(&rep.rotations);
|
||||||
swaps(&rep.nOutput, n);
|
swaps(&rep.nOutput);
|
||||||
swaps(&rep.nPossibleOutput, n);
|
swaps(&rep.nPossibleOutput);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRGetCrtcInfoReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRRGetCrtcInfoReply), (char *)&rep);
|
||||||
if (extraLen)
|
if (extraLen)
|
||||||
|
|
@ -1058,10 +1058,9 @@ sendReply:
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.newTimestamp);
|
||||||
swapl(&rep.newTimestamp, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRSetCrtcConfigReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRRSetCrtcConfigReply), (char *)&rep);
|
||||||
|
|
||||||
|
|
@ -1079,7 +1078,6 @@ ProcRRGetPanning (ClientPtr client)
|
||||||
BoxRec total;
|
BoxRec total;
|
||||||
BoxRec tracking;
|
BoxRec tracking;
|
||||||
INT16 border[4];
|
INT16 border[4];
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetPanningReq);
|
REQUEST_SIZE_MATCH(xRRGetPanningReq);
|
||||||
VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess);
|
VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess);
|
||||||
|
|
@ -1117,21 +1115,21 @@ ProcRRGetPanning (ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.timestamp, n);
|
swaps(&rep.timestamp);
|
||||||
swaps(&rep.left, n);
|
swaps(&rep.left);
|
||||||
swaps(&rep.top, n);
|
swaps(&rep.top);
|
||||||
swaps(&rep.width, n);
|
swaps(&rep.width);
|
||||||
swaps(&rep.height, n);
|
swaps(&rep.height);
|
||||||
swaps(&rep.track_left, n);
|
swaps(&rep.track_left);
|
||||||
swaps(&rep.track_top, n);
|
swaps(&rep.track_top);
|
||||||
swaps(&rep.track_width, n);
|
swaps(&rep.track_width);
|
||||||
swaps(&rep.track_height, n);
|
swaps(&rep.track_height);
|
||||||
swaps(&rep.border_left, n);
|
swaps(&rep.border_left);
|
||||||
swaps(&rep.border_top, n);
|
swaps(&rep.border_top);
|
||||||
swaps(&rep.border_right, n);
|
swaps(&rep.border_right);
|
||||||
swaps(&rep.border_bottom, n);
|
swaps(&rep.border_bottom);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRGetPanningReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRRGetPanningReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -1149,7 +1147,6 @@ ProcRRSetPanning (ClientPtr client)
|
||||||
BoxRec total;
|
BoxRec total;
|
||||||
BoxRec tracking;
|
BoxRec tracking;
|
||||||
INT16 border[4];
|
INT16 border[4];
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRSetPanningReq);
|
REQUEST_SIZE_MATCH(xRRSetPanningReq);
|
||||||
VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess);
|
VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess);
|
||||||
|
|
@ -1198,9 +1195,9 @@ sendReply:
|
||||||
rep.newTimestamp = pScrPriv->lastSetTime.milliseconds;
|
rep.newTimestamp = pScrPriv->lastSetTime.milliseconds;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.newTimestamp, n);
|
swaps(&rep.newTimestamp);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRSetPanningReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRRSetPanningReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -1212,7 +1209,6 @@ ProcRRGetCrtcGammaSize (ClientPtr client)
|
||||||
REQUEST(xRRGetCrtcGammaSizeReq);
|
REQUEST(xRRGetCrtcGammaSizeReq);
|
||||||
xRRGetCrtcGammaSizeReply reply;
|
xRRGetCrtcGammaSizeReply reply;
|
||||||
RRCrtcPtr crtc;
|
RRCrtcPtr crtc;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq);
|
REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq);
|
||||||
VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess);
|
VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess);
|
||||||
|
|
@ -1226,9 +1222,9 @@ ProcRRGetCrtcGammaSize (ClientPtr client)
|
||||||
reply.length = 0;
|
reply.length = 0;
|
||||||
reply.size = crtc->gammaSize;
|
reply.size = crtc->gammaSize;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&reply.sequenceNumber, n);
|
swaps(&reply.sequenceNumber);
|
||||||
swapl (&reply.length, n);
|
swapl(&reply.length);
|
||||||
swaps (&reply.size, n);
|
swaps(&reply.size);
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xRRGetCrtcGammaSizeReply), (char *) &reply);
|
WriteToClient (client, sizeof (xRRGetCrtcGammaSizeReply), (char *) &reply);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -1240,7 +1236,6 @@ ProcRRGetCrtcGamma (ClientPtr client)
|
||||||
REQUEST(xRRGetCrtcGammaReq);
|
REQUEST(xRRGetCrtcGammaReq);
|
||||||
xRRGetCrtcGammaReply reply;
|
xRRGetCrtcGammaReply reply;
|
||||||
RRCrtcPtr crtc;
|
RRCrtcPtr crtc;
|
||||||
int n;
|
|
||||||
unsigned long len;
|
unsigned long len;
|
||||||
char *extra = NULL;
|
char *extra = NULL;
|
||||||
|
|
||||||
|
|
@ -1264,9 +1259,9 @@ ProcRRGetCrtcGamma (ClientPtr client)
|
||||||
reply.length = bytes_to_int32(len);
|
reply.length = bytes_to_int32(len);
|
||||||
reply.size = crtc->gammaSize;
|
reply.size = crtc->gammaSize;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&reply.sequenceNumber, n);
|
swaps(&reply.sequenceNumber);
|
||||||
swapl (&reply.length, n);
|
swapl(&reply.length);
|
||||||
swaps (&reply.size, n);
|
swaps(&reply.size);
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xRRGetCrtcGammaReply), (char *) &reply);
|
WriteToClient (client, sizeof (xRRGetCrtcGammaReply), (char *) &reply);
|
||||||
if (crtc->gammaSize)
|
if (crtc->gammaSize)
|
||||||
|
|
@ -1361,7 +1356,6 @@ transform_filter_encode (ClientPtr client, char *output,
|
||||||
RRTransformPtr transform)
|
RRTransformPtr transform)
|
||||||
{
|
{
|
||||||
int nbytes, nparams;
|
int nbytes, nparams;
|
||||||
int n;
|
|
||||||
|
|
||||||
if (transform->filter == NULL) {
|
if (transform->filter == NULL) {
|
||||||
*nbytesFilter = 0;
|
*nbytesFilter = 0;
|
||||||
|
|
@ -1377,8 +1371,8 @@ transform_filter_encode (ClientPtr client, char *output,
|
||||||
output[nbytes++] = 0;
|
output[nbytes++] = 0;
|
||||||
memcpy (output + nbytes, transform->params, nparams * sizeof (xFixed));
|
memcpy (output + nbytes, transform->params, nparams * sizeof (xFixed));
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (nbytesFilter, n);
|
swaps(nbytesFilter);
|
||||||
swaps (nparamsFilter, n);
|
swaps(nparamsFilter);
|
||||||
SwapLongs ((CARD32 *) (output + nbytes), nparams);
|
SwapLongs ((CARD32 *) (output + nbytes), nparams);
|
||||||
}
|
}
|
||||||
nbytes += nparams * sizeof (xFixed);
|
nbytes += nparams * sizeof (xFixed);
|
||||||
|
|
@ -1399,7 +1393,7 @@ ProcRRGetCrtcTransform (ClientPtr client)
|
||||||
REQUEST(xRRGetCrtcTransformReq);
|
REQUEST(xRRGetCrtcTransformReq);
|
||||||
xRRGetCrtcTransformReply *reply;
|
xRRGetCrtcTransformReply *reply;
|
||||||
RRCrtcPtr crtc;
|
RRCrtcPtr crtc;
|
||||||
int n, nextra;
|
int nextra;
|
||||||
RRTransformPtr current, pending;
|
RRTransformPtr current, pending;
|
||||||
char *extra;
|
char *extra;
|
||||||
|
|
||||||
|
|
@ -1436,8 +1430,8 @@ ProcRRGetCrtcTransform (ClientPtr client)
|
||||||
current);
|
current);
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps (&reply->sequenceNumber, n);
|
swaps(&reply->sequenceNumber);
|
||||||
swapl (&reply->length, n);
|
swapl(&reply->length);
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xRRGetCrtcTransformReply) + nextra, (char *) reply);
|
WriteToClient (client, sizeof (xRRGetCrtcTransformReply) + nextra, (char *) reply);
|
||||||
free(reply);
|
free(reply);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ static int
|
||||||
ProcRRQueryVersion (ClientPtr client)
|
ProcRRQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
xRRQueryVersionReply rep = {0};
|
xRRQueryVersionReply rep = {0};
|
||||||
register int n;
|
|
||||||
REQUEST(xRRQueryVersionReq);
|
REQUEST(xRRQueryVersionReq);
|
||||||
rrClientPriv(client);
|
rrClientPriv(client);
|
||||||
|
|
||||||
|
|
@ -59,10 +58,10 @@ ProcRRQueryVersion (ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.majorVersion, n);
|
swapl(&rep.majorVersion);
|
||||||
swapl(&rep.minorVersion, n);
|
swapl(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRRQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
||||||
|
|
@ -325,10 +325,9 @@ ProcRRCreateMode (ClientPtr client)
|
||||||
rep.mode = mode->mode.id;
|
rep.mode = mode->mode.id;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.mode);
|
||||||
swapl(&rep.mode, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRCreateModeReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRRCreateModeReply), (char *)&rep);
|
||||||
/* Drop out reference to this mode */
|
/* Drop out reference to this mode */
|
||||||
|
|
|
||||||
|
|
@ -447,7 +447,7 @@ ProcRRGetOutputInfo (ClientPtr client)
|
||||||
RRMode *modes;
|
RRMode *modes;
|
||||||
RROutput *clones;
|
RROutput *clones;
|
||||||
char *name;
|
char *name;
|
||||||
int i, n;
|
int i;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetOutputInfoReq);
|
REQUEST_SIZE_MATCH(xRRGetOutputInfoReq);
|
||||||
VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess);
|
VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess);
|
||||||
|
|
@ -494,7 +494,7 @@ ProcRRGetOutputInfo (ClientPtr client)
|
||||||
{
|
{
|
||||||
crtcs[i] = output->crtcs[i]->id;
|
crtcs[i] = output->crtcs[i]->id;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl (&crtcs[i], n);
|
swapl(&crtcs[i]);
|
||||||
}
|
}
|
||||||
for (i = 0; i < output->numModes + output->numUserModes; i++)
|
for (i = 0; i < output->numModes + output->numUserModes; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -503,26 +503,26 @@ ProcRRGetOutputInfo (ClientPtr client)
|
||||||
else
|
else
|
||||||
modes[i] = output->userModes[i - output->numModes]->mode.id;
|
modes[i] = output->userModes[i - output->numModes]->mode.id;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl (&modes[i], n);
|
swapl(&modes[i]);
|
||||||
}
|
}
|
||||||
for (i = 0; i < output->numClones; i++)
|
for (i = 0; i < output->numClones; i++)
|
||||||
{
|
{
|
||||||
clones[i] = output->clones[i]->id;
|
clones[i] = output->clones[i]->id;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl (&clones[i], n);
|
swapl(&clones[i]);
|
||||||
}
|
}
|
||||||
memcpy (name, output->name, output->nameLength);
|
memcpy (name, output->name, output->nameLength);
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.timestamp, n);
|
swapl(&rep.timestamp);
|
||||||
swapl(&rep.crtc, n);
|
swapl(&rep.crtc);
|
||||||
swapl(&rep.mmWidth, n);
|
swapl(&rep.mmWidth);
|
||||||
swapl(&rep.mmHeight, n);
|
swapl(&rep.mmHeight);
|
||||||
swaps(&rep.nCrtcs, n);
|
swaps(&rep.nCrtcs);
|
||||||
swaps(&rep.nModes, n);
|
swaps(&rep.nModes);
|
||||||
swaps(&rep.nClones, n);
|
swaps(&rep.nClones);
|
||||||
swaps(&rep.nameLength, n);
|
swaps(&rep.nameLength);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRGetOutputInfoReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRRGetOutputInfoReply), (char *)&rep);
|
||||||
if (extraLen)
|
if (extraLen)
|
||||||
|
|
@ -614,9 +614,8 @@ ProcRRGetOutputPrimary(ClientPtr client)
|
||||||
rep.output = primary ? primary->id : None;
|
rep.output = primary ? primary->id : None;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.output);
|
||||||
swapl(&rep.output, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xRRGetOutputPrimaryReply), &rep);
|
WriteToClient(client, sizeof(xRRGetOutputPrimaryReply), &rep);
|
||||||
|
|
|
||||||
|
|
@ -409,10 +409,9 @@ ProcRRListOutputProperties (ClientPtr client)
|
||||||
rep.nAtoms = numProps;
|
rep.nAtoms = numProps;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps (&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.length, n);
|
swaps(&rep.nAtoms);
|
||||||
swaps (&rep.nAtoms, n);
|
|
||||||
}
|
}
|
||||||
temppAtoms = pAtoms;
|
temppAtoms = pAtoms;
|
||||||
for (prop = output->properties; prop; prop = prop->next)
|
for (prop = output->properties; prop; prop = prop->next)
|
||||||
|
|
@ -458,9 +457,8 @@ ProcRRQueryOutputProperty (ClientPtr client)
|
||||||
rep.immutable = prop->immutable;
|
rep.immutable = prop->immutable;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps (&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.length, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient (client, sizeof (xRRQueryOutputPropertyReply), (char*)&rep);
|
WriteToClient (client, sizeof (xRRQueryOutputPropertyReply), (char*)&rep);
|
||||||
if (prop->num_valid)
|
if (prop->num_valid)
|
||||||
|
|
@ -615,13 +613,11 @@ ProcRRGetOutputProperty (ClientPtr client)
|
||||||
reply.propertyType = None;
|
reply.propertyType = None;
|
||||||
reply.format = 0;
|
reply.format = 0;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&reply.sequenceNumber);
|
||||||
|
swapl(&reply.length);
|
||||||
swaps(&reply.sequenceNumber, n);
|
swapl(&reply.propertyType);
|
||||||
swapl(&reply.length, n);
|
swapl(&reply.bytesAfter);
|
||||||
swapl(&reply.propertyType, n);
|
swapl(&reply.nItems);
|
||||||
swapl(&reply.bytesAfter, n);
|
|
||||||
swapl(&reply.nItems, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRGetOutputPropertyReply), &reply);
|
WriteToClient(client, sizeof(xRRGetOutputPropertyReply), &reply);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -647,13 +643,11 @@ ProcRRGetOutputProperty (ClientPtr client)
|
||||||
reply.nItems = 0;
|
reply.nItems = 0;
|
||||||
reply.propertyType = prop_value->type;
|
reply.propertyType = prop_value->type;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&reply.sequenceNumber);
|
||||||
|
swapl(&reply.length);
|
||||||
swaps(&reply.sequenceNumber, n);
|
swapl(&reply.propertyType);
|
||||||
swapl(&reply.length, n);
|
swapl(&reply.bytesAfter);
|
||||||
swapl(&reply.propertyType, n);
|
swapl(&reply.nItems);
|
||||||
swapl(&reply.bytesAfter, n);
|
|
||||||
swapl(&reply.nItems, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRGetOutputPropertyReply), &reply);
|
WriteToClient(client, sizeof(xRRGetOutputPropertyReply), &reply);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -704,13 +698,11 @@ ProcRRGetOutputProperty (ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
swaps(&reply.sequenceNumber);
|
||||||
|
swapl(&reply.length);
|
||||||
swaps(&reply.sequenceNumber, n);
|
swapl(&reply.propertyType);
|
||||||
swapl(&reply.length, n);
|
swapl(&reply.bytesAfter);
|
||||||
swapl(&reply.propertyType, n);
|
swapl(&reply.nItems);
|
||||||
swapl(&reply.bytesAfter, n);
|
|
||||||
swapl(&reply.nItems, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xGenericReply), &reply);
|
WriteToClient(client, sizeof(xGenericReply), &reply);
|
||||||
if (len)
|
if (len)
|
||||||
|
|
|
||||||
106
randr/rrscreen.c
106
randr/rrscreen.c
|
|
@ -232,14 +232,12 @@ ProcRRGetScreenSizeRange (ClientPtr client)
|
||||||
}
|
}
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
int n;
|
swaps(&rep.sequenceNumber);
|
||||||
|
swapl(&rep.length);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.minWidth);
|
||||||
swapl(&rep.length, n);
|
swaps(&rep.minHeight);
|
||||||
swaps(&rep.minWidth, n);
|
swaps(&rep.maxWidth);
|
||||||
swaps(&rep.minHeight, n);
|
swaps(&rep.maxHeight);
|
||||||
swaps(&rep.maxWidth, n);
|
|
||||||
swaps(&rep.maxHeight, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRGetScreenSizeRangeReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRRGetScreenSizeRangeReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -318,7 +316,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
|
||||||
rrScrPrivPtr pScrPriv;
|
rrScrPrivPtr pScrPriv;
|
||||||
CARD8 *extra;
|
CARD8 *extra;
|
||||||
unsigned long extraLen;
|
unsigned long extraLen;
|
||||||
int i, n, rc, has_primary = 0;
|
int i, rc, has_primary = 0;
|
||||||
RRCrtc *crtcs;
|
RRCrtc *crtcs;
|
||||||
RROutput *outputs;
|
RROutput *outputs;
|
||||||
xRRModeInfo *modeinfos;
|
xRRModeInfo *modeinfos;
|
||||||
|
|
@ -401,7 +399,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
|
||||||
has_primary = 1;
|
has_primary = 1;
|
||||||
crtcs[0] = pScrPriv->primaryOutput->crtc->id;
|
crtcs[0] = pScrPriv->primaryOutput->crtc->id;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl (&crtcs[0], n);
|
swapl(&crtcs[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < pScrPriv->numCrtcs; i++)
|
for (i = 0; i < pScrPriv->numCrtcs; i++)
|
||||||
|
|
@ -414,14 +412,14 @@ rrGetScreenResources(ClientPtr client, Bool query)
|
||||||
}
|
}
|
||||||
crtcs[i + has_primary] = pScrPriv->crtcs[i]->id;
|
crtcs[i + has_primary] = pScrPriv->crtcs[i]->id;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl (&crtcs[i + has_primary], n);
|
swapl(&crtcs[i + has_primary]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < pScrPriv->numOutputs; i++)
|
for (i = 0; i < pScrPriv->numOutputs; i++)
|
||||||
{
|
{
|
||||||
outputs[i] = pScrPriv->outputs[i]->id;
|
outputs[i] = pScrPriv->outputs[i]->id;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl (&outputs[i], n);
|
swapl(&outputs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < num_modes; i++)
|
for (i = 0; i < num_modes; i++)
|
||||||
|
|
@ -430,19 +428,19 @@ rrGetScreenResources(ClientPtr client, Bool query)
|
||||||
modeinfos[i] = mode->mode;
|
modeinfos[i] = mode->mode;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swapl (&modeinfos[i].id, n);
|
swapl(&modeinfos[i].id);
|
||||||
swaps (&modeinfos[i].width, n);
|
swaps(&modeinfos[i].width);
|
||||||
swaps (&modeinfos[i].height, n);
|
swaps(&modeinfos[i].height);
|
||||||
swapl (&modeinfos[i].dotClock, n);
|
swapl(&modeinfos[i].dotClock);
|
||||||
swaps (&modeinfos[i].hSyncStart, n);
|
swaps(&modeinfos[i].hSyncStart);
|
||||||
swaps (&modeinfos[i].hSyncEnd, n);
|
swaps(&modeinfos[i].hSyncEnd);
|
||||||
swaps (&modeinfos[i].hTotal, n);
|
swaps(&modeinfos[i].hTotal);
|
||||||
swaps (&modeinfos[i].hSkew, n);
|
swaps(&modeinfos[i].hSkew);
|
||||||
swaps (&modeinfos[i].vSyncStart, n);
|
swaps(&modeinfos[i].vSyncStart);
|
||||||
swaps (&modeinfos[i].vSyncEnd, n);
|
swaps(&modeinfos[i].vSyncEnd);
|
||||||
swaps (&modeinfos[i].vTotal, n);
|
swaps(&modeinfos[i].vTotal);
|
||||||
swaps (&modeinfos[i].nameLength, n);
|
swaps(&modeinfos[i].nameLength);
|
||||||
swapl (&modeinfos[i].modeFlags, n);
|
swapl(&modeinfos[i].modeFlags);
|
||||||
}
|
}
|
||||||
memcpy (names, mode->name,
|
memcpy (names, mode->name,
|
||||||
mode->mode.nameLength);
|
mode->mode.nameLength);
|
||||||
|
|
@ -453,14 +451,14 @@ rrGetScreenResources(ClientPtr client, Bool query)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.timestamp, n);
|
swapl(&rep.timestamp);
|
||||||
swapl(&rep.configTimestamp, n);
|
swapl(&rep.configTimestamp);
|
||||||
swaps(&rep.nCrtcs, n);
|
swaps(&rep.nCrtcs);
|
||||||
swaps(&rep.nOutputs, n);
|
swaps(&rep.nOutputs);
|
||||||
swaps(&rep.nModes, n);
|
swaps(&rep.nModes);
|
||||||
swaps(&rep.nbytesNames, n);
|
swaps(&rep.nbytesNames);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRGetScreenResourcesReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRRGetScreenResourcesReply), (char *)&rep);
|
||||||
if (extraLen)
|
if (extraLen)
|
||||||
|
|
@ -592,7 +590,7 @@ ProcRRGetScreenInfo (ClientPtr client)
|
||||||
REQUEST(xRRGetScreenInfoReq);
|
REQUEST(xRRGetScreenInfoReq);
|
||||||
xRRGetScreenInfoReply rep;
|
xRRGetScreenInfoReply rep;
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
int n, rc;
|
int rc;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
rrScrPrivPtr pScrPriv;
|
rrScrPrivPtr pScrPriv;
|
||||||
CARD8 *extra;
|
CARD8 *extra;
|
||||||
|
|
@ -688,10 +686,10 @@ ProcRRGetScreenInfo (ClientPtr client)
|
||||||
size->heightInMillimeters = pSize->mmHeight;
|
size->heightInMillimeters = pSize->mmHeight;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps (&size->widthInPixels, n);
|
swaps(&size->widthInPixels);
|
||||||
swaps (&size->heightInPixels, n);
|
swaps(&size->heightInPixels);
|
||||||
swaps (&size->widthInMillimeters, n);
|
swaps(&size->widthInMillimeters);
|
||||||
swaps (&size->heightInMillimeters, n);
|
swaps(&size->heightInMillimeters);
|
||||||
}
|
}
|
||||||
size++;
|
size++;
|
||||||
if (has_rate)
|
if (has_rate)
|
||||||
|
|
@ -699,7 +697,7 @@ ProcRRGetScreenInfo (ClientPtr client)
|
||||||
*rates = pSize->nRates;
|
*rates = pSize->nRates;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps (rates, n);
|
swaps(rates);
|
||||||
}
|
}
|
||||||
rates++;
|
rates++;
|
||||||
for (j = 0; j < pSize->nRates; j++)
|
for (j = 0; j < pSize->nRates; j++)
|
||||||
|
|
@ -707,7 +705,7 @@ ProcRRGetScreenInfo (ClientPtr client)
|
||||||
*rates = pSize->pRates[j].rate;
|
*rates = pSize->pRates[j].rate;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps (rates, n);
|
swaps(rates);
|
||||||
}
|
}
|
||||||
rates++;
|
rates++;
|
||||||
}
|
}
|
||||||
|
|
@ -723,14 +721,14 @@ ProcRRGetScreenInfo (ClientPtr client)
|
||||||
rep.length = bytes_to_int32(extraLen);
|
rep.length = bytes_to_int32(extraLen);
|
||||||
}
|
}
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.timestamp, n);
|
swapl(&rep.timestamp);
|
||||||
swaps(&rep.rotation, n);
|
swaps(&rep.rotation);
|
||||||
swaps(&rep.nSizes, n);
|
swaps(&rep.nSizes);
|
||||||
swaps(&rep.sizeID, n);
|
swaps(&rep.sizeID);
|
||||||
swaps(&rep.rate, n);
|
swaps(&rep.rate);
|
||||||
swaps(&rep.nrateEnts, n);
|
swaps(&rep.nrateEnts);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRGetScreenInfoReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRRGetScreenInfoReply), (char *)&rep);
|
||||||
if (extraLen)
|
if (extraLen)
|
||||||
|
|
@ -747,7 +745,7 @@ ProcRRSetScreenConfig (ClientPtr client)
|
||||||
REQUEST(xRRSetScreenConfigReq);
|
REQUEST(xRRSetScreenConfigReq);
|
||||||
xRRSetScreenConfigReply rep;
|
xRRSetScreenConfigReply rep;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
int n, rc;
|
int rc;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
rrScrPrivPtr pScrPriv;
|
rrScrPrivPtr pScrPriv;
|
||||||
TimeStamp time;
|
TimeStamp time;
|
||||||
|
|
@ -976,11 +974,11 @@ sendReply:
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.newTimestamp, n);
|
swapl(&rep.newTimestamp);
|
||||||
swapl(&rep.newConfigTimestamp, n);
|
swapl(&rep.newConfigTimestamp);
|
||||||
swapl(&rep.root, n);
|
swapl(&rep.root);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRSetScreenConfigReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRRSetScreenConfigReply), (char *)&rep);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,149 +25,138 @@
|
||||||
static int
|
static int
|
||||||
SProcRRQueryVersion (ClientPtr client)
|
SProcRRQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRRQueryVersionReq);
|
REQUEST(xRRQueryVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->majorVersion, n);
|
swapl(&stuff->majorVersion);
|
||||||
swapl(&stuff->minorVersion, n);
|
swapl(&stuff->minorVersion);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRGetScreenInfo (ClientPtr client)
|
SProcRRGetScreenInfo (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRRGetScreenInfoReq);
|
REQUEST(xRRGetScreenInfoReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRSetScreenConfig (ClientPtr client)
|
SProcRRSetScreenConfig (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRRSetScreenConfigReq);
|
REQUEST(xRRSetScreenConfigReq);
|
||||||
|
|
||||||
if (RRClientKnowsRates (client))
|
if (RRClientKnowsRates (client))
|
||||||
{
|
{
|
||||||
REQUEST_SIZE_MATCH (xRRSetScreenConfigReq);
|
REQUEST_SIZE_MATCH (xRRSetScreenConfigReq);
|
||||||
swaps (&stuff->rate, n);
|
swaps(&stuff->rate);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
REQUEST_SIZE_MATCH (xRR1_0SetScreenConfigReq);
|
REQUEST_SIZE_MATCH (xRR1_0SetScreenConfigReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->timestamp, n);
|
swapl(&stuff->timestamp);
|
||||||
swaps(&stuff->sizeID, n);
|
swaps(&stuff->sizeID);
|
||||||
swaps(&stuff->rotation, n);
|
swaps(&stuff->rotation);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRSelectInput (ClientPtr client)
|
SProcRRSelectInput (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRRSelectInputReq);
|
REQUEST(xRRSelectInputReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
swaps(&stuff->enable, n);
|
swaps(&stuff->enable);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRGetScreenSizeRange (ClientPtr client)
|
SProcRRGetScreenSizeRange (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRGetScreenSizeRangeReq);
|
REQUEST(xRRGetScreenSizeRangeReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetScreenSizeRangeReq);
|
REQUEST_SIZE_MATCH(xRRGetScreenSizeRangeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRSetScreenSize (ClientPtr client)
|
SProcRRSetScreenSize (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRSetScreenSizeReq);
|
REQUEST(xRRSetScreenSizeReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRSetScreenSizeReq);
|
REQUEST_SIZE_MATCH(xRRSetScreenSizeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
swaps(&stuff->width, n);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height, n);
|
swaps(&stuff->height);
|
||||||
swapl(&stuff->widthInMillimeters, n);
|
swapl(&stuff->widthInMillimeters);
|
||||||
swapl(&stuff->heightInMillimeters, n);
|
swapl(&stuff->heightInMillimeters);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRGetScreenResources (ClientPtr client)
|
SProcRRGetScreenResources (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRGetScreenResourcesReq);
|
REQUEST(xRRGetScreenResourcesReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq);
|
REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRGetOutputInfo (ClientPtr client)
|
SProcRRGetOutputInfo (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRGetOutputInfoReq);
|
REQUEST(xRRGetOutputInfoReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetOutputInfoReq);
|
REQUEST_SIZE_MATCH(xRRGetOutputInfoReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->output, n);
|
swapl(&stuff->output);
|
||||||
swapl(&stuff->configTimestamp, n);
|
swapl(&stuff->configTimestamp);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRListOutputProperties (ClientPtr client)
|
SProcRRListOutputProperties (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRListOutputPropertiesReq);
|
REQUEST(xRRListOutputPropertiesReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRListOutputPropertiesReq);
|
REQUEST_SIZE_MATCH(xRRListOutputPropertiesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->output, n);
|
swapl(&stuff->output);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRQueryOutputProperty (ClientPtr client)
|
SProcRRQueryOutputProperty (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRQueryOutputPropertyReq);
|
REQUEST(xRRQueryOutputPropertyReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq);
|
REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->output, n);
|
swapl(&stuff->output);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRConfigureOutputProperty (ClientPtr client)
|
SProcRRConfigureOutputProperty (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRConfigureOutputPropertyReq);
|
REQUEST(xRRConfigureOutputPropertyReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->output, n);
|
swapl(&stuff->output);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -175,15 +164,14 @@ SProcRRConfigureOutputProperty (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRRChangeOutputProperty (ClientPtr client)
|
SProcRRChangeOutputProperty (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRChangeOutputPropertyReq);
|
REQUEST(xRRChangeOutputPropertyReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE (xRRChangeOutputPropertyReq);
|
REQUEST_AT_LEAST_SIZE (xRRChangeOutputPropertyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->output, n);
|
swapl(&stuff->output);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
swapl(&stuff->type, n);
|
swapl(&stuff->type);
|
||||||
swapl(&stuff->nUnits, n);
|
swapl(&stuff->nUnits);
|
||||||
switch(stuff->format) {
|
switch(stuff->format) {
|
||||||
case 8:
|
case 8:
|
||||||
break;
|
break;
|
||||||
|
|
@ -203,125 +191,117 @@ SProcRRChangeOutputProperty (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRRDeleteOutputProperty (ClientPtr client)
|
SProcRRDeleteOutputProperty (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRDeleteOutputPropertyReq);
|
REQUEST(xRRDeleteOutputPropertyReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq);
|
REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->output, n);
|
swapl(&stuff->output);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRGetOutputProperty (ClientPtr client)
|
SProcRRGetOutputProperty (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRGetOutputPropertyReq);
|
REQUEST(xRRGetOutputPropertyReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetOutputPropertyReq);
|
REQUEST_SIZE_MATCH(xRRGetOutputPropertyReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->output, n);
|
swapl(&stuff->output);
|
||||||
swapl(&stuff->property, n);
|
swapl(&stuff->property);
|
||||||
swapl(&stuff->type, n);
|
swapl(&stuff->type);
|
||||||
swapl(&stuff->longOffset, n);
|
swapl(&stuff->longOffset);
|
||||||
swapl(&stuff->longLength, n);
|
swapl(&stuff->longLength);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRCreateMode (ClientPtr client)
|
SProcRRCreateMode (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
xRRModeInfo *modeinfo;
|
xRRModeInfo *modeinfo;
|
||||||
REQUEST(xRRCreateModeReq);
|
REQUEST(xRRCreateModeReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xRRCreateModeReq);
|
REQUEST_AT_LEAST_SIZE(xRRCreateModeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
|
|
||||||
modeinfo = &stuff->modeInfo;
|
modeinfo = &stuff->modeInfo;
|
||||||
swapl(&modeinfo->id, n);
|
swapl(&modeinfo->id);
|
||||||
swaps(&modeinfo->width, n);
|
swaps(&modeinfo->width);
|
||||||
swaps(&modeinfo->height, n);
|
swaps(&modeinfo->height);
|
||||||
swapl(&modeinfo->dotClock, n);
|
swapl(&modeinfo->dotClock);
|
||||||
swaps(&modeinfo->hSyncStart, n);
|
swaps(&modeinfo->hSyncStart);
|
||||||
swaps(&modeinfo->hSyncEnd, n);
|
swaps(&modeinfo->hSyncEnd);
|
||||||
swaps(&modeinfo->hTotal, n);
|
swaps(&modeinfo->hTotal);
|
||||||
swaps(&modeinfo->vSyncStart, n);
|
swaps(&modeinfo->vSyncStart);
|
||||||
swaps(&modeinfo->vSyncEnd, n);
|
swaps(&modeinfo->vSyncEnd);
|
||||||
swaps(&modeinfo->vTotal, n);
|
swaps(&modeinfo->vTotal);
|
||||||
swaps(&modeinfo->nameLength, n);
|
swaps(&modeinfo->nameLength);
|
||||||
swapl(&modeinfo->modeFlags, n);
|
swapl(&modeinfo->modeFlags);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRDestroyMode (ClientPtr client)
|
SProcRRDestroyMode (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRDestroyModeReq);
|
REQUEST(xRRDestroyModeReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRDestroyModeReq);
|
REQUEST_SIZE_MATCH(xRRDestroyModeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->mode, n);
|
swapl(&stuff->mode);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRAddOutputMode (ClientPtr client)
|
SProcRRAddOutputMode (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRAddOutputModeReq);
|
REQUEST(xRRAddOutputModeReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRAddOutputModeReq);
|
REQUEST_SIZE_MATCH(xRRAddOutputModeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->output, n);
|
swapl(&stuff->output);
|
||||||
swapl(&stuff->mode, n);
|
swapl(&stuff->mode);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRDeleteOutputMode (ClientPtr client)
|
SProcRRDeleteOutputMode (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRDeleteOutputModeReq);
|
REQUEST(xRRDeleteOutputModeReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRDeleteOutputModeReq);
|
REQUEST_SIZE_MATCH(xRRDeleteOutputModeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->output, n);
|
swapl(&stuff->output);
|
||||||
swapl(&stuff->mode, n);
|
swapl(&stuff->mode);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRGetCrtcInfo (ClientPtr client)
|
SProcRRGetCrtcInfo (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRGetCrtcInfoReq);
|
REQUEST(xRRGetCrtcInfoReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq);
|
REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->crtc, n);
|
swapl(&stuff->crtc);
|
||||||
swapl(&stuff->configTimestamp, n);
|
swapl(&stuff->configTimestamp);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRSetCrtcConfig (ClientPtr client)
|
SProcRRSetCrtcConfig (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRSetCrtcConfigReq);
|
REQUEST(xRRSetCrtcConfigReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq);
|
REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->crtc, n);
|
swapl(&stuff->crtc);
|
||||||
swapl(&stuff->timestamp, n);
|
swapl(&stuff->timestamp);
|
||||||
swapl(&stuff->configTimestamp, n);
|
swapl(&stuff->configTimestamp);
|
||||||
swaps(&stuff->x, n);
|
swaps(&stuff->x);
|
||||||
swaps(&stuff->y, n);
|
swaps(&stuff->y);
|
||||||
swapl(&stuff->mode, n);
|
swapl(&stuff->mode);
|
||||||
swaps(&stuff->rotation, n);
|
swaps(&stuff->rotation);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -329,37 +309,34 @@ SProcRRSetCrtcConfig (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRRGetCrtcGammaSize (ClientPtr client)
|
SProcRRGetCrtcGammaSize (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRGetCrtcGammaSizeReq);
|
REQUEST(xRRGetCrtcGammaSizeReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq);
|
REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->crtc, n);
|
swapl(&stuff->crtc);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRGetCrtcGamma (ClientPtr client)
|
SProcRRGetCrtcGamma (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRGetCrtcGammaReq);
|
REQUEST(xRRGetCrtcGammaReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq);
|
REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->crtc, n);
|
swapl(&stuff->crtc);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRSetCrtcGamma (ClientPtr client)
|
SProcRRSetCrtcGamma (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRSetCrtcGammaReq);
|
REQUEST(xRRSetCrtcGammaReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xRRSetCrtcGammaReq);
|
REQUEST_AT_LEAST_SIZE(xRRSetCrtcGammaReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->crtc, n);
|
swapl(&stuff->crtc);
|
||||||
swaps(&stuff->size, n);
|
swaps(&stuff->size);
|
||||||
SwapRestS(stuff);
|
SwapRestS(stuff);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -367,16 +344,16 @@ SProcRRSetCrtcGamma (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRRSetCrtcTransform (ClientPtr client)
|
SProcRRSetCrtcTransform (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n, nparams;
|
int nparams;
|
||||||
char *filter;
|
char *filter;
|
||||||
CARD32 *params;
|
CARD32 *params;
|
||||||
REQUEST(xRRSetCrtcTransformReq);
|
REQUEST(xRRSetCrtcTransformReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xRRSetCrtcTransformReq);
|
REQUEST_AT_LEAST_SIZE(xRRSetCrtcTransformReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->crtc, n);
|
swapl(&stuff->crtc);
|
||||||
SwapLongs((CARD32 *)&stuff->transform, bytes_to_int32(sizeof(xRenderTransform)));
|
SwapLongs((CARD32 *)&stuff->transform, bytes_to_int32(sizeof(xRenderTransform)));
|
||||||
swaps(&stuff->nbytesFilter, n);
|
swaps(&stuff->nbytesFilter);
|
||||||
filter = (char *)(stuff + 1);
|
filter = (char *)(stuff + 1);
|
||||||
params = (CARD32 *) (filter + pad_to_int32(stuff->nbytesFilter));
|
params = (CARD32 *) (filter + pad_to_int32(stuff->nbytesFilter));
|
||||||
nparams = ((CARD32 *) stuff + client->req_len) - params;
|
nparams = ((CARD32 *) stuff + client->req_len) - params;
|
||||||
|
|
@ -390,74 +367,69 @@ SProcRRSetCrtcTransform (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRRGetCrtcTransform (ClientPtr client)
|
SProcRRGetCrtcTransform (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRGetCrtcTransformReq);
|
REQUEST(xRRGetCrtcTransformReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetCrtcTransformReq);
|
REQUEST_SIZE_MATCH(xRRGetCrtcTransformReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->crtc, n);
|
swapl(&stuff->crtc);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRGetPanning (ClientPtr client)
|
SProcRRGetPanning (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRGetPanningReq);
|
REQUEST(xRRGetPanningReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetPanningReq);
|
REQUEST_SIZE_MATCH(xRRGetPanningReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->crtc, n);
|
swapl(&stuff->crtc);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRSetPanning (ClientPtr client)
|
SProcRRSetPanning (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRSetPanningReq);
|
REQUEST(xRRSetPanningReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRSetPanningReq);
|
REQUEST_SIZE_MATCH(xRRSetPanningReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->crtc, n);
|
swapl(&stuff->crtc);
|
||||||
swapl(&stuff->timestamp, n);
|
swapl(&stuff->timestamp);
|
||||||
swaps(&stuff->left, n);
|
swaps(&stuff->left);
|
||||||
swaps(&stuff->top, n);
|
swaps(&stuff->top);
|
||||||
swaps(&stuff->width, n);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height, n);
|
swaps(&stuff->height);
|
||||||
swaps(&stuff->track_left, n);
|
swaps(&stuff->track_left);
|
||||||
swaps(&stuff->track_top, n);
|
swaps(&stuff->track_top);
|
||||||
swaps(&stuff->track_width, n);
|
swaps(&stuff->track_width);
|
||||||
swaps(&stuff->track_height, n);
|
swaps(&stuff->track_height);
|
||||||
swaps(&stuff->border_left, n);
|
swaps(&stuff->border_left);
|
||||||
swaps(&stuff->border_top, n);
|
swaps(&stuff->border_top);
|
||||||
swaps(&stuff->border_right, n);
|
swaps(&stuff->border_right);
|
||||||
swaps(&stuff->border_bottom, n);
|
swaps(&stuff->border_bottom);
|
||||||
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
return (*ProcRandrVector[stuff->randrReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRSetOutputPrimary (ClientPtr client)
|
SProcRRSetOutputPrimary (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRSetOutputPrimaryReq);
|
REQUEST(xRRSetOutputPrimaryReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
|
REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
swapl(&stuff->output, n);
|
swapl(&stuff->output);
|
||||||
return ProcRandrVector[stuff->randrReqType](client);
|
return ProcRandrVector[stuff->randrReqType](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRRGetOutputPrimary (ClientPtr client)
|
SProcRRGetOutputPrimary (ClientPtr client)
|
||||||
{
|
{
|
||||||
int n;
|
|
||||||
REQUEST(xRRGetOutputPrimaryReq);
|
REQUEST(xRRGetOutputPrimaryReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRRGetOutputPrimaryReq);
|
REQUEST_SIZE_MATCH(xRRGetOutputPrimaryReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return ProcRandrVector[stuff->randrReqType](client);
|
return ProcRandrVector[stuff->randrReqType](client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,6 @@ int
|
||||||
ProcRRXineramaQueryVersion(ClientPtr client)
|
ProcRRXineramaQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
xPanoramiXQueryVersionReply rep;
|
xPanoramiXQueryVersionReply rep;
|
||||||
register int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
|
REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
|
@ -99,10 +98,10 @@ ProcRRXineramaQueryVersion(ClientPtr client)
|
||||||
rep.majorVersion = SERVER_RRXINERAMA_MAJOR_VERSION;
|
rep.majorVersion = SERVER_RRXINERAMA_MAJOR_VERSION;
|
||||||
rep.minorVersion = SERVER_RRXINERAMA_MINOR_VERSION;
|
rep.minorVersion = SERVER_RRXINERAMA_MINOR_VERSION;
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -114,7 +113,7 @@ ProcRRXineramaGetState(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetStateReq);
|
REQUEST(xPanoramiXGetStateReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetStateReply rep;
|
xPanoramiXGetStateReply rep;
|
||||||
register int n, rc;
|
register int rc;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
rrScrPrivPtr pScrPriv;
|
rrScrPrivPtr pScrPriv;
|
||||||
Bool active = FALSE;
|
Bool active = FALSE;
|
||||||
|
|
@ -138,9 +137,9 @@ ProcRRXineramaGetState(ClientPtr client)
|
||||||
rep.state = active;
|
rep.state = active;
|
||||||
rep.window = stuff->window;
|
rep.window = stuff->window;
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
swaps (&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl (&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl (&rep.window, n);
|
swapl(&rep.window);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *)&rep);
|
WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -180,7 +179,7 @@ ProcRRXineramaGetScreenCount(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetScreenCountReq);
|
REQUEST(xPanoramiXGetScreenCountReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
xPanoramiXGetScreenCountReply rep;
|
xPanoramiXGetScreenCountReply rep;
|
||||||
register int n, rc;
|
register int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
|
|
@ -193,9 +192,9 @@ ProcRRXineramaGetScreenCount(ClientPtr client)
|
||||||
rep.ScreenCount = RRXineramaScreenCount (pWin->drawable.pScreen);
|
rep.ScreenCount = RRXineramaScreenCount (pWin->drawable.pScreen);
|
||||||
rep.window = stuff->window;
|
rep.window = stuff->window;
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.window, n);
|
swapl(&rep.window);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);
|
WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -208,7 +207,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
|
||||||
WindowPtr pWin, pRoot;
|
WindowPtr pWin, pRoot;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
xPanoramiXGetScreenSizeReply rep;
|
xPanoramiXGetScreenSizeReply rep;
|
||||||
register int n, rc;
|
register int rc;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
|
|
@ -226,12 +225,12 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
|
||||||
rep.window = stuff->window;
|
rep.window = stuff->window;
|
||||||
rep.screen = stuff->screen;
|
rep.screen = stuff->screen;
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.width, n);
|
swapl(&rep.width);
|
||||||
swapl(&rep.height, n);
|
swapl(&rep.height);
|
||||||
swapl(&rep.window, n);
|
swapl(&rep.window);
|
||||||
swapl(&rep.screen, n);
|
swapl(&rep.screen);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep);
|
WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -250,10 +249,9 @@ ProcRRXineramaIsActive(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.state = RRXineramaScreenActive (screenInfo.screens[RR_XINERAMA_SCREEN]);
|
rep.state = RRXineramaScreenActive (screenInfo.screens[RR_XINERAMA_SCREEN]);
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
register int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.state);
|
||||||
swapl(&rep.state, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep);
|
WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -287,11 +285,10 @@ RRXineramaWriteCrtc(ClientPtr client, RRCrtcPtr crtc)
|
||||||
scratch.height = height;
|
scratch.height = height;
|
||||||
}
|
}
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
register int n;
|
swaps(&scratch.x_org);
|
||||||
swaps(&scratch.x_org, n);
|
swaps(&scratch.y_org);
|
||||||
swaps(&scratch.y_org, n);
|
swaps(&scratch.width);
|
||||||
swaps(&scratch.width, n);
|
swaps(&scratch.height);
|
||||||
swaps(&scratch.height, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sz_XineramaScreenInfo, &scratch);
|
WriteToClient(client, sz_XineramaScreenInfo, &scratch);
|
||||||
}
|
}
|
||||||
|
|
@ -313,10 +310,9 @@ ProcRRXineramaQueryScreens(ClientPtr client)
|
||||||
rep.number = RRXineramaScreenCount (pScreen);
|
rep.number = RRXineramaScreenCount (pScreen);
|
||||||
rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
|
rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
register int n;
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.sequenceNumber, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.number);
|
||||||
swapl(&rep.number, n);
|
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xXineramaQueryScreensReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXineramaQueryScreensReply), (char *)&rep);
|
||||||
|
|
||||||
|
|
@ -371,8 +367,7 @@ static int
|
||||||
SProcRRXineramaQueryVersion (ClientPtr client)
|
SProcRRXineramaQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXQueryVersionReq);
|
REQUEST(xPanoramiXQueryVersionReq);
|
||||||
register int n;
|
swaps(&stuff->length);
|
||||||
swaps(&stuff->length,n);
|
|
||||||
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
||||||
return ProcRRXineramaQueryVersion(client);
|
return ProcRRXineramaQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
@ -381,10 +376,9 @@ static int
|
||||||
SProcRRXineramaGetState(ClientPtr client)
|
SProcRRXineramaGetState(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetStateReq);
|
REQUEST(xPanoramiXGetStateReq);
|
||||||
register int n;
|
swaps(&stuff->length);
|
||||||
swaps (&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return ProcRRXineramaGetState(client);
|
return ProcRRXineramaGetState(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -392,10 +386,9 @@ static int
|
||||||
SProcRRXineramaGetScreenCount(ClientPtr client)
|
SProcRRXineramaGetScreenCount(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetScreenCountReq);
|
REQUEST(xPanoramiXGetScreenCountReq);
|
||||||
register int n;
|
swaps(&stuff->length);
|
||||||
swaps (&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
return ProcRRXineramaGetScreenCount(client);
|
return ProcRRXineramaGetScreenCount(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -403,11 +396,10 @@ static int
|
||||||
SProcRRXineramaGetScreenSize(ClientPtr client)
|
SProcRRXineramaGetScreenSize(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xPanoramiXGetScreenSizeReq);
|
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||||
register int n;
|
swaps(&stuff->length);
|
||||||
swaps (&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||||
swapl (&stuff->window, n);
|
swapl(&stuff->window);
|
||||||
swapl (&stuff->screen, n);
|
swapl(&stuff->screen);
|
||||||
return ProcRRXineramaGetScreenSize(client);
|
return ProcRRXineramaGetScreenSize(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -415,8 +407,7 @@ static int
|
||||||
SProcRRXineramaIsActive(ClientPtr client)
|
SProcRRXineramaIsActive(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXineramaIsActiveReq);
|
REQUEST(xXineramaIsActiveReq);
|
||||||
register int n;
|
swaps(&stuff->length);
|
||||||
swaps (&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
||||||
return ProcRRXineramaIsActive(client);
|
return ProcRRXineramaIsActive(client);
|
||||||
}
|
}
|
||||||
|
|
@ -425,8 +416,7 @@ static int
|
||||||
SProcRRXineramaQueryScreens(ClientPtr client)
|
SProcRRXineramaQueryScreens(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xXineramaQueryScreensReq);
|
REQUEST(xXineramaQueryScreensReq);
|
||||||
register int n;
|
swaps(&stuff->length);
|
||||||
swaps (&stuff->length, n);
|
|
||||||
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
||||||
return ProcRRXineramaQueryScreens(client);
|
return ProcRRXineramaQueryScreens(client);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -295,7 +295,6 @@ RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient,
|
||||||
CARD32 elemHeaderData[2];
|
CARD32 elemHeaderData[2];
|
||||||
int numElemHeaders = 0;
|
int numElemHeaders = 0;
|
||||||
Bool recordingClientSwapped = pContext->pRecordingClient->swapped;
|
Bool recordingClientSwapped = pContext->pRecordingClient->swapped;
|
||||||
int n;
|
|
||||||
CARD32 serverTime = 0;
|
CARD32 serverTime = 0;
|
||||||
Bool gotServerTime = FALSE;
|
Bool gotServerTime = FALSE;
|
||||||
int replylen;
|
int replylen;
|
||||||
|
|
@ -339,11 +338,11 @@ RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient,
|
||||||
|
|
||||||
if (recordingClientSwapped)
|
if (recordingClientSwapped)
|
||||||
{
|
{
|
||||||
swaps(&pRep->sequenceNumber, n);
|
swaps(&pRep->sequenceNumber);
|
||||||
swapl(&pRep->length, n);
|
swapl(&pRep->length);
|
||||||
swapl(&pRep->idBase, n);
|
swapl(&pRep->idBase);
|
||||||
swapl(&pRep->serverTime, n);
|
swapl(&pRep->serverTime);
|
||||||
swapl(&pRep->recordedSequenceNumber, n);
|
swapl(&pRep->recordedSequenceNumber);
|
||||||
}
|
}
|
||||||
pContext->numBufBytes = SIZEOF(xRecordEnableContextReply);
|
pContext->numBufBytes = SIZEOF(xRecordEnableContextReply);
|
||||||
}
|
}
|
||||||
|
|
@ -361,7 +360,7 @@ RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient,
|
||||||
else
|
else
|
||||||
elemHeaderData[numElemHeaders] = GetTimeInMillis();
|
elemHeaderData[numElemHeaders] = GetTimeInMillis();
|
||||||
if (recordingClientSwapped)
|
if (recordingClientSwapped)
|
||||||
swapl(&elemHeaderData[numElemHeaders], n);
|
swapl(&elemHeaderData[numElemHeaders]);
|
||||||
numElemHeaders++;
|
numElemHeaders++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -371,17 +370,17 @@ RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient,
|
||||||
{
|
{
|
||||||
elemHeaderData[numElemHeaders] = pClient->sequence;
|
elemHeaderData[numElemHeaders] = pClient->sequence;
|
||||||
if (recordingClientSwapped)
|
if (recordingClientSwapped)
|
||||||
swapl(&elemHeaderData[numElemHeaders], n);
|
swapl(&elemHeaderData[numElemHeaders]);
|
||||||
numElemHeaders++;
|
numElemHeaders++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* adjust reply length */
|
/* adjust reply length */
|
||||||
|
|
||||||
replylen = pRep->length;
|
replylen = pRep->length;
|
||||||
if (recordingClientSwapped) swapl(&replylen, n);
|
if (recordingClientSwapped) swapl(&replylen);
|
||||||
replylen += numElemHeaders + bytes_to_int32(datalen) +
|
replylen += numElemHeaders + bytes_to_int32(datalen) +
|
||||||
bytes_to_int32(futurelen);
|
bytes_to_int32(futurelen);
|
||||||
if (recordingClientSwapped) swapl(&replylen, n);
|
if (recordingClientSwapped) swapl(&replylen);
|
||||||
pRep->length = replylen;
|
pRep->length = replylen;
|
||||||
} /* end if not continued reply */
|
} /* end if not continued reply */
|
||||||
|
|
||||||
|
|
@ -473,7 +472,6 @@ static void
|
||||||
RecordABigRequest(RecordContextPtr pContext, ClientPtr client, xReq *stuff)
|
RecordABigRequest(RecordContextPtr pContext, ClientPtr client, xReq *stuff)
|
||||||
{
|
{
|
||||||
CARD32 bigLength;
|
CARD32 bigLength;
|
||||||
char n;
|
|
||||||
int bytesLeft;
|
int bytesLeft;
|
||||||
|
|
||||||
/* note: client->req_len has been frobbed by ReadRequestFromClient
|
/* note: client->req_len has been frobbed by ReadRequestFromClient
|
||||||
|
|
@ -490,7 +488,7 @@ RecordABigRequest(RecordContextPtr pContext, ClientPtr client, xReq *stuff)
|
||||||
/* reinsert the extended length field that was squished out */
|
/* reinsert the extended length field that was squished out */
|
||||||
bigLength = client->req_len + bytes_to_int32(sizeof(bigLength));
|
bigLength = client->req_len + bytes_to_int32(sizeof(bigLength));
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl(&bigLength, n);
|
swapl(&bigLength);
|
||||||
RecordAProtocolElement(pContext, client, XRecordFromClient,
|
RecordAProtocolElement(pContext, client, XRecordFromClient,
|
||||||
(pointer)&bigLength, sizeof(bigLength), /* continuation */ -1);
|
(pointer)&bigLength, sizeof(bigLength), /* continuation */ -1);
|
||||||
bytesLeft -= sizeof(bigLength);
|
bytesLeft -= sizeof(bigLength);
|
||||||
|
|
@ -1892,7 +1890,6 @@ ProcRecordQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
/* REQUEST(xRecordQueryVersionReq); */
|
/* REQUEST(xRecordQueryVersionReq); */
|
||||||
xRecordQueryVersionReply rep;
|
xRecordQueryVersionReply rep;
|
||||||
int n;
|
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRecordQueryVersionReq);
|
REQUEST_SIZE_MATCH(xRecordQueryVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
|
@ -1902,9 +1899,9 @@ ProcRecordQueryVersion(ClientPtr client)
|
||||||
rep.minorVersion = SERVER_RECORD_MINOR_VERSION;
|
rep.minorVersion = SERVER_RECORD_MINOR_VERSION;
|
||||||
if(client->swapped)
|
if(client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swaps(&rep.majorVersion, n);
|
swaps(&rep.majorVersion);
|
||||||
swaps(&rep.minorVersion, n);
|
swaps(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
(void)WriteToClient(client, sizeof(xRecordQueryVersionReply),
|
(void)WriteToClient(client, sizeof(xRecordQueryVersionReply),
|
||||||
(char *)&rep);
|
(char *)&rep);
|
||||||
|
|
@ -2207,13 +2204,12 @@ static void
|
||||||
RecordSwapRanges(xRecordRange *pRanges, int nRanges)
|
RecordSwapRanges(xRecordRange *pRanges, int nRanges)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
register char n;
|
|
||||||
for (i = 0; i < nRanges; i++, pRanges++)
|
for (i = 0; i < nRanges; i++, pRanges++)
|
||||||
{
|
{
|
||||||
swaps(&pRanges->extRequestsMinorFirst, n);
|
swaps(&pRanges->extRequestsMinorFirst);
|
||||||
swaps(&pRanges->extRequestsMinorLast, n);
|
swaps(&pRanges->extRequestsMinorLast);
|
||||||
swaps(&pRanges->extRepliesMinorFirst, n);
|
swaps(&pRanges->extRepliesMinorFirst);
|
||||||
swaps(&pRanges->extRepliesMinorLast, n);
|
swaps(&pRanges->extRepliesMinorLast);
|
||||||
}
|
}
|
||||||
} /* RecordSwapRanges */
|
} /* RecordSwapRanges */
|
||||||
|
|
||||||
|
|
@ -2224,7 +2220,6 @@ ProcRecordGetContext(ClientPtr client)
|
||||||
RecordContextPtr pContext;
|
RecordContextPtr pContext;
|
||||||
REQUEST(xRecordGetContextReq);
|
REQUEST(xRecordGetContextReq);
|
||||||
xRecordGetContextReply rep;
|
xRecordGetContextReply rep;
|
||||||
int n;
|
|
||||||
RecordClientsAndProtocolPtr pRCAP;
|
RecordClientsAndProtocolPtr pRCAP;
|
||||||
int nRCAPs = 0;
|
int nRCAPs = 0;
|
||||||
GetContextRangeInfoPtr pRangeInfo;
|
GetContextRangeInfoPtr pRangeInfo;
|
||||||
|
|
@ -2323,9 +2318,9 @@ ProcRecordGetContext(ClientPtr client)
|
||||||
rep.elementHeader = pContext->elemHeaders;
|
rep.elementHeader = pContext->elemHeaders;
|
||||||
if(client->swapped)
|
if(client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.nClients, n);
|
swapl(&rep.nClients);
|
||||||
}
|
}
|
||||||
(void)WriteToClient(client, sizeof(xRecordGetContextReply),
|
(void)WriteToClient(client, sizeof(xRecordGetContextReply),
|
||||||
(char *)&rep);
|
(char *)&rep);
|
||||||
|
|
@ -2340,13 +2335,13 @@ ProcRecordGetContext(ClientPtr client)
|
||||||
rci.nRanges = pri->nRanges;
|
rci.nRanges = pri->nRanges;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swapl(&rci.nRanges, n);
|
swapl(&rci.nRanges);
|
||||||
RecordSwapRanges(pri->pRanges, pri->nRanges);
|
RecordSwapRanges(pri->pRanges, pri->nRanges);
|
||||||
}
|
}
|
||||||
for (i = 0; i < pRCAP->numClients; i++)
|
for (i = 0; i < pRCAP->numClients; i++)
|
||||||
{
|
{
|
||||||
rci.clientResource = pRCAP->pClientIDs[i];
|
rci.clientResource = pRCAP->pClientIDs[i];
|
||||||
if (client->swapped) swapl(&rci.clientResource, n);
|
if (client->swapped) swapl(&rci.clientResource);
|
||||||
WriteToClient(client, sizeof(xRecordClientInfo), (char *)&rci);
|
WriteToClient(client, sizeof(xRecordClientInfo), (char *)&rci);
|
||||||
WriteToClient(client, sizeof(xRecordRange) * pri->nRanges,
|
WriteToClient(client, sizeof(xRecordRange) * pri->nRanges,
|
||||||
(char *)pri->pRanges);
|
(char *)pri->pRanges);
|
||||||
|
|
@ -2590,12 +2585,11 @@ static int
|
||||||
SProcRecordQueryVersion(ClientPtr client)
|
SProcRecordQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xRecordQueryVersionReq);
|
REQUEST(xRecordQueryVersionReq);
|
||||||
register char n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xRecordQueryVersionReq);
|
REQUEST_SIZE_MATCH(xRecordQueryVersionReq);
|
||||||
swaps(&stuff->majorVersion, n);
|
swaps(&stuff->majorVersion);
|
||||||
swaps(&stuff->minorVersion,n);
|
swaps(&stuff->minorVersion);
|
||||||
return ProcRecordQueryVersion(client);
|
return ProcRecordQueryVersion(client);
|
||||||
} /* SProcRecordQueryVersion */
|
} /* SProcRecordQueryVersion */
|
||||||
|
|
||||||
|
|
@ -2603,19 +2597,18 @@ SProcRecordQueryVersion(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SwapCreateRegister(xRecordRegisterClientsReq *stuff)
|
SwapCreateRegister(xRecordRegisterClientsReq *stuff)
|
||||||
{
|
{
|
||||||
register char n;
|
|
||||||
int i;
|
int i;
|
||||||
XID *pClientID;
|
XID *pClientID;
|
||||||
|
|
||||||
swapl(&stuff->context, n);
|
swapl(&stuff->context);
|
||||||
swapl(&stuff->nClients, n);
|
swapl(&stuff->nClients);
|
||||||
swapl(&stuff->nRanges, n);
|
swapl(&stuff->nRanges);
|
||||||
pClientID = (XID *)&stuff[1];
|
pClientID = (XID *)&stuff[1];
|
||||||
if (stuff->nClients > stuff->length - bytes_to_int32(sz_xRecordRegisterClientsReq))
|
if (stuff->nClients > stuff->length - bytes_to_int32(sz_xRecordRegisterClientsReq))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
for (i = 0; i < stuff->nClients; i++, pClientID++)
|
for (i = 0; i < stuff->nClients; i++, pClientID++)
|
||||||
{
|
{
|
||||||
swapl(pClientID, n);
|
swapl(pClientID);
|
||||||
}
|
}
|
||||||
if (stuff->nRanges > stuff->length - bytes_to_int32(sz_xRecordRegisterClientsReq)
|
if (stuff->nRanges > stuff->length - bytes_to_int32(sz_xRecordRegisterClientsReq)
|
||||||
- stuff->nClients)
|
- stuff->nClients)
|
||||||
|
|
@ -2630,9 +2623,8 @@ SProcRecordCreateContext(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xRecordCreateContextReq);
|
REQUEST(xRecordCreateContextReq);
|
||||||
int status;
|
int status;
|
||||||
register char n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xRecordCreateContextReq);
|
REQUEST_AT_LEAST_SIZE(xRecordCreateContextReq);
|
||||||
if ((status = SwapCreateRegister((pointer)stuff)) != Success)
|
if ((status = SwapCreateRegister((pointer)stuff)) != Success)
|
||||||
return status;
|
return status;
|
||||||
|
|
@ -2645,9 +2637,8 @@ SProcRecordRegisterClients(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xRecordRegisterClientsReq);
|
REQUEST(xRecordRegisterClientsReq);
|
||||||
int status;
|
int status;
|
||||||
register char n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xRecordRegisterClientsReq);
|
REQUEST_AT_LEAST_SIZE(xRecordRegisterClientsReq);
|
||||||
if ((status = SwapCreateRegister((pointer)stuff)) != Success)
|
if ((status = SwapCreateRegister((pointer)stuff)) != Success)
|
||||||
return status;
|
return status;
|
||||||
|
|
@ -2659,12 +2650,11 @@ static int
|
||||||
SProcRecordUnregisterClients(ClientPtr client)
|
SProcRecordUnregisterClients(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xRecordUnregisterClientsReq);
|
REQUEST(xRecordUnregisterClientsReq);
|
||||||
register char n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_AT_LEAST_SIZE(xRecordUnregisterClientsReq);
|
REQUEST_AT_LEAST_SIZE(xRecordUnregisterClientsReq);
|
||||||
swapl(&stuff->context, n);
|
swapl(&stuff->context);
|
||||||
swapl(&stuff->nClients, n);
|
swapl(&stuff->nClients);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return ProcRecordUnregisterClients(client);
|
return ProcRecordUnregisterClients(client);
|
||||||
} /* SProcRecordUnregisterClients */
|
} /* SProcRecordUnregisterClients */
|
||||||
|
|
@ -2674,11 +2664,10 @@ static int
|
||||||
SProcRecordGetContext(ClientPtr client)
|
SProcRecordGetContext(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xRecordGetContextReq);
|
REQUEST(xRecordGetContextReq);
|
||||||
register char n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xRecordGetContextReq);
|
REQUEST_SIZE_MATCH(xRecordGetContextReq);
|
||||||
swapl(&stuff->context, n);
|
swapl(&stuff->context);
|
||||||
return ProcRecordGetContext(client);
|
return ProcRecordGetContext(client);
|
||||||
} /* SProcRecordGetContext */
|
} /* SProcRecordGetContext */
|
||||||
|
|
||||||
|
|
@ -2686,11 +2675,10 @@ static int
|
||||||
SProcRecordEnableContext(ClientPtr client)
|
SProcRecordEnableContext(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xRecordEnableContextReq);
|
REQUEST(xRecordEnableContextReq);
|
||||||
register char n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xRecordEnableContextReq);
|
REQUEST_SIZE_MATCH(xRecordEnableContextReq);
|
||||||
swapl(&stuff->context, n);
|
swapl(&stuff->context);
|
||||||
return ProcRecordEnableContext(client);
|
return ProcRecordEnableContext(client);
|
||||||
} /* SProcRecordEnableContext */
|
} /* SProcRecordEnableContext */
|
||||||
|
|
||||||
|
|
@ -2699,11 +2687,10 @@ static int
|
||||||
SProcRecordDisableContext(ClientPtr client)
|
SProcRecordDisableContext(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xRecordDisableContextReq);
|
REQUEST(xRecordDisableContextReq);
|
||||||
register char n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xRecordDisableContextReq);
|
REQUEST_SIZE_MATCH(xRecordDisableContextReq);
|
||||||
swapl(&stuff->context, n);
|
swapl(&stuff->context);
|
||||||
return ProcRecordDisableContext(client);
|
return ProcRecordDisableContext(client);
|
||||||
} /* SProcRecordDisableContext */
|
} /* SProcRecordDisableContext */
|
||||||
|
|
||||||
|
|
@ -2712,11 +2699,10 @@ static int
|
||||||
SProcRecordFreeContext(ClientPtr client)
|
SProcRecordFreeContext(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xRecordFreeContextReq);
|
REQUEST(xRecordFreeContextReq);
|
||||||
register char n;
|
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
REQUEST_SIZE_MATCH(xRecordFreeContextReq);
|
REQUEST_SIZE_MATCH(xRecordFreeContextReq);
|
||||||
swapl(&stuff->context, n);
|
swapl(&stuff->context);
|
||||||
return ProcRecordFreeContext(client);
|
return ProcRecordFreeContext(client);
|
||||||
} /* SProcRecordFreeContext */
|
} /* SProcRecordFreeContext */
|
||||||
|
|
||||||
|
|
|
||||||
442
render/render.c
442
render/render.c
|
|
@ -276,7 +276,6 @@ ProcRenderQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
RenderClientPtr pRenderClient = GetRenderClient (client);
|
RenderClientPtr pRenderClient = GetRenderClient (client);
|
||||||
xRenderQueryVersionReply rep;
|
xRenderQueryVersionReply rep;
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderQueryVersionReq);
|
REQUEST(xRenderQueryVersionReq);
|
||||||
|
|
||||||
pRenderClient->major_version = stuff->majorVersion;
|
pRenderClient->major_version = stuff->majorVersion;
|
||||||
|
|
@ -300,10 +299,10 @@ ProcRenderQueryVersion (ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length);
|
||||||
swapl(&rep.majorVersion, n);
|
swapl(&rep.majorVersion);
|
||||||
swapl(&rep.minorVersion, n);
|
swapl(&rep.minorVersion);
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
@ -345,7 +344,6 @@ ProcRenderQueryPictFormats (ClientPtr client)
|
||||||
int nvisual;
|
int nvisual;
|
||||||
int rlength;
|
int rlength;
|
||||||
int s;
|
int s;
|
||||||
int n;
|
|
||||||
int numScreens;
|
int numScreens;
|
||||||
int numSubpixel;
|
int numSubpixel;
|
||||||
/* REQUEST(xRenderQueryPictFormatsReq); */
|
/* REQUEST(xRenderQueryPictFormatsReq); */
|
||||||
|
|
@ -432,16 +430,16 @@ ProcRenderQueryPictFormats (ClientPtr client)
|
||||||
pictForm->colormap = None;
|
pictForm->colormap = None;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swapl (&pictForm->id, n);
|
swapl(&pictForm->id);
|
||||||
swaps (&pictForm->direct.red, n);
|
swaps(&pictForm->direct.red);
|
||||||
swaps (&pictForm->direct.redMask, n);
|
swaps(&pictForm->direct.redMask);
|
||||||
swaps (&pictForm->direct.green, n);
|
swaps(&pictForm->direct.green);
|
||||||
swaps (&pictForm->direct.greenMask, n);
|
swaps(&pictForm->direct.greenMask);
|
||||||
swaps (&pictForm->direct.blue, n);
|
swaps(&pictForm->direct.blue);
|
||||||
swaps (&pictForm->direct.blueMask, n);
|
swaps(&pictForm->direct.blueMask);
|
||||||
swaps (&pictForm->direct.alpha, n);
|
swaps(&pictForm->direct.alpha);
|
||||||
swaps (&pictForm->direct.alphaMask, n);
|
swaps(&pictForm->direct.alphaMask);
|
||||||
swapl (&pictForm->colormap, n);
|
swapl(&pictForm->colormap);
|
||||||
}
|
}
|
||||||
pictForm++;
|
pictForm++;
|
||||||
}
|
}
|
||||||
|
|
@ -471,8 +469,8 @@ ProcRenderQueryPictFormats (ClientPtr client)
|
||||||
pictVisual->format = pFormat->id;
|
pictVisual->format = pFormat->id;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swapl (&pictVisual->visual, n);
|
swapl(&pictVisual->visual);
|
||||||
swapl (&pictVisual->format, n);
|
swapl(&pictVisual->format);
|
||||||
}
|
}
|
||||||
pictVisual++;
|
pictVisual++;
|
||||||
nvisual++;
|
nvisual++;
|
||||||
|
|
@ -482,7 +480,7 @@ ProcRenderQueryPictFormats (ClientPtr client)
|
||||||
pictDepth->nPictVisuals = nvisual;
|
pictDepth->nPictVisuals = nvisual;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps (&pictDepth->nPictVisuals, n);
|
swaps(&pictDepth->nPictVisuals);
|
||||||
}
|
}
|
||||||
ndepth++;
|
ndepth++;
|
||||||
pictDepth = (xPictDepth *) pictVisual;
|
pictDepth = (xPictDepth *) pictVisual;
|
||||||
|
|
@ -495,8 +493,8 @@ ProcRenderQueryPictFormats (ClientPtr client)
|
||||||
pictScreen->fallback = 0;
|
pictScreen->fallback = 0;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swapl (&pictScreen->nDepth, n);
|
swapl(&pictScreen->nDepth);
|
||||||
swapl (&pictScreen->fallback, n);
|
swapl(&pictScreen->fallback);
|
||||||
}
|
}
|
||||||
pictScreen = (xPictScreen *) pictDepth;
|
pictScreen = (xPictScreen *) pictDepth;
|
||||||
}
|
}
|
||||||
|
|
@ -512,20 +510,20 @@ ProcRenderQueryPictFormats (ClientPtr client)
|
||||||
*pictSubpixel = SubPixelUnknown;
|
*pictSubpixel = SubPixelUnknown;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swapl (pictSubpixel, n);
|
swapl(pictSubpixel);
|
||||||
}
|
}
|
||||||
++pictSubpixel;
|
++pictSubpixel;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps (&reply->sequenceNumber, n);
|
swaps(&reply->sequenceNumber);
|
||||||
swapl (&reply->length, n);
|
swapl(&reply->length);
|
||||||
swapl (&reply->numFormats, n);
|
swapl(&reply->numFormats);
|
||||||
swapl (&reply->numScreens, n);
|
swapl(&reply->numScreens);
|
||||||
swapl (&reply->numDepths, n);
|
swapl(&reply->numDepths);
|
||||||
swapl (&reply->numVisuals, n);
|
swapl(&reply->numVisuals);
|
||||||
swapl (&reply->numSubpixel, n);
|
swapl(&reply->numSubpixel);
|
||||||
}
|
}
|
||||||
WriteToClient(client, rlength, (char *) reply);
|
WriteToClient(client, rlength, (char *) reply);
|
||||||
free(reply);
|
free(reply);
|
||||||
|
|
@ -538,7 +536,7 @@ ProcRenderQueryPictIndexValues (ClientPtr client)
|
||||||
PictFormatPtr pFormat;
|
PictFormatPtr pFormat;
|
||||||
int rc, num;
|
int rc, num;
|
||||||
int rlength;
|
int rlength;
|
||||||
int i, n;
|
int i;
|
||||||
REQUEST(xRenderQueryPictIndexValuesReq);
|
REQUEST(xRenderQueryPictIndexValuesReq);
|
||||||
xRenderQueryPictIndexValuesReply *reply;
|
xRenderQueryPictIndexValuesReply *reply;
|
||||||
xIndexValue *values;
|
xIndexValue *values;
|
||||||
|
|
@ -575,15 +573,15 @@ ProcRenderQueryPictIndexValues (ClientPtr client)
|
||||||
{
|
{
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
swapl (&values[i].pixel, n);
|
swapl(&values[i].pixel);
|
||||||
swaps (&values[i].red, n);
|
swaps(&values[i].red);
|
||||||
swaps (&values[i].green, n);
|
swaps(&values[i].green);
|
||||||
swaps (&values[i].blue, n);
|
swaps(&values[i].blue);
|
||||||
swaps (&values[i].alpha, n);
|
swaps(&values[i].alpha);
|
||||||
}
|
}
|
||||||
swaps (&reply->sequenceNumber, n);
|
swaps(&reply->sequenceNumber);
|
||||||
swapl (&reply->length, n);
|
swapl(&reply->length);
|
||||||
swapl (&reply->numIndexValues, n);
|
swapl(&reply->numIndexValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteToClient(client, rlength, (char *) reply);
|
WriteToClient(client, rlength, (char *) reply);
|
||||||
|
|
@ -1822,16 +1820,14 @@ ProcRenderQueryFilters (ClientPtr client)
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
|
|
||||||
for (i = 0; i < reply->numAliases; i++)
|
for (i = 0; i < reply->numAliases; i++)
|
||||||
{
|
{
|
||||||
swaps (&aliases[i], n);
|
swaps(&aliases[i]);
|
||||||
}
|
}
|
||||||
swaps(&reply->sequenceNumber, n);
|
swaps(&reply->sequenceNumber);
|
||||||
swapl(&reply->length, n);
|
swapl(&reply->length);
|
||||||
swapl(&reply->numAliases, n);
|
swapl(&reply->numAliases);
|
||||||
swapl(&reply->numFilters, n);
|
swapl(&reply->numFilters);
|
||||||
}
|
}
|
||||||
WriteToClient(client, total_bytes, (char *) reply);
|
WriteToClient(client, total_bytes, (char *) reply);
|
||||||
free(reply);
|
free(reply);
|
||||||
|
|
@ -2068,31 +2064,28 @@ ProcRenderDispatch (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderQueryVersion (ClientPtr client)
|
SProcRenderQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderQueryVersionReq);
|
REQUEST(xRenderQueryVersionReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->majorVersion, n);
|
swapl(&stuff->majorVersion);
|
||||||
swapl(&stuff->minorVersion, n);
|
swapl(&stuff->minorVersion);
|
||||||
return (*ProcRenderVector[stuff->renderReqType])(client);
|
return (*ProcRenderVector[stuff->renderReqType])(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderQueryPictFormats (ClientPtr client)
|
SProcRenderQueryPictFormats (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderQueryPictFormatsReq);
|
REQUEST(xRenderQueryPictFormatsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderQueryPictIndexValues (ClientPtr client)
|
SProcRenderQueryPictIndexValues (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderQueryPictIndexValuesReq);
|
REQUEST(xRenderQueryPictIndexValuesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->format, n);
|
swapl(&stuff->format);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2105,13 +2098,12 @@ SProcRenderQueryDithers (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderCreatePicture (ClientPtr client)
|
SProcRenderCreatePicture (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderCreatePictureReq);
|
REQUEST(xRenderCreatePictureReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->pid, n);
|
swapl(&stuff->pid);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
swapl(&stuff->format, n);
|
swapl(&stuff->format);
|
||||||
swapl(&stuff->mask, n);
|
swapl(&stuff->mask);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2119,11 +2111,10 @@ SProcRenderCreatePicture (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderChangePicture (ClientPtr client)
|
SProcRenderChangePicture (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderChangePictureReq);
|
REQUEST(xRenderChangePictureReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->picture, n);
|
swapl(&stuff->picture);
|
||||||
swapl(&stuff->mask, n);
|
swapl(&stuff->mask);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2131,12 +2122,11 @@ SProcRenderChangePicture (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderSetPictureClipRectangles (ClientPtr client)
|
SProcRenderSetPictureClipRectangles (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderSetPictureClipRectanglesReq);
|
REQUEST(xRenderSetPictureClipRectanglesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->picture, n);
|
swapl(&stuff->picture);
|
||||||
swaps(&stuff->xOrigin, n);
|
swaps(&stuff->xOrigin);
|
||||||
swaps(&stuff->yOrigin, n);
|
swaps(&stuff->yOrigin);
|
||||||
SwapRestS(stuff);
|
SwapRestS(stuff);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2144,65 +2134,61 @@ SProcRenderSetPictureClipRectangles (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderFreePicture (ClientPtr client)
|
SProcRenderFreePicture (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderFreePictureReq);
|
REQUEST(xRenderFreePictureReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->picture, n);
|
swapl(&stuff->picture);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderComposite (ClientPtr client)
|
SProcRenderComposite (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderCompositeReq);
|
REQUEST(xRenderCompositeReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->src, n);
|
swapl(&stuff->src);
|
||||||
swapl(&stuff->mask, n);
|
swapl(&stuff->mask);
|
||||||
swapl(&stuff->dst, n);
|
swapl(&stuff->dst);
|
||||||
swaps(&stuff->xSrc, n);
|
swaps(&stuff->xSrc);
|
||||||
swaps(&stuff->ySrc, n);
|
swaps(&stuff->ySrc);
|
||||||
swaps(&stuff->xMask, n);
|
swaps(&stuff->xMask);
|
||||||
swaps(&stuff->yMask, n);
|
swaps(&stuff->yMask);
|
||||||
swaps(&stuff->xDst, n);
|
swaps(&stuff->xDst);
|
||||||
swaps(&stuff->yDst, n);
|
swaps(&stuff->yDst);
|
||||||
swaps(&stuff->width, n);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height, n);
|
swaps(&stuff->height);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderScale (ClientPtr client)
|
SProcRenderScale (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderScaleReq);
|
REQUEST(xRenderScaleReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->src, n);
|
swapl(&stuff->src);
|
||||||
swapl(&stuff->dst, n);
|
swapl(&stuff->dst);
|
||||||
swapl(&stuff->colorScale, n);
|
swapl(&stuff->colorScale);
|
||||||
swapl(&stuff->alphaScale, n);
|
swapl(&stuff->alphaScale);
|
||||||
swaps(&stuff->xSrc, n);
|
swaps(&stuff->xSrc);
|
||||||
swaps(&stuff->ySrc, n);
|
swaps(&stuff->ySrc);
|
||||||
swaps(&stuff->xDst, n);
|
swaps(&stuff->xDst);
|
||||||
swaps(&stuff->yDst, n);
|
swaps(&stuff->yDst);
|
||||||
swaps(&stuff->width, n);
|
swaps(&stuff->width);
|
||||||
swaps(&stuff->height, n);
|
swaps(&stuff->height);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderTrapezoids (ClientPtr client)
|
SProcRenderTrapezoids (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderTrapezoidsReq);
|
REQUEST(xRenderTrapezoidsReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq);
|
REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq);
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl (&stuff->src, n);
|
swapl(&stuff->src);
|
||||||
swapl (&stuff->dst, n);
|
swapl(&stuff->dst);
|
||||||
swapl (&stuff->maskFormat, n);
|
swapl(&stuff->maskFormat);
|
||||||
swaps (&stuff->xSrc, n);
|
swaps(&stuff->xSrc);
|
||||||
swaps (&stuff->ySrc, n);
|
swaps(&stuff->ySrc);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2210,16 +2196,15 @@ SProcRenderTrapezoids (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderTriangles (ClientPtr client)
|
SProcRenderTriangles (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderTrianglesReq);
|
REQUEST(xRenderTrianglesReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
|
REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl (&stuff->src, n);
|
swapl(&stuff->src);
|
||||||
swapl (&stuff->dst, n);
|
swapl(&stuff->dst);
|
||||||
swapl (&stuff->maskFormat, n);
|
swapl(&stuff->maskFormat);
|
||||||
swaps (&stuff->xSrc, n);
|
swaps(&stuff->xSrc);
|
||||||
swaps (&stuff->ySrc, n);
|
swaps(&stuff->ySrc);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2227,16 +2212,15 @@ SProcRenderTriangles (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderTriStrip (ClientPtr client)
|
SProcRenderTriStrip (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderTriStripReq);
|
REQUEST(xRenderTriStripReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xRenderTriStripReq);
|
REQUEST_AT_LEAST_SIZE(xRenderTriStripReq);
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl (&stuff->src, n);
|
swapl(&stuff->src);
|
||||||
swapl (&stuff->dst, n);
|
swapl(&stuff->dst);
|
||||||
swapl (&stuff->maskFormat, n);
|
swapl(&stuff->maskFormat);
|
||||||
swaps (&stuff->xSrc, n);
|
swaps(&stuff->xSrc);
|
||||||
swaps (&stuff->ySrc, n);
|
swaps(&stuff->ySrc);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2244,16 +2228,15 @@ SProcRenderTriStrip (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderTriFan (ClientPtr client)
|
SProcRenderTriFan (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderTriFanReq);
|
REQUEST(xRenderTriFanReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xRenderTriFanReq);
|
REQUEST_AT_LEAST_SIZE(xRenderTriFanReq);
|
||||||
swaps (&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl (&stuff->src, n);
|
swapl(&stuff->src);
|
||||||
swapl (&stuff->dst, n);
|
swapl(&stuff->dst);
|
||||||
swapl (&stuff->maskFormat, n);
|
swapl(&stuff->maskFormat);
|
||||||
swaps (&stuff->xSrc, n);
|
swaps(&stuff->xSrc);
|
||||||
swaps (&stuff->ySrc, n);
|
swaps(&stuff->ySrc);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2279,47 +2262,43 @@ SProcRenderTransform (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderCreateGlyphSet (ClientPtr client)
|
SProcRenderCreateGlyphSet (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderCreateGlyphSetReq);
|
REQUEST(xRenderCreateGlyphSetReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->gsid, n);
|
swapl(&stuff->gsid);
|
||||||
swapl(&stuff->format, n);
|
swapl(&stuff->format);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderReferenceGlyphSet (ClientPtr client)
|
SProcRenderReferenceGlyphSet (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderReferenceGlyphSetReq);
|
REQUEST(xRenderReferenceGlyphSetReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->gsid, n);
|
swapl(&stuff->gsid);
|
||||||
swapl(&stuff->existing, n);
|
swapl(&stuff->existing);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderFreeGlyphSet (ClientPtr client)
|
SProcRenderFreeGlyphSet (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderFreeGlyphSetReq);
|
REQUEST(xRenderFreeGlyphSetReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->glyphset, n);
|
swapl(&stuff->glyphset);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderAddGlyphs (ClientPtr client)
|
SProcRenderAddGlyphs (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
register int i;
|
register int i;
|
||||||
CARD32 *gids;
|
CARD32 *gids;
|
||||||
void *end;
|
void *end;
|
||||||
xGlyphInfo *gi;
|
xGlyphInfo *gi;
|
||||||
REQUEST(xRenderAddGlyphsReq);
|
REQUEST(xRenderAddGlyphsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->glyphset, n);
|
swapl(&stuff->glyphset);
|
||||||
swapl(&stuff->nglyphs, n);
|
swapl(&stuff->nglyphs);
|
||||||
if (stuff->nglyphs & 0xe0000000)
|
if (stuff->nglyphs & 0xe0000000)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
end = (CARD8 *) stuff + (client->req_len << 2);
|
end = (CARD8 *) stuff + (client->req_len << 2);
|
||||||
|
|
@ -2331,13 +2310,13 @@ SProcRenderAddGlyphs (ClientPtr client)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
for (i = 0; i < stuff->nglyphs; i++)
|
for (i = 0; i < stuff->nglyphs; i++)
|
||||||
{
|
{
|
||||||
swapl (&gids[i], n);
|
swapl(&gids[i]);
|
||||||
swaps (&gi[i].width, n);
|
swaps(&gi[i].width);
|
||||||
swaps (&gi[i].height, n);
|
swaps(&gi[i].height);
|
||||||
swaps (&gi[i].x, n);
|
swaps(&gi[i].x);
|
||||||
swaps (&gi[i].y, n);
|
swaps(&gi[i].y);
|
||||||
swaps (&gi[i].xOff, n);
|
swaps(&gi[i].xOff);
|
||||||
swaps (&gi[i].yOff, n);
|
swaps(&gi[i].yOff);
|
||||||
}
|
}
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2351,10 +2330,9 @@ SProcRenderAddGlyphsFromPicture (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderFreeGlyphs (ClientPtr client)
|
SProcRenderFreeGlyphs (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderFreeGlyphsReq);
|
REQUEST(xRenderFreeGlyphsReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->glyphset, n);
|
swapl(&stuff->glyphset);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2362,7 +2340,6 @@ SProcRenderFreeGlyphs (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderCompositeGlyphs (ClientPtr client)
|
SProcRenderCompositeGlyphs (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
xGlyphElt *elt;
|
xGlyphElt *elt;
|
||||||
CARD8 *buffer;
|
CARD8 *buffer;
|
||||||
CARD8 *end;
|
CARD8 *end;
|
||||||
|
|
@ -2378,13 +2355,13 @@ SProcRenderCompositeGlyphs (ClientPtr client)
|
||||||
case X_RenderCompositeGlyphs32: size = 4; break;
|
case X_RenderCompositeGlyphs32: size = 4; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->src, n);
|
swapl(&stuff->src);
|
||||||
swapl(&stuff->dst, n);
|
swapl(&stuff->dst);
|
||||||
swapl(&stuff->maskFormat, n);
|
swapl(&stuff->maskFormat);
|
||||||
swapl(&stuff->glyphset, n);
|
swapl(&stuff->glyphset);
|
||||||
swaps(&stuff->xSrc, n);
|
swaps(&stuff->xSrc);
|
||||||
swaps(&stuff->ySrc, n);
|
swaps(&stuff->ySrc);
|
||||||
buffer = (CARD8 *) (stuff + 1);
|
buffer = (CARD8 *) (stuff + 1);
|
||||||
end = (CARD8 *) stuff + (client->req_len << 2);
|
end = (CARD8 *) stuff + (client->req_len << 2);
|
||||||
while (buffer + sizeof (xGlyphElt) < end)
|
while (buffer + sizeof (xGlyphElt) < end)
|
||||||
|
|
@ -2392,13 +2369,13 @@ SProcRenderCompositeGlyphs (ClientPtr client)
|
||||||
elt = (xGlyphElt *) buffer;
|
elt = (xGlyphElt *) buffer;
|
||||||
buffer += sizeof (xGlyphElt);
|
buffer += sizeof (xGlyphElt);
|
||||||
|
|
||||||
swaps (&elt->deltax, n);
|
swaps(&elt->deltax);
|
||||||
swaps (&elt->deltay, n);
|
swaps(&elt->deltay);
|
||||||
|
|
||||||
i = elt->len;
|
i = elt->len;
|
||||||
if (i == 0xff)
|
if (i == 0xff)
|
||||||
{
|
{
|
||||||
swapl (buffer, n);
|
swapl(buffer);
|
||||||
buffer += 4;
|
buffer += 4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -2411,14 +2388,14 @@ SProcRenderCompositeGlyphs (ClientPtr client)
|
||||||
case 2:
|
case 2:
|
||||||
while (i--)
|
while (i--)
|
||||||
{
|
{
|
||||||
swaps (buffer, n);
|
swaps(buffer);
|
||||||
buffer += 2;
|
buffer += 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
while (i--)
|
while (i--)
|
||||||
{
|
{
|
||||||
swapl (buffer, n);
|
swapl(buffer);
|
||||||
buffer += 4;
|
buffer += 4;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -2433,16 +2410,15 @@ SProcRenderCompositeGlyphs (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderFillRectangles (ClientPtr client)
|
SProcRenderFillRectangles (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderFillRectanglesReq);
|
REQUEST(xRenderFillRectanglesReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq);
|
REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->dst, n);
|
swapl(&stuff->dst);
|
||||||
swaps(&stuff->color.red, n);
|
swaps(&stuff->color.red);
|
||||||
swaps(&stuff->color.green, n);
|
swaps(&stuff->color.green);
|
||||||
swaps(&stuff->color.blue, n);
|
swaps(&stuff->color.blue);
|
||||||
swaps(&stuff->color.alpha, n);
|
swaps(&stuff->color.alpha);
|
||||||
SwapRestS(stuff);
|
SwapRestS(stuff);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2450,73 +2426,68 @@ SProcRenderFillRectangles (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderCreateCursor (ClientPtr client)
|
SProcRenderCreateCursor (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderCreateCursorReq);
|
REQUEST(xRenderCreateCursorReq);
|
||||||
REQUEST_SIZE_MATCH (xRenderCreateCursorReq);
|
REQUEST_SIZE_MATCH (xRenderCreateCursorReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->cid, n);
|
swapl(&stuff->cid);
|
||||||
swapl(&stuff->src, n);
|
swapl(&stuff->src);
|
||||||
swaps(&stuff->x, n);
|
swaps(&stuff->x);
|
||||||
swaps(&stuff->y, n);
|
swaps(&stuff->y);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderSetPictureTransform (ClientPtr client)
|
SProcRenderSetPictureTransform (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST(xRenderSetPictureTransformReq);
|
REQUEST(xRenderSetPictureTransformReq);
|
||||||
REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
|
REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->picture, n);
|
swapl(&stuff->picture);
|
||||||
swapl(&stuff->transform.matrix11, n);
|
swapl(&stuff->transform.matrix11);
|
||||||
swapl(&stuff->transform.matrix12, n);
|
swapl(&stuff->transform.matrix12);
|
||||||
swapl(&stuff->transform.matrix13, n);
|
swapl(&stuff->transform.matrix13);
|
||||||
swapl(&stuff->transform.matrix21, n);
|
swapl(&stuff->transform.matrix21);
|
||||||
swapl(&stuff->transform.matrix22, n);
|
swapl(&stuff->transform.matrix22);
|
||||||
swapl(&stuff->transform.matrix23, n);
|
swapl(&stuff->transform.matrix23);
|
||||||
swapl(&stuff->transform.matrix31, n);
|
swapl(&stuff->transform.matrix31);
|
||||||
swapl(&stuff->transform.matrix32, n);
|
swapl(&stuff->transform.matrix32);
|
||||||
swapl(&stuff->transform.matrix33, n);
|
swapl(&stuff->transform.matrix33);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderQueryFilters (ClientPtr client)
|
SProcRenderQueryFilters (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST (xRenderQueryFiltersReq);
|
REQUEST (xRenderQueryFiltersReq);
|
||||||
REQUEST_SIZE_MATCH (xRenderQueryFiltersReq);
|
REQUEST_SIZE_MATCH (xRenderQueryFiltersReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->drawable, n);
|
swapl(&stuff->drawable);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderSetPictureFilter (ClientPtr client)
|
SProcRenderSetPictureFilter (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST (xRenderSetPictureFilterReq);
|
REQUEST (xRenderSetPictureFilterReq);
|
||||||
REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq);
|
REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->picture, n);
|
swapl(&stuff->picture);
|
||||||
swaps(&stuff->nbytes, n);
|
swaps(&stuff->nbytes);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcRenderCreateAnimCursor (ClientPtr client)
|
SProcRenderCreateAnimCursor (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST (xRenderCreateAnimCursorReq);
|
REQUEST (xRenderCreateAnimCursorReq);
|
||||||
REQUEST_AT_LEAST_SIZE (xRenderCreateAnimCursorReq);
|
REQUEST_AT_LEAST_SIZE (xRenderCreateAnimCursorReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->cid, n);
|
swapl(&stuff->cid);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2524,14 +2495,13 @@ SProcRenderCreateAnimCursor (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderAddTraps (ClientPtr client)
|
SProcRenderAddTraps (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST (xRenderAddTrapsReq);
|
REQUEST (xRenderAddTrapsReq);
|
||||||
REQUEST_AT_LEAST_SIZE (xRenderAddTrapsReq);
|
REQUEST_AT_LEAST_SIZE (xRenderAddTrapsReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->picture, n);
|
swapl(&stuff->picture);
|
||||||
swaps(&stuff->xOff, n);
|
swaps(&stuff->xOff);
|
||||||
swaps(&stuff->yOff, n);
|
swaps(&stuff->yOff);
|
||||||
SwapRestL(stuff);
|
SwapRestL(stuff);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
@ -2539,32 +2509,31 @@ SProcRenderAddTraps (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderCreateSolidFill(ClientPtr client)
|
SProcRenderCreateSolidFill(ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
REQUEST (xRenderCreateSolidFillReq);
|
REQUEST (xRenderCreateSolidFillReq);
|
||||||
REQUEST_AT_LEAST_SIZE (xRenderCreateSolidFillReq);
|
REQUEST_AT_LEAST_SIZE (xRenderCreateSolidFillReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->pid, n);
|
swapl(&stuff->pid);
|
||||||
swaps(&stuff->color.alpha, n);
|
swaps(&stuff->color.alpha);
|
||||||
swaps(&stuff->color.red, n);
|
swaps(&stuff->color.red);
|
||||||
swaps(&stuff->color.green, n);
|
swaps(&stuff->color.green);
|
||||||
swaps(&stuff->color.blue, n);
|
swaps(&stuff->color.blue);
|
||||||
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
return (*ProcRenderVector[stuff->renderReqType]) (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void swapStops(void *stuff, int num)
|
static void swapStops(void *stuff, int num)
|
||||||
{
|
{
|
||||||
int i, n;
|
int i;
|
||||||
CARD32 *stops;
|
CARD32 *stops;
|
||||||
CARD16 *colors;
|
CARD16 *colors;
|
||||||
stops = (CARD32 *)(stuff);
|
stops = (CARD32 *)(stuff);
|
||||||
for (i = 0; i < num; ++i) {
|
for (i = 0; i < num; ++i) {
|
||||||
swapl(stops, n);
|
swapl(stops);
|
||||||
++stops;
|
++stops;
|
||||||
}
|
}
|
||||||
colors = (CARD16 *)(stops);
|
colors = (CARD16 *)(stops);
|
||||||
for (i = 0; i < 4*num; ++i) {
|
for (i = 0; i < 4*num; ++i) {
|
||||||
swaps(colors, n);
|
swaps(colors);
|
||||||
++colors;
|
++colors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2572,18 +2541,17 @@ static void swapStops(void *stuff, int num)
|
||||||
static int
|
static int
|
||||||
SProcRenderCreateLinearGradient (ClientPtr client)
|
SProcRenderCreateLinearGradient (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
int len;
|
int len;
|
||||||
REQUEST (xRenderCreateLinearGradientReq);
|
REQUEST (xRenderCreateLinearGradientReq);
|
||||||
REQUEST_AT_LEAST_SIZE (xRenderCreateLinearGradientReq);
|
REQUEST_AT_LEAST_SIZE (xRenderCreateLinearGradientReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->pid, n);
|
swapl(&stuff->pid);
|
||||||
swapl(&stuff->p1.x, n);
|
swapl(&stuff->p1.x);
|
||||||
swapl(&stuff->p1.y, n);
|
swapl(&stuff->p1.y);
|
||||||
swapl(&stuff->p2.x, n);
|
swapl(&stuff->p2.x);
|
||||||
swapl(&stuff->p2.y, n);
|
swapl(&stuff->p2.y);
|
||||||
swapl(&stuff->nStops, n);
|
swapl(&stuff->nStops);
|
||||||
|
|
||||||
len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
|
len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
|
||||||
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
|
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
|
||||||
|
|
@ -2599,20 +2567,19 @@ SProcRenderCreateLinearGradient (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderCreateRadialGradient (ClientPtr client)
|
SProcRenderCreateRadialGradient (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
int len;
|
int len;
|
||||||
REQUEST (xRenderCreateRadialGradientReq);
|
REQUEST (xRenderCreateRadialGradientReq);
|
||||||
REQUEST_AT_LEAST_SIZE (xRenderCreateRadialGradientReq);
|
REQUEST_AT_LEAST_SIZE (xRenderCreateRadialGradientReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->pid, n);
|
swapl(&stuff->pid);
|
||||||
swapl(&stuff->inner.x, n);
|
swapl(&stuff->inner.x);
|
||||||
swapl(&stuff->inner.y, n);
|
swapl(&stuff->inner.y);
|
||||||
swapl(&stuff->outer.x, n);
|
swapl(&stuff->outer.x);
|
||||||
swapl(&stuff->outer.y, n);
|
swapl(&stuff->outer.y);
|
||||||
swapl(&stuff->inner_radius, n);
|
swapl(&stuff->inner_radius);
|
||||||
swapl(&stuff->outer_radius, n);
|
swapl(&stuff->outer_radius);
|
||||||
swapl(&stuff->nStops, n);
|
swapl(&stuff->nStops);
|
||||||
|
|
||||||
len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq);
|
len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq);
|
||||||
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
|
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
|
||||||
|
|
@ -2628,17 +2595,16 @@ SProcRenderCreateRadialGradient (ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcRenderCreateConicalGradient (ClientPtr client)
|
SProcRenderCreateConicalGradient (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
|
||||||
int len;
|
int len;
|
||||||
REQUEST (xRenderCreateConicalGradientReq);
|
REQUEST (xRenderCreateConicalGradientReq);
|
||||||
REQUEST_AT_LEAST_SIZE (xRenderCreateConicalGradientReq);
|
REQUEST_AT_LEAST_SIZE (xRenderCreateConicalGradientReq);
|
||||||
|
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length);
|
||||||
swapl(&stuff->pid, n);
|
swapl(&stuff->pid);
|
||||||
swapl(&stuff->center.x, n);
|
swapl(&stuff->center.x);
|
||||||
swapl(&stuff->center.y, n);
|
swapl(&stuff->center.y);
|
||||||
swapl(&stuff->angle, n);
|
swapl(&stuff->angle);
|
||||||
swapl(&stuff->nStops, n);
|
swapl(&stuff->nStops);
|
||||||
|
|
||||||
len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq);
|
len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq);
|
||||||
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
|
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
|
||||||
|
|
|
||||||
|
|
@ -44,15 +44,13 @@ static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out,
|
||||||
|
|
||||||
if (swap)
|
if (swap)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&out->sequenceNumber);
|
||||||
|
swapl(&out->length);
|
||||||
swaps(&out->sequenceNumber, n);
|
swaps(&out->evtype);
|
||||||
swapl(&out->length, n);
|
swaps(&out->deviceid);
|
||||||
swaps(&out->evtype, n);
|
swapl(&out->time);
|
||||||
swaps(&out->deviceid, n);
|
swapl(&out->detail);
|
||||||
swapl(&out->time, n);
|
swaps(&out->valuators_len);
|
||||||
swapl(&out->detail, n);
|
|
||||||
swaps(&out->valuators_len, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -101,9 +99,8 @@ static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out,
|
||||||
vo.frac = value->frac;
|
vo.frac = value->frac;
|
||||||
if (swap)
|
if (swap)
|
||||||
{
|
{
|
||||||
char n;
|
swapl(&vo.integral);
|
||||||
swapl(&vo.integral, n);
|
swapl(&vo.frac);
|
||||||
swapl(&vo.frac, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(vi.integral == vo.integral);
|
assert(vi.integral == vo.integral);
|
||||||
|
|
@ -118,9 +115,8 @@ static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out,
|
||||||
vo.frac = raw_value->frac;
|
vo.frac = raw_value->frac;
|
||||||
if (swap)
|
if (swap)
|
||||||
{
|
{
|
||||||
char n;
|
swapl(&vo.integral);
|
||||||
swapl(&vo.integral, n);
|
swapl(&vo.frac);
|
||||||
swapl(&vo.frac, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(vi.integral == vo.integral);
|
assert(vi.integral == vo.integral);
|
||||||
|
|
@ -276,29 +272,27 @@ static void test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent *out,
|
||||||
FP3232 *values;
|
FP3232 *values;
|
||||||
|
|
||||||
if (swap) {
|
if (swap) {
|
||||||
char n;
|
swaps(&out->sequenceNumber);
|
||||||
|
swapl(&out->length);
|
||||||
swaps(&out->sequenceNumber, n);
|
swaps(&out->evtype);
|
||||||
swapl(&out->length, n);
|
swaps(&out->deviceid);
|
||||||
swaps(&out->evtype, n);
|
swaps(&out->sourceid);
|
||||||
swaps(&out->deviceid, n);
|
swapl(&out->time);
|
||||||
swaps(&out->sourceid, n);
|
swapl(&out->detail);
|
||||||
swapl(&out->time, n);
|
swapl(&out->root);
|
||||||
swapl(&out->detail, n);
|
swapl(&out->event);
|
||||||
swapl(&out->root, n);
|
swapl(&out->child);
|
||||||
swapl(&out->event, n);
|
swapl(&out->root_x);
|
||||||
swapl(&out->child, n);
|
swapl(&out->root_y);
|
||||||
swapl(&out->root_x, n);
|
swapl(&out->event_x);
|
||||||
swapl(&out->root_y, n);
|
swapl(&out->event_y);
|
||||||
swapl(&out->event_x, n);
|
swaps(&out->buttons_len);
|
||||||
swapl(&out->event_y, n);
|
swaps(&out->valuators_len);
|
||||||
swaps(&out->buttons_len, n);
|
swapl(&out->mods.base_mods);
|
||||||
swaps(&out->valuators_len, n);
|
swapl(&out->mods.latched_mods);
|
||||||
swapl(&out->mods.base_mods, n);
|
swapl(&out->mods.locked_mods);
|
||||||
swapl(&out->mods.latched_mods, n);
|
swapl(&out->mods.effective_mods);
|
||||||
swapl(&out->mods.locked_mods, n);
|
swapl(&out->flags);
|
||||||
swapl(&out->mods.effective_mods, n);
|
|
||||||
swapl(&out->flags, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(out->extension == 0); /* IReqCode defaults to 0 */
|
assert(out->extension == 0); /* IReqCode defaults to 0 */
|
||||||
|
|
@ -388,9 +382,8 @@ static void test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent *out,
|
||||||
|
|
||||||
if (swap)
|
if (swap)
|
||||||
{
|
{
|
||||||
char n;
|
swapl(&vo.integral);
|
||||||
swapl(&vo.integral, n);
|
swapl(&vo.frac);
|
||||||
swapl(&vo.frac, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -647,15 +640,13 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
|
||||||
|
|
||||||
if (swap)
|
if (swap)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&out->sequenceNumber);
|
||||||
|
swapl(&out->length);
|
||||||
swaps(&out->sequenceNumber, n);
|
swaps(&out->evtype);
|
||||||
swapl(&out->length, n);
|
swaps(&out->deviceid);
|
||||||
swaps(&out->evtype, n);
|
swaps(&out->sourceid);
|
||||||
swaps(&out->deviceid, n);
|
swapl(&out->time);
|
||||||
swaps(&out->sourceid, n);
|
swaps(&out->num_classes);
|
||||||
swapl(&out->time, n);
|
|
||||||
swaps(&out->num_classes, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(out->type == GenericEvent);
|
assert(out->type == GenericEvent);
|
||||||
|
|
@ -672,10 +663,9 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
|
||||||
|
|
||||||
if (swap)
|
if (swap)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&any->length);
|
||||||
swaps(&any->length, n);
|
swaps(&any->type);
|
||||||
swaps(&any->type, n);
|
swaps(&any->sourceid);
|
||||||
swaps(&any->sourceid, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(any->type)
|
switch(any->type)
|
||||||
|
|
@ -687,8 +677,7 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
|
||||||
|
|
||||||
if (swap)
|
if (swap)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&b->num_buttons);
|
||||||
swaps(&b->num_buttons, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(b->length ==
|
assert(b->length ==
|
||||||
|
|
@ -703,8 +692,7 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
|
||||||
{
|
{
|
||||||
if (swap)
|
if (swap)
|
||||||
{
|
{
|
||||||
char n;
|
swapl(&names[j]);
|
||||||
swapl(&names[j], n);
|
|
||||||
}
|
}
|
||||||
assert(names[j] == in->buttons.names[j]);
|
assert(names[j] == in->buttons.names[j]);
|
||||||
}
|
}
|
||||||
|
|
@ -717,8 +705,7 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
|
||||||
|
|
||||||
if (swap)
|
if (swap)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&k->num_keycodes);
|
||||||
swaps(&k->num_keycodes, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(k->length ==
|
assert(k->length ==
|
||||||
|
|
@ -732,8 +719,7 @@ static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
|
||||||
{
|
{
|
||||||
if (swap)
|
if (swap)
|
||||||
{
|
{
|
||||||
char n;
|
swapl(&kc[j]);
|
||||||
swapl(&kc[j], n);
|
|
||||||
}
|
}
|
||||||
assert(kc[j] >= in->keys.min_keycode);
|
assert(kc[j] >= in->keys.min_keycode);
|
||||||
assert(kc[j] <= in->keys.max_keycode);
|
assert(kc[j] <= in->keys.max_keycode);
|
||||||
|
|
|
||||||
|
|
@ -70,10 +70,9 @@ static void reply_XIGetClientPointer(ClientPtr client, int len, char *data, void
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swapl(&rep->length);
|
||||||
swapl(&rep->length, n);
|
swaps(&rep->sequenceNumber);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->deviceid);
|
||||||
swaps(&rep->deviceid, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reply_check_defaults(rep, len, XIGetClientPointer);
|
reply_check_defaults(rep, len, XIGetClientPointer);
|
||||||
|
|
@ -85,7 +84,6 @@ static void reply_XIGetClientPointer(ClientPtr client, int len, char *data, void
|
||||||
|
|
||||||
static void request_XIGetClientPointer(ClientPtr client, xXIGetClientPointerReq* req, int error)
|
static void request_XIGetClientPointer(ClientPtr client, xXIGetClientPointerReq* req, int error)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
test_data.win = req->win;
|
test_data.win = req->win;
|
||||||
|
|
@ -97,8 +95,8 @@ static void request_XIGetClientPointer(ClientPtr client, xXIGetClientPointerReq*
|
||||||
assert(client_request.errorValue == req->win);
|
assert(client_request.errorValue == req->win);
|
||||||
|
|
||||||
client_request.swapped = TRUE;
|
client_request.swapped = TRUE;
|
||||||
swapl(&req->win, n);
|
swapl(&req->win);
|
||||||
swaps(&req->length, n);
|
swaps(&req->length);
|
||||||
rc = SProcXIGetClientPointer(&client_request);
|
rc = SProcXIGetClientPointer(&client_request);
|
||||||
assert(rc == error);
|
assert(rc == error);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,10 +91,9 @@ static void reply_XIGetSelectedEvents(ClientPtr client, int len, char *data, voi
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swapl(&rep->length);
|
||||||
swapl(&rep->length, n);
|
swaps(&rep->sequenceNumber);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swaps(&rep->num_masks);
|
||||||
swaps(&rep->num_masks, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reply_check_defaults(rep, len, XIGetSelectedEvents);
|
reply_check_defaults(rep, len, XIGetSelectedEvents);
|
||||||
|
|
@ -115,9 +114,8 @@ static void reply_XIGetSelectedEvents_data(ClientPtr client, int len, char *data
|
||||||
{
|
{
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&mask->deviceid);
|
||||||
swaps(&mask->deviceid, n);
|
swaps(&mask->mask_len);
|
||||||
swaps(&mask->mask_len, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(mask->deviceid < 6);
|
assert(mask->deviceid < 6);
|
||||||
|
|
@ -136,7 +134,6 @@ static void reply_XIGetSelectedEvents_data(ClientPtr client, int len, char *data
|
||||||
|
|
||||||
static void request_XIGetSelectedEvents(xXIGetSelectedEventsReq* req, int error)
|
static void request_XIGetSelectedEvents(xXIGetSelectedEventsReq* req, int error)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
int rc;
|
int rc;
|
||||||
ClientRec client;
|
ClientRec client;
|
||||||
client = init_client(req->length, req);
|
client = init_client(req->length, req);
|
||||||
|
|
@ -148,8 +145,8 @@ static void request_XIGetSelectedEvents(xXIGetSelectedEventsReq* req, int error)
|
||||||
|
|
||||||
reply_handler = reply_XIGetSelectedEvents;
|
reply_handler = reply_XIGetSelectedEvents;
|
||||||
client.swapped = TRUE;
|
client.swapped = TRUE;
|
||||||
swapl(&req->win, n);
|
swapl(&req->win);
|
||||||
swaps(&req->length, n);
|
swaps(&req->length);
|
||||||
rc = SProcXIGetSelectedEvents(&client);
|
rc = SProcXIGetSelectedEvents(&client);
|
||||||
assert(rc == error);
|
assert(rc == error);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,10 +85,9 @@ static void reply_XIPassiveGrabDevice(ClientPtr client, int len, char *data, voi
|
||||||
|
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
swaps(&rep->sequenceNumber);
|
||||||
swaps(&rep->sequenceNumber, n);
|
swapl(&rep->length);
|
||||||
swapl(&rep->length, n);
|
swaps(&rep->num_modifiers);
|
||||||
swaps(&rep->num_modifiers, n);
|
|
||||||
|
|
||||||
testdata.num_modifiers = rep->num_modifiers;
|
testdata.num_modifiers = rep->num_modifiers;
|
||||||
}
|
}
|
||||||
|
|
@ -104,14 +103,13 @@ static void reply_XIPassiveGrabDevice(ClientPtr client, int len, char *data, voi
|
||||||
static void reply_XIPassiveGrabDevice_data(ClientPtr client, int len, char *data, void *userdata)
|
static void reply_XIPassiveGrabDevice_data(ClientPtr client, int len, char *data, void *userdata)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int n;
|
|
||||||
|
|
||||||
xXIGrabModifierInfo *mods = (xXIGrabModifierInfo*)data;
|
xXIGrabModifierInfo *mods = (xXIGrabModifierInfo*)data;
|
||||||
|
|
||||||
for (i = 0; i < testdata.num_modifiers; i++, mods++)
|
for (i = 0; i < testdata.num_modifiers; i++, mods++)
|
||||||
{
|
{
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
swapl(&mods->modifiers, n);
|
swapl(&mods->modifiers);
|
||||||
|
|
||||||
/* 1 - 7 is the range we use for the global modifiers array
|
/* 1 - 7 is the range we use for the global modifiers array
|
||||||
* above */
|
* above */
|
||||||
|
|
@ -128,7 +126,6 @@ static void reply_XIPassiveGrabDevice_data(ClientPtr client, int len, char *data
|
||||||
|
|
||||||
static void request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq* req, int error, int errval)
|
static void request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq* req, int error, int errval)
|
||||||
{
|
{
|
||||||
char n;
|
|
||||||
int rc;
|
int rc;
|
||||||
int modifiers;
|
int modifiers;
|
||||||
|
|
||||||
|
|
@ -139,20 +136,20 @@ static void request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceRe
|
||||||
assert(client_request.errorValue == errval);
|
assert(client_request.errorValue == errval);
|
||||||
|
|
||||||
client_request.swapped = TRUE;
|
client_request.swapped = TRUE;
|
||||||
swaps(&req->length, n);
|
swaps(&req->length);
|
||||||
swapl(&req->time, n);
|
swapl(&req->time);
|
||||||
swapl(&req->grab_window, n);
|
swapl(&req->grab_window);
|
||||||
swapl(&req->cursor, n);
|
swapl(&req->cursor);
|
||||||
swapl(&req->detail, n);
|
swapl(&req->detail);
|
||||||
swaps(&req->deviceid, n);
|
swaps(&req->deviceid);
|
||||||
modifiers = req->num_modifiers;
|
modifiers = req->num_modifiers;
|
||||||
swaps(&req->num_modifiers, n);
|
swaps(&req->num_modifiers);
|
||||||
swaps(&req->mask_len, n);
|
swaps(&req->mask_len);
|
||||||
|
|
||||||
while(modifiers--)
|
while(modifiers--)
|
||||||
{
|
{
|
||||||
CARD32 *mod = ((CARD32*)(req + 1)) + modifiers;
|
CARD32 *mod = ((CARD32*)(req + 1)) + modifiers;
|
||||||
swapl(mod, n);
|
swapl(mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = SProcXIPassiveGrabDevice(&client_request);
|
rc = SProcXIPassiveGrabDevice(&client_request);
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue