mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Merge remote-tracking branch 'mattst88/for-keith'
This commit is contained in:
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)
|
||||
{
|
||||
xDMXQueryVersionReply rep;
|
||||
int n;
|
||||
|
||||
REQUEST_SIZE_MATCH(xDMXQueryVersionReq);
|
||||
|
||||
@@ -185,11 +184,11 @@ static int ProcDMXQueryVersion(ClientPtr client)
|
||||
rep.minorVersion = SERVER_DMX_MINOR_VERSION;
|
||||
rep.patchVersion = SERVER_DMX_PATCH_VERSION;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.majorVersion, n);
|
||||
swapl(&rep.minorVersion, n);
|
||||
swapl(&rep.patchVersion, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.majorVersion);
|
||||
swapl(&rep.minorVersion);
|
||||
swapl(&rep.patchVersion);
|
||||
}
|
||||
WriteToClient(client, sizeof(xDMXQueryVersionReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -198,7 +197,6 @@ static int ProcDMXQueryVersion(ClientPtr client)
|
||||
static int ProcDMXSync(ClientPtr client)
|
||||
{
|
||||
xDMXSyncReply rep;
|
||||
int n;
|
||||
|
||||
REQUEST_SIZE_MATCH(xDMXSyncReq);
|
||||
|
||||
@@ -209,9 +207,9 @@ static int ProcDMXSync(ClientPtr client)
|
||||
rep.length = 0;
|
||||
rep.status = 0;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.status, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.status);
|
||||
}
|
||||
WriteToClient(client, sizeof(xDMXSyncReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -222,7 +220,6 @@ static int ProcDMXForceWindowCreation(ClientPtr client)
|
||||
xDMXForceWindowCreationReply rep;
|
||||
REQUEST(xDMXForceWindowCreationReq);
|
||||
WindowPtr pWin;
|
||||
int n;
|
||||
|
||||
REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq);
|
||||
|
||||
@@ -259,9 +256,9 @@ static int ProcDMXForceWindowCreation(ClientPtr client)
|
||||
rep.length = 0;
|
||||
rep.status = 0;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.status, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.status);
|
||||
}
|
||||
WriteToClient(client, sizeof(xDMXForceWindowCreationReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -270,7 +267,6 @@ static int ProcDMXForceWindowCreation(ClientPtr client)
|
||||
static int ProcDMXGetScreenCount(ClientPtr client)
|
||||
{
|
||||
xDMXGetScreenCountReply rep;
|
||||
int n;
|
||||
|
||||
REQUEST_SIZE_MATCH(xDMXGetScreenCountReq);
|
||||
|
||||
@@ -279,9 +275,9 @@ static int ProcDMXGetScreenCount(ClientPtr client)
|
||||
rep.length = 0;
|
||||
rep.screenCount = dmxGetNumScreens();
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.screenCount, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.screenCount);
|
||||
}
|
||||
WriteToClient(client, sizeof(xDMXGetScreenCountReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -291,7 +287,6 @@ static int ProcDMXGetScreenAttributes(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDMXGetScreenAttributesReq);
|
||||
xDMXGetScreenAttributesReply rep;
|
||||
int n;
|
||||
int length;
|
||||
int paddedLength;
|
||||
DMXScreenAttributesRec attr;
|
||||
@@ -325,20 +320,20 @@ static int ProcDMXGetScreenAttributes(ClientPtr client)
|
||||
rep.displayNameLength = length;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.displayNameLength, n);
|
||||
swapl(&rep.logicalScreen, n);
|
||||
swaps(&rep.screenWindowWidth, n);
|
||||
swaps(&rep.screenWindowHeight, n);
|
||||
swaps(&rep.screenWindowXoffset, n);
|
||||
swaps(&rep.screenWindowYoffset, n);
|
||||
swaps(&rep.rootWindowWidth, n);
|
||||
swaps(&rep.rootWindowHeight, n);
|
||||
swaps(&rep.rootWindowXoffset, n);
|
||||
swaps(&rep.rootWindowYoffset, n);
|
||||
swaps(&rep.rootWindowXorigin, n);
|
||||
swaps(&rep.rootWindowYorigin, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.displayNameLength);
|
||||
swapl(&rep.logicalScreen);
|
||||
swaps(&rep.screenWindowWidth);
|
||||
swaps(&rep.screenWindowHeight);
|
||||
swaps(&rep.screenWindowXoffset);
|
||||
swaps(&rep.screenWindowYoffset);
|
||||
swaps(&rep.rootWindowWidth);
|
||||
swaps(&rep.rootWindowHeight);
|
||||
swaps(&rep.rootWindowXoffset);
|
||||
swaps(&rep.rootWindowYoffset);
|
||||
swaps(&rep.rootWindowXorigin);
|
||||
swaps(&rep.rootWindowYorigin);
|
||||
}
|
||||
WriteToClient(client, sizeof(xDMXGetScreenAttributesReply), (char *)&rep);
|
||||
if (length) WriteToClient(client, length, (char *)attr.displayName);
|
||||
@@ -349,7 +344,6 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDMXChangeScreensAttributesReq);
|
||||
xDMXChangeScreensAttributesReply rep;
|
||||
int n;
|
||||
int status = DMX_BAD_XINERAMA;
|
||||
unsigned int mask = 0;
|
||||
unsigned int i;
|
||||
@@ -407,10 +401,10 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
|
||||
rep.status = status;
|
||||
rep.errorScreen = errorScreen;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.status, n);
|
||||
swapl(&rep.errorScreen, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.status);
|
||||
swapl(&rep.errorScreen);
|
||||
}
|
||||
WriteToClient(client,
|
||||
sizeof(xDMXChangeScreensAttributesReply),
|
||||
@@ -422,7 +416,6 @@ static int ProcDMXAddScreen(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDMXAddScreenReq);
|
||||
xDMXAddScreenReply rep;
|
||||
int n;
|
||||
int status = 0;
|
||||
CARD32 *value_list;
|
||||
DMXScreenAttributesRec attr;
|
||||
@@ -458,10 +451,10 @@ static int ProcDMXAddScreen(ClientPtr client)
|
||||
rep.status = status;
|
||||
rep.physicalScreen = stuff->physicalScreen;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.status, n);
|
||||
swapl(&rep.physicalScreen, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.status);
|
||||
swapl(&rep.physicalScreen);
|
||||
}
|
||||
WriteToClient(client,
|
||||
sizeof(xDMXAddScreenReply),
|
||||
@@ -473,7 +466,6 @@ static int ProcDMXRemoveScreen(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDMXRemoveScreenReq);
|
||||
xDMXRemoveScreenReply rep;
|
||||
int n;
|
||||
int status = 0;
|
||||
|
||||
REQUEST_SIZE_MATCH(xDMXRemoveScreenReq);
|
||||
@@ -485,9 +477,9 @@ static int ProcDMXRemoveScreen(ClientPtr client)
|
||||
rep.length = 0;
|
||||
rep.status = status;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.status, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.status);
|
||||
}
|
||||
WriteToClient(client,
|
||||
sizeof(xDMXRemoveScreenReply),
|
||||
@@ -563,7 +555,7 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDMXGetWindowAttributesReq);
|
||||
xDMXGetWindowAttributesReply rep;
|
||||
int i, n;
|
||||
int i;
|
||||
CARD32 *screens;
|
||||
CARD32 *windows;
|
||||
xRectangle *pos, *vis;
|
||||
@@ -603,22 +595,22 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
|
||||
rep.length = count * 6;
|
||||
rep.screenCount = count;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.screenCount, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.screenCount);
|
||||
for (i = 0; i < count; i++) {
|
||||
swapl(&screens[i], n);
|
||||
swapl(&windows[i], n);
|
||||
swapl(&screens[i]);
|
||||
swapl(&windows[i]);
|
||||
|
||||
swaps(&pos[i].x, n);
|
||||
swaps(&pos[i].y, n);
|
||||
swaps(&pos[i].width, n);
|
||||
swaps(&pos[i].height, n);
|
||||
swaps(&pos[i].x);
|
||||
swaps(&pos[i].y);
|
||||
swaps(&pos[i].width);
|
||||
swaps(&pos[i].height);
|
||||
|
||||
swaps(&vis[i].x, n);
|
||||
swaps(&vis[i].y, n);
|
||||
swaps(&vis[i].width, n);
|
||||
swaps(&vis[i].height, n);
|
||||
swaps(&vis[i].x);
|
||||
swaps(&vis[i].y);
|
||||
swaps(&vis[i].width);
|
||||
swaps(&vis[i].height);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -643,7 +635,6 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
|
||||
static int ProcDMXGetDesktopAttributes(ClientPtr client)
|
||||
{
|
||||
xDMXGetDesktopAttributesReply rep;
|
||||
int n;
|
||||
DMXDesktopAttributesRec attr;
|
||||
|
||||
REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq);
|
||||
@@ -660,12 +651,12 @@ static int ProcDMXGetDesktopAttributes(ClientPtr client)
|
||||
rep.length = 0;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.width, n);
|
||||
swapl(&rep.height, n);
|
||||
swapl(&rep.shiftX, n);
|
||||
swapl(&rep.shiftY, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.width);
|
||||
swaps(&rep.height);
|
||||
swaps(&rep.shiftX);
|
||||
swaps(&rep.shiftY);
|
||||
}
|
||||
WriteToClient(client, sizeof(xDMXGetDesktopAttributesReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -675,7 +666,6 @@ static int ProcDMXChangeDesktopAttributes(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDMXChangeDesktopAttributesReq);
|
||||
xDMXChangeDesktopAttributesReply rep;
|
||||
int n;
|
||||
int status = DMX_BAD_XINERAMA;
|
||||
CARD32 *value_list;
|
||||
DMXDesktopAttributesRec attr;
|
||||
@@ -704,9 +694,9 @@ static int ProcDMXChangeDesktopAttributes(ClientPtr client)
|
||||
rep.length = 0;
|
||||
rep.status = status;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.status, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.status);
|
||||
}
|
||||
WriteToClient(client,
|
||||
sizeof(xDMXChangeDesktopAttributesReply),
|
||||
@@ -717,7 +707,6 @@ static int ProcDMXChangeDesktopAttributes(ClientPtr client)
|
||||
static int ProcDMXGetInputCount(ClientPtr client)
|
||||
{
|
||||
xDMXGetInputCountReply rep;
|
||||
int n;
|
||||
|
||||
REQUEST_SIZE_MATCH(xDMXGetInputCountReq);
|
||||
|
||||
@@ -726,9 +715,9 @@ static int ProcDMXGetInputCount(ClientPtr client)
|
||||
rep.length = 0;
|
||||
rep.inputCount = dmxGetInputCount();
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.inputCount, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.inputCount);
|
||||
}
|
||||
WriteToClient(client, sizeof(xDMXGetInputCountReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -738,7 +727,6 @@ static int ProcDMXGetInputAttributes(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDMXGetInputAttributesReq);
|
||||
xDMXGetInputAttributesReply rep;
|
||||
int n;
|
||||
int length;
|
||||
int paddedLength;
|
||||
DMXInputAttributesRec attr;
|
||||
@@ -760,12 +748,12 @@ static int ProcDMXGetInputAttributes(ClientPtr client)
|
||||
rep.length = bytes_to_int32(paddedLength);
|
||||
rep.nameLength = length;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.inputType, n);
|
||||
swapl(&rep.physicalScreen, n);
|
||||
swapl(&rep.physicalId, n);
|
||||
swapl(&rep.nameLength, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.inputType);
|
||||
swapl(&rep.physicalScreen);
|
||||
swapl(&rep.physicalId);
|
||||
swapl(&rep.nameLength);
|
||||
}
|
||||
WriteToClient(client, sizeof(xDMXGetInputAttributesReply), (char *)&rep);
|
||||
if (length) WriteToClient(client, length, (char *)attr.name);
|
||||
@@ -776,7 +764,6 @@ static int ProcDMXAddInput(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDMXAddInputReq);
|
||||
xDMXAddInputReply rep;
|
||||
int n;
|
||||
int status = 0;
|
||||
CARD32 *value_list;
|
||||
DMXInputAttributesRec attr;
|
||||
@@ -814,10 +801,10 @@ static int ProcDMXAddInput(ClientPtr client)
|
||||
rep.status = status;
|
||||
rep.physicalId = id;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.status, n);
|
||||
swapl(&rep.physicalId, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.status);
|
||||
swapl(&rep.physicalId);
|
||||
}
|
||||
WriteToClient(client, sizeof(xDMXAddInputReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -827,7 +814,6 @@ static int ProcDMXRemoveInput(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDMXRemoveInputReq);
|
||||
xDMXRemoveInputReply rep;
|
||||
int n;
|
||||
int status = 0;
|
||||
|
||||
REQUEST_SIZE_MATCH(xDMXRemoveInputReq);
|
||||
@@ -841,9 +827,9 @@ static int ProcDMXRemoveInput(ClientPtr client)
|
||||
rep.length = 0;
|
||||
rep.status = status;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.status, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.status);
|
||||
}
|
||||
WriteToClient(client, sizeof(xDMXRemoveInputReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -883,79 +869,72 @@ static int ProcDMXDispatch(ClientPtr client)
|
||||
|
||||
static int SProcDMXQueryVersion(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXQueryVersionReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDMXQueryVersionReq);
|
||||
return ProcDMXQueryVersion(client);
|
||||
}
|
||||
|
||||
static int SProcDMXSync(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXSyncReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDMXSyncReq);
|
||||
return ProcDMXSync(client);
|
||||
}
|
||||
|
||||
static int SProcDMXForceWindowCreation(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXForceWindowCreationReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq);
|
||||
swaps(&stuff->window, n);
|
||||
swapl(&stuff->window);
|
||||
return ProcDMXForceWindowCreation(client);
|
||||
}
|
||||
|
||||
static int SProcDMXGetScreenCount(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXGetScreenCountReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDMXGetScreenCountReq);
|
||||
return ProcDMXGetScreenCount(client);
|
||||
}
|
||||
|
||||
static int SProcDMXGetScreenAttributes(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXGetScreenAttributesReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDMXGetScreenAttributesReq);
|
||||
swapl(&stuff->physicalScreen, n);
|
||||
swapl(&stuff->physicalScreen);
|
||||
return ProcDMXGetScreenAttributes(client);
|
||||
}
|
||||
|
||||
static int SProcDMXChangeScreensAttributes(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXChangeScreensAttributesReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xDMXGetScreenAttributesReq);
|
||||
swapl(&stuff->screenCount, n);
|
||||
swapl(&stuff->maskCount, n);
|
||||
swapl(&stuff->screenCount);
|
||||
swapl(&stuff->maskCount);
|
||||
SwapRestL(stuff);
|
||||
return ProcDMXGetScreenAttributes(client);
|
||||
}
|
||||
|
||||
static int SProcDMXAddScreen(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
int paddedLength;
|
||||
REQUEST(xDMXAddScreenReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xDMXAddScreenReq);
|
||||
swapl(&stuff->displayNameLength, n);
|
||||
swapl(&stuff->valueMask, n);
|
||||
swapl(&stuff->displayNameLength);
|
||||
swapl(&stuff->valueMask);
|
||||
paddedLength = pad_to_int32(stuff->displayNameLength);
|
||||
SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4);
|
||||
return ProcDMXAddScreen(client);
|
||||
@@ -963,79 +942,72 @@ static int SProcDMXAddScreen(ClientPtr client)
|
||||
|
||||
static int SProcDMXRemoveScreen(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXRemoveScreenReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDMXRemoveScreenReq);
|
||||
swapl(&stuff->physicalScreen, n);
|
||||
swapl(&stuff->physicalScreen);
|
||||
return ProcDMXRemoveScreen(client);
|
||||
}
|
||||
|
||||
static int SProcDMXGetWindowAttributes(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXGetWindowAttributesReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq);
|
||||
swapl(&stuff->window, n);
|
||||
swapl(&stuff->window);
|
||||
return ProcDMXGetWindowAttributes(client);
|
||||
}
|
||||
|
||||
static int SProcDMXGetDesktopAttributes(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXGetDesktopAttributesReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDMXGetDesktopAttributesReq);
|
||||
return ProcDMXGetDesktopAttributes(client);
|
||||
}
|
||||
|
||||
static int SProcDMXChangeDesktopAttributes(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXChangeDesktopAttributesReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xDMXChangeDesktopAttributesReq);
|
||||
swapl(&stuff->valueMask, n);
|
||||
swapl(&stuff->valueMask);
|
||||
SwapRestL(stuff);
|
||||
return ProcDMXChangeDesktopAttributes(client);
|
||||
}
|
||||
|
||||
static int SProcDMXGetInputCount(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXGetInputCountReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDMXGetInputCountReq);
|
||||
return ProcDMXGetInputCount(client);
|
||||
}
|
||||
|
||||
static int SProcDMXGetInputAttributes(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXGetInputAttributesReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDMXGetInputAttributesReq);
|
||||
swapl(&stuff->deviceId, n);
|
||||
swapl(&stuff->deviceId);
|
||||
return ProcDMXGetInputAttributes(client);
|
||||
}
|
||||
|
||||
static int SProcDMXAddInput(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
int paddedLength;
|
||||
REQUEST(xDMXAddInputReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xDMXAddInputReq);
|
||||
swapl(&stuff->displayNameLength, n);
|
||||
swapl(&stuff->valueMask, n);
|
||||
swapl(&stuff->displayNameLength);
|
||||
swapl(&stuff->valueMask);
|
||||
paddedLength = pad_to_int32(stuff->displayNameLength);
|
||||
SwapLongs((CARD32 *)(stuff+1), LengthRestL(stuff) - paddedLength/4);
|
||||
return ProcDMXAddInput(client);
|
||||
@@ -1043,12 +1015,11 @@ static int SProcDMXAddInput(ClientPtr client)
|
||||
|
||||
static int SProcDMXRemoveInput(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xDMXRemoveInputReq);
|
||||
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xDMXRemoveInputReq);
|
||||
swapl(&stuff->physicalId, n);
|
||||
swapl(&stuff->physicalId);
|
||||
return ProcDMXRemoveInput(client);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,12 +42,6 @@
|
||||
#include <scrnintstr.h>
|
||||
|
||||
|
||||
/*
|
||||
** The X header misc.h defines these math functions.
|
||||
*/
|
||||
#undef abs
|
||||
#undef fabs
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES /* we want prototypes */
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glxproto.h>
|
||||
|
||||
@@ -541,7 +541,6 @@ static int
|
||||
ProcXF86DRIQueryVersion (register ClientPtr client)
|
||||
{
|
||||
xXF86DRIQueryVersionReply rep;
|
||||
register int n;
|
||||
REQUEST_SIZE_MATCH(xXF86DRIQueryVersionReq);
|
||||
|
||||
EPHYR_LOG ("enter\n") ;
|
||||
@@ -553,11 +552,11 @@ ProcXF86DRIQueryVersion (register ClientPtr client)
|
||||
rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION;
|
||||
rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.majorVersion, n);
|
||||
swaps(&rep.minorVersion, n);
|
||||
swapl(&rep.patchVersion, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.majorVersion);
|
||||
swaps(&rep.minorVersion);
|
||||
swapl(&rep.patchVersion);
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
|
||||
EPHYR_LOG ("leave\n") ;
|
||||
@@ -569,7 +568,6 @@ ProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client)
|
||||
{
|
||||
xXF86DRIQueryDirectRenderingCapableReply rep;
|
||||
Bool isCapable;
|
||||
register int n;
|
||||
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
||||
REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
|
||||
|
||||
@@ -592,8 +590,8 @@ ProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client)
|
||||
rep.isCapable = 0;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
}
|
||||
|
||||
WriteToClient(client, sizeof(xXF86DRIQueryDirectRenderingCapableReply), (char *)&rep);
|
||||
@@ -1311,19 +1309,17 @@ ProcXF86DRIDispatch (register ClientPtr client)
|
||||
static int
|
||||
SProcXF86DRIQueryVersion (register ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86DRIQueryVersionReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
return ProcXF86DRIQueryVersion(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
||||
swaps(&stuff->length, n);
|
||||
swapl(&stuff->screen, n);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->screen);
|
||||
return ProcXF86DRIQueryDirectRenderingCapable(client);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ ephyrHostProxyDoForward (pointer a_request_buffer,
|
||||
EPHYR_LOG ("enter\n") ;
|
||||
|
||||
if (a_do_swap) {
|
||||
swaps (&in_req->length, n) ;
|
||||
swaps(&in_req->length) ;
|
||||
}
|
||||
EPHYR_LOG ("Req {type:%d, data:%d, length:%d}\n",
|
||||
in_req->reqType, in_req->data, in_req->length) ;
|
||||
|
||||
@@ -760,8 +760,7 @@ vfbWriteXWDFileHeader(ScreenPtr pScreen)
|
||||
SwapLongs((CARD32 *)pXWDHeader, SIZEOF(XWDheader)/4);
|
||||
for (i = 0; i < pvfb->ncolors; i++)
|
||||
{
|
||||
register char n;
|
||||
swapl(&pvfb->pXWDCmap[i].pixel, n);
|
||||
swapl(&pvfb->pXWDCmap[i].pixel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,7 +282,6 @@ static int
|
||||
ProcXF86VidModeQueryVersion(ClientPtr client)
|
||||
{
|
||||
xXF86VidModeQueryVersionReply rep;
|
||||
register int n;
|
||||
|
||||
DEBUG_P("XF86VidModeQueryVersion");
|
||||
|
||||
@@ -293,10 +292,10 @@ ProcXF86VidModeQueryVersion(ClientPtr client)
|
||||
rep.majorVersion = SERVER_XF86VIDMODE_MAJOR_VERSION;
|
||||
rep.minorVersion = SERVER_XF86VIDMODE_MINOR_VERSION;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.majorVersion, n);
|
||||
swaps(&rep.minorVersion, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.majorVersion);
|
||||
swaps(&rep.minorVersion);
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -309,7 +308,6 @@ ProcXF86VidModeGetModeLine(ClientPtr client)
|
||||
xXF86VidModeGetModeLineReply rep;
|
||||
xXF86OldVidModeGetModeLineReply oldrep;
|
||||
pointer mode;
|
||||
register int n;
|
||||
int dotClock;
|
||||
int ver;
|
||||
|
||||
@@ -364,20 +362,20 @@ ProcXF86VidModeGetModeLine(ClientPtr client)
|
||||
rep.privsize = 0;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.dotclock, n);
|
||||
swaps(&rep.hdisplay, n);
|
||||
swaps(&rep.hsyncstart, n);
|
||||
swaps(&rep.hsyncend, n);
|
||||
swaps(&rep.htotal, n);
|
||||
swaps(&rep.hskew, n);
|
||||
swaps(&rep.vdisplay, n);
|
||||
swaps(&rep.vsyncstart, n);
|
||||
swaps(&rep.vsyncend, n);
|
||||
swaps(&rep.vtotal, n);
|
||||
swapl(&rep.flags, n);
|
||||
swapl(&rep.privsize, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.dotclock);
|
||||
swaps(&rep.hdisplay);
|
||||
swaps(&rep.hsyncstart);
|
||||
swaps(&rep.hsyncend);
|
||||
swaps(&rep.htotal);
|
||||
swaps(&rep.hskew);
|
||||
swaps(&rep.vdisplay);
|
||||
swaps(&rep.vsyncstart);
|
||||
swaps(&rep.vsyncend);
|
||||
swaps(&rep.vtotal);
|
||||
swapl(&rep.flags);
|
||||
swapl(&rep.privsize);
|
||||
}
|
||||
if (ver < 2) {
|
||||
oldrep.type = rep.type;
|
||||
@@ -412,7 +410,6 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client)
|
||||
xXF86OldVidModeModeInfo oldmdinf;
|
||||
pointer mode;
|
||||
int modecount, dotClock;
|
||||
register int n;
|
||||
int ver;
|
||||
|
||||
DEBUG_P("XF86VidModeGetAllModelines");
|
||||
@@ -442,9 +439,9 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client)
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.modecount = modecount;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.modecount, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.modecount);
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86VidModeGetAllModeLinesReply), (char *)&rep);
|
||||
|
||||
@@ -462,18 +459,18 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client)
|
||||
mdinf.flags = VidModeGetModeValue(mode, VIDMODE_FLAGS);
|
||||
mdinf.privsize = 0;
|
||||
if (client->swapped) {
|
||||
swapl(&mdinf.dotclock, n);
|
||||
swaps(&mdinf.hdisplay, n);
|
||||
swaps(&mdinf.hsyncstart, n);
|
||||
swaps(&mdinf.hsyncend, n);
|
||||
swaps(&mdinf.htotal, n);
|
||||
swaps(&mdinf.hskew, n);
|
||||
swaps(&mdinf.vdisplay, n);
|
||||
swaps(&mdinf.vsyncstart, n);
|
||||
swaps(&mdinf.vsyncend, n);
|
||||
swaps(&mdinf.vtotal, n);
|
||||
swapl(&mdinf.flags, n);
|
||||
swapl(&mdinf.privsize, n);
|
||||
swapl(&mdinf.dotclock);
|
||||
swaps(&mdinf.hdisplay);
|
||||
swaps(&mdinf.hsyncstart);
|
||||
swaps(&mdinf.hsyncend);
|
||||
swaps(&mdinf.htotal);
|
||||
swapl(&mdinf.hskew);
|
||||
swaps(&mdinf.vdisplay);
|
||||
swaps(&mdinf.vsyncstart);
|
||||
swaps(&mdinf.vsyncend);
|
||||
swaps(&mdinf.vtotal);
|
||||
swapl(&mdinf.flags);
|
||||
swapl(&mdinf.privsize);
|
||||
}
|
||||
if (ver < 2) {
|
||||
oldmdinf.dotclock = mdinf.dotclock;
|
||||
@@ -1016,10 +1013,9 @@ status_reply:
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.status = status;
|
||||
if (client->swapped) {
|
||||
register int n;
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.status, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.status);
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86VidModeValidateModeLineReply), (char *)&rep);
|
||||
if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY)
|
||||
@@ -1164,7 +1160,6 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXF86VidModeGetMonitorReq);
|
||||
xXF86VidModeGetMonitorReply rep;
|
||||
register int n;
|
||||
CARD32 *hsyncdata, *vsyncdata;
|
||||
int i, nHsync, nVrefresh;
|
||||
pointer monitor;
|
||||
@@ -1226,8 +1221,8 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
|
||||
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
}
|
||||
WriteToClient(client, SIZEOF(xXF86VidModeGetMonitorReply), (char *)&rep);
|
||||
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
|
||||
@@ -1251,7 +1246,7 @@ ProcXF86VidModeGetViewPort(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXF86VidModeGetViewPortReq);
|
||||
xXF86VidModeGetViewPortReply rep;
|
||||
int x, y, n;
|
||||
int x, y;
|
||||
|
||||
DEBUG_P("XF86VidModeGetViewPort");
|
||||
|
||||
@@ -1269,10 +1264,10 @@ ProcXF86VidModeGetViewPort(ClientPtr client)
|
||||
rep.y = y;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.x, n);
|
||||
swapl(&rep.y, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.x);
|
||||
swapl(&rep.y);
|
||||
}
|
||||
WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -1301,7 +1296,7 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXF86VidModeGetDotClocksReq);
|
||||
xXF86VidModeGetDotClocksReply rep;
|
||||
register int n;
|
||||
int n;
|
||||
int numClocks;
|
||||
CARD32 dotclock;
|
||||
int *Clocks = NULL;
|
||||
@@ -1338,11 +1333,11 @@ ProcXF86VidModeGetDotClocks(ClientPtr client)
|
||||
rep.flags |= CLKFLAG_PROGRAMABLE;
|
||||
}
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.clocks, n);
|
||||
swapl(&rep.maxclocks, n);
|
||||
swapl(&rep.flags, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.clocks);
|
||||
swapl(&rep.maxclocks);
|
||||
swapl(&rep.flags);
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86VidModeGetDotClocksReply), (char *)&rep);
|
||||
if (!ClockProg) {
|
||||
@@ -1384,7 +1379,6 @@ ProcXF86VidModeGetGamma(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXF86VidModeGetGammaReq);
|
||||
xXF86VidModeGetGammaReply rep;
|
||||
register int n;
|
||||
float red, green, blue;
|
||||
|
||||
DEBUG_P("XF86VidModeGetGamma");
|
||||
@@ -1403,11 +1397,11 @@ ProcXF86VidModeGetGamma(ClientPtr client)
|
||||
rep.green = (CARD32)(green * 10000.);
|
||||
rep.blue = (CARD32)(blue * 10000.);
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.red, n);
|
||||
swapl(&rep.green, n);
|
||||
swapl(&rep.blue, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.red);
|
||||
swapl(&rep.green);
|
||||
swapl(&rep.blue);
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -1444,7 +1438,7 @@ static int
|
||||
ProcXF86VidModeGetGammaRamp(ClientPtr client)
|
||||
{
|
||||
CARD16 *ramp = NULL;
|
||||
int n, length;
|
||||
int length;
|
||||
size_t ramplen = 0;
|
||||
xXF86VidModeGetGammaRampReply rep;
|
||||
REQUEST(xXF86VidModeGetGammaRampReq);
|
||||
@@ -1476,9 +1470,9 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client)
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.size = stuff->size;
|
||||
if(client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.size, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.size);
|
||||
SwapShorts((short*)ramp, length * 3);
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), (char *)&rep);
|
||||
@@ -1496,7 +1490,6 @@ static int
|
||||
ProcXF86VidModeGetGammaRampSize(ClientPtr client)
|
||||
{
|
||||
xXF86VidModeGetGammaRampSizeReply rep;
|
||||
int n;
|
||||
REQUEST(xXF86VidModeGetGammaRampSizeReq);
|
||||
|
||||
if(stuff->screen >= screenInfo.numScreens)
|
||||
@@ -1509,9 +1502,9 @@ ProcXF86VidModeGetGammaRampSize(ClientPtr client)
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.size = VidModeGetGammaRampSize(stuff->screen);
|
||||
if(client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.size, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.size);
|
||||
}
|
||||
WriteToClient(client,sizeof(xXF86VidModeGetGammaRampSizeReply),(char*)&rep);
|
||||
|
||||
@@ -1522,7 +1515,6 @@ static int
|
||||
ProcXF86VidModeGetPermissions(ClientPtr client)
|
||||
{
|
||||
xXF86VidModeGetPermissionsReply rep;
|
||||
int n;
|
||||
REQUEST(xXF86VidModeGetPermissionsReq);
|
||||
|
||||
if(stuff->screen >= screenInfo.numScreens)
|
||||
@@ -1539,9 +1531,9 @@ ProcXF86VidModeGetPermissions(ClientPtr client)
|
||||
rep.permissions |= XF86VM_WRITE_PERMISSION;
|
||||
}
|
||||
if(client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.permissions, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.permissions);
|
||||
}
|
||||
WriteToClient(client,sizeof(xXF86VidModeGetPermissionsReply),(char*)&rep);
|
||||
|
||||
@@ -1636,31 +1628,28 @@ ProcXF86VidModeDispatch(ClientPtr client)
|
||||
static int
|
||||
SProcXF86VidModeQueryVersion(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeQueryVersionReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
return ProcXF86VidModeQueryVersion(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeGetModeLine(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeGetModeLineReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->screen);
|
||||
return ProcXF86VidModeGetModeLine(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeGetAllModeLines(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeGetAllModeLinesReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->screen);
|
||||
return ProcXF86VidModeGetAllModeLines(client);
|
||||
}
|
||||
|
||||
@@ -1670,40 +1659,39 @@ SProcXF86VidModeAddModeLine(ClientPtr client)
|
||||
xXF86OldVidModeAddModeLineReq *oldstuff =
|
||||
(xXF86OldVidModeAddModeLineReq *)client->requestBuffer;
|
||||
int ver;
|
||||
register int n;
|
||||
|
||||
REQUEST(xXF86VidModeAddModeLineReq);
|
||||
ver = ClientMajorVersion(client);
|
||||
if (ver < 2) {
|
||||
swaps(&oldstuff->length, n);
|
||||
swaps(&oldstuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq);
|
||||
swapl(&oldstuff->screen, n);
|
||||
swaps(&oldstuff->hdisplay, n);
|
||||
swaps(&oldstuff->hsyncstart, n);
|
||||
swaps(&oldstuff->hsyncend, n);
|
||||
swaps(&oldstuff->htotal, n);
|
||||
swaps(&oldstuff->vdisplay, n);
|
||||
swaps(&oldstuff->vsyncstart, n);
|
||||
swaps(&oldstuff->vsyncend, n);
|
||||
swaps(&oldstuff->vtotal, n);
|
||||
swapl(&oldstuff->flags, n);
|
||||
swapl(&oldstuff->privsize, n);
|
||||
swapl(&oldstuff->screen);
|
||||
swaps(&oldstuff->hdisplay);
|
||||
swaps(&oldstuff->hsyncstart);
|
||||
swaps(&oldstuff->hsyncend);
|
||||
swaps(&oldstuff->htotal);
|
||||
swaps(&oldstuff->vdisplay);
|
||||
swaps(&oldstuff->vsyncstart);
|
||||
swaps(&oldstuff->vsyncend);
|
||||
swaps(&oldstuff->vtotal);
|
||||
swapl(&oldstuff->flags);
|
||||
swapl(&oldstuff->privsize);
|
||||
SwapRestL(oldstuff);
|
||||
} else {
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq);
|
||||
swapl(&stuff->screen, n);
|
||||
swaps(&stuff->hdisplay, n);
|
||||
swaps(&stuff->hsyncstart, n);
|
||||
swaps(&stuff->hsyncend, n);
|
||||
swaps(&stuff->htotal, n);
|
||||
swaps(&stuff->hskew, n);
|
||||
swaps(&stuff->vdisplay, n);
|
||||
swaps(&stuff->vsyncstart, n);
|
||||
swaps(&stuff->vsyncend, n);
|
||||
swaps(&stuff->vtotal, n);
|
||||
swapl(&stuff->flags, n);
|
||||
swapl(&stuff->privsize, n);
|
||||
swapl(&stuff->screen);
|
||||
swaps(&stuff->hdisplay);
|
||||
swaps(&stuff->hsyncstart);
|
||||
swaps(&stuff->hsyncend);
|
||||
swaps(&stuff->htotal);
|
||||
swaps(&stuff->hskew);
|
||||
swaps(&stuff->vdisplay);
|
||||
swaps(&stuff->vsyncstart);
|
||||
swaps(&stuff->vsyncend);
|
||||
swaps(&stuff->vtotal);
|
||||
swapl(&stuff->flags);
|
||||
swapl(&stuff->privsize);
|
||||
SwapRestL(stuff);
|
||||
}
|
||||
return ProcXF86VidModeAddModeLine(client);
|
||||
@@ -1715,40 +1703,39 @@ SProcXF86VidModeDeleteModeLine(ClientPtr client)
|
||||
xXF86OldVidModeDeleteModeLineReq *oldstuff =
|
||||
(xXF86OldVidModeDeleteModeLineReq *)client->requestBuffer;
|
||||
int ver;
|
||||
register int n;
|
||||
|
||||
REQUEST(xXF86VidModeDeleteModeLineReq);
|
||||
ver = ClientMajorVersion(client);
|
||||
if (ver < 2) {
|
||||
swaps(&oldstuff->length, n);
|
||||
swaps(&oldstuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq);
|
||||
swapl(&oldstuff->screen, n);
|
||||
swaps(&oldstuff->hdisplay, n);
|
||||
swaps(&oldstuff->hsyncstart, n);
|
||||
swaps(&oldstuff->hsyncend, n);
|
||||
swaps(&oldstuff->htotal, n);
|
||||
swaps(&oldstuff->vdisplay, n);
|
||||
swaps(&oldstuff->vsyncstart, n);
|
||||
swaps(&oldstuff->vsyncend, n);
|
||||
swaps(&oldstuff->vtotal, n);
|
||||
swapl(&oldstuff->flags, n);
|
||||
swapl(&oldstuff->privsize, n);
|
||||
swapl(&oldstuff->screen);
|
||||
swaps(&oldstuff->hdisplay);
|
||||
swaps(&oldstuff->hsyncstart);
|
||||
swaps(&oldstuff->hsyncend);
|
||||
swaps(&oldstuff->htotal);
|
||||
swaps(&oldstuff->vdisplay);
|
||||
swaps(&oldstuff->vsyncstart);
|
||||
swaps(&oldstuff->vsyncend);
|
||||
swaps(&oldstuff->vtotal);
|
||||
swapl(&oldstuff->flags);
|
||||
swapl(&oldstuff->privsize);
|
||||
SwapRestL(oldstuff);
|
||||
} else {
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq);
|
||||
swapl(&stuff->screen, n);
|
||||
swaps(&stuff->hdisplay, n);
|
||||
swaps(&stuff->hsyncstart, n);
|
||||
swaps(&stuff->hsyncend, n);
|
||||
swaps(&stuff->htotal, n);
|
||||
swaps(&stuff->hskew, n);
|
||||
swaps(&stuff->vdisplay, n);
|
||||
swaps(&stuff->vsyncstart, n);
|
||||
swaps(&stuff->vsyncend, n);
|
||||
swaps(&stuff->vtotal, n);
|
||||
swapl(&stuff->flags, n);
|
||||
swapl(&stuff->privsize, n);
|
||||
swapl(&stuff->screen);
|
||||
swaps(&stuff->hdisplay);
|
||||
swaps(&stuff->hsyncstart);
|
||||
swaps(&stuff->hsyncend);
|
||||
swaps(&stuff->htotal);
|
||||
swaps(&stuff->hskew);
|
||||
swaps(&stuff->vdisplay);
|
||||
swaps(&stuff->vsyncstart);
|
||||
swaps(&stuff->vsyncend);
|
||||
swaps(&stuff->vtotal);
|
||||
swapl(&stuff->flags);
|
||||
swapl(&stuff->privsize);
|
||||
SwapRestL(stuff);
|
||||
}
|
||||
return ProcXF86VidModeDeleteModeLine(client);
|
||||
@@ -1760,40 +1747,39 @@ SProcXF86VidModeModModeLine(ClientPtr client)
|
||||
xXF86OldVidModeModModeLineReq *oldstuff =
|
||||
(xXF86OldVidModeModModeLineReq *)client->requestBuffer;
|
||||
int ver;
|
||||
register int n;
|
||||
|
||||
REQUEST(xXF86VidModeModModeLineReq);
|
||||
ver = ClientMajorVersion(client);
|
||||
if (ver < 2) {
|
||||
swaps(&oldstuff->length, n);
|
||||
swaps(&oldstuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq);
|
||||
swapl(&oldstuff->screen, n);
|
||||
swaps(&oldstuff->hdisplay, n);
|
||||
swaps(&oldstuff->hsyncstart, n);
|
||||
swaps(&oldstuff->hsyncend, n);
|
||||
swaps(&oldstuff->htotal, n);
|
||||
swaps(&oldstuff->vdisplay, n);
|
||||
swaps(&oldstuff->vsyncstart, n);
|
||||
swaps(&oldstuff->vsyncend, n);
|
||||
swaps(&oldstuff->vtotal, n);
|
||||
swapl(&oldstuff->flags, n);
|
||||
swapl(&oldstuff->privsize, n);
|
||||
swapl(&oldstuff->screen);
|
||||
swaps(&oldstuff->hdisplay);
|
||||
swaps(&oldstuff->hsyncstart);
|
||||
swaps(&oldstuff->hsyncend);
|
||||
swaps(&oldstuff->htotal);
|
||||
swaps(&oldstuff->vdisplay);
|
||||
swaps(&oldstuff->vsyncstart);
|
||||
swaps(&oldstuff->vsyncend);
|
||||
swaps(&oldstuff->vtotal);
|
||||
swapl(&oldstuff->flags);
|
||||
swapl(&oldstuff->privsize);
|
||||
SwapRestL(oldstuff);
|
||||
} else {
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq);
|
||||
swapl(&stuff->screen, n);
|
||||
swaps(&stuff->hdisplay, n);
|
||||
swaps(&stuff->hsyncstart, n);
|
||||
swaps(&stuff->hsyncend, n);
|
||||
swaps(&stuff->htotal, n);
|
||||
swaps(&stuff->hskew, n);
|
||||
swaps(&stuff->vdisplay, n);
|
||||
swaps(&stuff->vsyncstart, n);
|
||||
swaps(&stuff->vsyncend, n);
|
||||
swaps(&stuff->vtotal, n);
|
||||
swapl(&stuff->flags, n);
|
||||
swapl(&stuff->privsize, n);
|
||||
swapl(&stuff->screen);
|
||||
swaps(&stuff->hdisplay);
|
||||
swaps(&stuff->hsyncstart);
|
||||
swaps(&stuff->hsyncend);
|
||||
swaps(&stuff->htotal);
|
||||
swaps(&stuff->hskew);
|
||||
swaps(&stuff->vdisplay);
|
||||
swaps(&stuff->vsyncstart);
|
||||
swaps(&stuff->vsyncend);
|
||||
swaps(&stuff->vtotal);
|
||||
swapl(&stuff->flags);
|
||||
swapl(&stuff->privsize);
|
||||
SwapRestL(stuff);
|
||||
}
|
||||
return ProcXF86VidModeModModeLine(client);
|
||||
@@ -1805,40 +1791,39 @@ SProcXF86VidModeValidateModeLine(ClientPtr client)
|
||||
xXF86OldVidModeValidateModeLineReq *oldstuff =
|
||||
(xXF86OldVidModeValidateModeLineReq *)client->requestBuffer;
|
||||
int ver;
|
||||
register int n;
|
||||
|
||||
REQUEST(xXF86VidModeValidateModeLineReq);
|
||||
ver = ClientMajorVersion(client);
|
||||
if (ver < 2) {
|
||||
swaps(&oldstuff->length, n);
|
||||
swaps(&oldstuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq);
|
||||
swapl(&oldstuff->screen, n);
|
||||
swaps(&oldstuff->hdisplay, n);
|
||||
swaps(&oldstuff->hsyncstart, n);
|
||||
swaps(&oldstuff->hsyncend, n);
|
||||
swaps(&oldstuff->htotal, n);
|
||||
swaps(&oldstuff->vdisplay, n);
|
||||
swaps(&oldstuff->vsyncstart, n);
|
||||
swaps(&oldstuff->vsyncend, n);
|
||||
swaps(&oldstuff->vtotal, n);
|
||||
swapl(&oldstuff->flags, n);
|
||||
swapl(&oldstuff->privsize, n);
|
||||
swapl(&oldstuff->screen);
|
||||
swaps(&oldstuff->hdisplay);
|
||||
swaps(&oldstuff->hsyncstart);
|
||||
swaps(&oldstuff->hsyncend);
|
||||
swaps(&oldstuff->htotal);
|
||||
swaps(&oldstuff->vdisplay);
|
||||
swaps(&oldstuff->vsyncstart);
|
||||
swaps(&oldstuff->vsyncend);
|
||||
swaps(&oldstuff->vtotal);
|
||||
swapl(&oldstuff->flags);
|
||||
swapl(&oldstuff->privsize);
|
||||
SwapRestL(oldstuff);
|
||||
} else {
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq);
|
||||
swapl(&stuff->screen, n);
|
||||
swaps(&stuff->hdisplay, n);
|
||||
swaps(&stuff->hsyncstart, n);
|
||||
swaps(&stuff->hsyncend, n);
|
||||
swaps(&stuff->htotal, n);
|
||||
swaps(&stuff->hskew, n);
|
||||
swaps(&stuff->vdisplay, n);
|
||||
swaps(&stuff->vsyncstart, n);
|
||||
swaps(&stuff->vsyncend, n);
|
||||
swaps(&stuff->vtotal, n);
|
||||
swapl(&stuff->flags, n);
|
||||
swapl(&stuff->privsize, n);
|
||||
swapl(&stuff->screen);
|
||||
swaps(&stuff->hdisplay);
|
||||
swaps(&stuff->hsyncstart);
|
||||
swaps(&stuff->hsyncend);
|
||||
swaps(&stuff->htotal);
|
||||
swaps(&stuff->hskew);
|
||||
swaps(&stuff->vdisplay);
|
||||
swaps(&stuff->vsyncstart);
|
||||
swaps(&stuff->vsyncend);
|
||||
swaps(&stuff->vtotal);
|
||||
swapl(&stuff->flags);
|
||||
swapl(&stuff->privsize);
|
||||
SwapRestL(stuff);
|
||||
}
|
||||
return ProcXF86VidModeValidateModeLine(client);
|
||||
@@ -1847,130 +1832,120 @@ SProcXF86VidModeValidateModeLine(ClientPtr client)
|
||||
static int
|
||||
SProcXF86VidModeSwitchMode(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeSwitchModeReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->zoom, n);
|
||||
swaps(&stuff->screen);
|
||||
swaps(&stuff->zoom);
|
||||
return ProcXF86VidModeSwitchMode(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeSwitchToMode(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeSwitchToModeReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeSwitchToModeReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swapl(&stuff->screen);
|
||||
return ProcXF86VidModeSwitchToMode(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeLockModeSwitch(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeLockModeSwitchReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->lock, n);
|
||||
swaps(&stuff->screen);
|
||||
swaps(&stuff->lock);
|
||||
return ProcXF86VidModeLockModeSwitch(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeGetMonitor(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeGetMonitorReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->screen);
|
||||
return ProcXF86VidModeGetMonitor(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeGetViewPort(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeGetViewPortReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->screen);
|
||||
return ProcXF86VidModeGetViewPort(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeSetViewPort(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeSetViewPortReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swapl(&stuff->x, n);
|
||||
swapl(&stuff->y, n);
|
||||
swaps(&stuff->screen);
|
||||
swapl(&stuff->x);
|
||||
swapl(&stuff->y);
|
||||
return ProcXF86VidModeSetViewPort(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeGetDotClocks(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeGetDotClocksReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->screen);
|
||||
return ProcXF86VidModeGetDotClocks(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeSetClientVersion(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeSetClientVersionReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq);
|
||||
swaps(&stuff->major, n);
|
||||
swaps(&stuff->minor, n);
|
||||
swaps(&stuff->major);
|
||||
swaps(&stuff->minor);
|
||||
return ProcXF86VidModeSetClientVersion(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeSetGamma(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeSetGammaReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swapl(&stuff->red, n);
|
||||
swapl(&stuff->green, n);
|
||||
swapl(&stuff->blue, n);
|
||||
swaps(&stuff->screen);
|
||||
swapl(&stuff->red);
|
||||
swapl(&stuff->green);
|
||||
swapl(&stuff->blue);
|
||||
return ProcXF86VidModeSetGamma(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeGetGamma(ClientPtr client)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86VidModeGetGammaReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->screen);
|
||||
return ProcXF86VidModeGetGamma(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeSetGammaRamp(ClientPtr client)
|
||||
{
|
||||
int length, n;
|
||||
int length;
|
||||
REQUEST(xXF86VidModeSetGammaRampReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq);
|
||||
swaps(&stuff->size, n);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->size);
|
||||
swaps(&stuff->screen);
|
||||
length = ((stuff->size + 1) & ~1) * 6;
|
||||
REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length);
|
||||
SwapRestS(stuff);
|
||||
@@ -1980,34 +1955,31 @@ SProcXF86VidModeSetGammaRamp(ClientPtr client)
|
||||
static int
|
||||
SProcXF86VidModeGetGammaRamp(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xXF86VidModeGetGammaRampReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq);
|
||||
swaps(&stuff->size, n);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->size);
|
||||
swaps(&stuff->screen);
|
||||
return ProcXF86VidModeGetGammaRamp(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeGetGammaRampSize(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xXF86VidModeGetGammaRampSizeReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->screen);
|
||||
return ProcXF86VidModeGetGammaRampSize(client);
|
||||
}
|
||||
|
||||
static int
|
||||
SProcXF86VidModeGetPermissions(ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xXF86VidModeGetPermissionsReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq);
|
||||
swaps(&stuff->screen, n);
|
||||
swaps(&stuff->screen);
|
||||
return ProcXF86VidModeGetPermissions(client);
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,6 @@ ProcXF86DRIQueryVersion(
|
||||
)
|
||||
{
|
||||
xXF86DRIQueryVersionReply rep;
|
||||
register int n;
|
||||
|
||||
REQUEST_SIZE_MATCH(xXF86DRIQueryVersionReq);
|
||||
rep.type = X_Reply;
|
||||
@@ -96,11 +95,11 @@ ProcXF86DRIQueryVersion(
|
||||
rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION;
|
||||
rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.majorVersion, n);
|
||||
swaps(&rep.minorVersion, n);
|
||||
swapl(&rep.patchVersion, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.majorVersion);
|
||||
swaps(&rep.minorVersion);
|
||||
swapl(&rep.patchVersion);
|
||||
}
|
||||
WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -113,7 +112,6 @@ ProcXF86DRIQueryDirectRenderingCapable(
|
||||
{
|
||||
xXF86DRIQueryDirectRenderingCapableReply rep;
|
||||
Bool isCapable;
|
||||
register int n;
|
||||
|
||||
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
||||
REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
|
||||
@@ -136,8 +134,8 @@ ProcXF86DRIQueryDirectRenderingCapable(
|
||||
rep.isCapable = 0;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
}
|
||||
|
||||
WriteToClient(client,
|
||||
@@ -595,9 +593,8 @@ SProcXF86DRIQueryVersion(
|
||||
register ClientPtr client
|
||||
)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86DRIQueryVersionReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
return ProcXF86DRIQueryVersion(client);
|
||||
}
|
||||
|
||||
@@ -606,10 +603,9 @@ SProcXF86DRIQueryDirectRenderingCapable(
|
||||
register ClientPtr client
|
||||
)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
|
||||
swaps(&stuff->length, n);
|
||||
swapl(&stuff->screen, n);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->screen);
|
||||
return ProcXF86DRIQueryDirectRenderingCapable(client);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,10 +71,9 @@ ProcDRI2QueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDRI2QueryVersionReq);
|
||||
xDRI2QueryVersionReply rep;
|
||||
int n;
|
||||
|
||||
if (client->swapped)
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
|
||||
REQUEST_SIZE_MATCH(xDRI2QueryVersionReq);
|
||||
rep.type = X_Reply;
|
||||
@@ -84,10 +83,10 @@ ProcDRI2QueryVersion(ClientPtr client)
|
||||
rep.minorVersion = dri2_minor;
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swapl(&rep.majorVersion, n);
|
||||
swapl(&rep.minorVersion, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.majorVersion);
|
||||
swapl(&rep.minorVersion);
|
||||
}
|
||||
|
||||
WriteToClient(client, sizeof(xDRI2QueryVersionReply), &rep);
|
||||
@@ -585,16 +584,15 @@ SProcDRI2Connect(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDRI2ConnectReq);
|
||||
xDRI2ConnectReply rep;
|
||||
int n;
|
||||
|
||||
/* 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)
|
||||
return BadLength;
|
||||
|
||||
rep.sequenceNumber = client->sequence;
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
rep.length = 0;
|
||||
rep.driverNameLength = 0;
|
||||
rep.deviceNameLength = 0;
|
||||
|
||||
@@ -162,9 +162,9 @@ void
|
||||
dump_code(xf86Int10InfoPtr pInt)
|
||||
{
|
||||
int i;
|
||||
unsigned long lina = SEG_ADR((CARD32), X86_CS, IP);
|
||||
CARD32 lina = SEG_ADR((CARD32), X86_CS, IP);
|
||||
|
||||
xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3, "code at 0x%8.8lx:\n", lina);
|
||||
xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3, "code at 0x%8.8" PRIx32 ":\n", lina);
|
||||
for (i=0; i<0x10; i++)
|
||||
xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, lina + i));
|
||||
xf86ErrorFVerb(3, "\n");
|
||||
@@ -220,7 +220,7 @@ port_rep_inb(xf86Int10InfoPtr pInt,
|
||||
register int inc = d_f ? -1 : 1;
|
||||
CARD32 dst = base;
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" rep_insb(%#x) %ld bytes at %8.8lx %s\n",
|
||||
ErrorF(" rep_insb(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n",
|
||||
port, count, base, d_f ? "up" : "down");
|
||||
while (count--) {
|
||||
MEM_WB(pInt, dst, x_inb(port));
|
||||
@@ -236,7 +236,7 @@ port_rep_inw(xf86Int10InfoPtr pInt,
|
||||
register int inc = d_f ? -2 : 2;
|
||||
CARD32 dst = base;
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" rep_insw(%#x) %ld bytes at %8.8lx %s\n",
|
||||
ErrorF(" rep_insw(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n",
|
||||
port, count, base, d_f ? "up" : "down");
|
||||
while (count--) {
|
||||
MEM_WW(pInt, dst, x_inw(port));
|
||||
@@ -252,7 +252,7 @@ port_rep_inl(xf86Int10InfoPtr pInt,
|
||||
register int inc = d_f ? -4 : 4;
|
||||
CARD32 dst = base;
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" rep_insl(%#x) %ld bytes at %8.8lx %s\n",
|
||||
ErrorF(" rep_insl(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n",
|
||||
port, count, base, d_f ? "up" : "down");
|
||||
while (count--) {
|
||||
MEM_WL(pInt, dst, x_inl(port));
|
||||
@@ -268,7 +268,7 @@ port_rep_outb(xf86Int10InfoPtr pInt,
|
||||
register int inc = d_f ? -1 : 1;
|
||||
CARD32 dst = base;
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" rep_outb(%#x) %ld bytes at %8.8lx %s\n",
|
||||
ErrorF(" rep_outb(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n",
|
||||
port, count, base, d_f ? "up" : "down");
|
||||
while (count--) {
|
||||
x_outb(port, MEM_RB(pInt, dst));
|
||||
@@ -284,7 +284,7 @@ port_rep_outw(xf86Int10InfoPtr pInt,
|
||||
register int inc = d_f ? -2 : 2;
|
||||
CARD32 dst = base;
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" rep_outw(%#x) %ld bytes at %8.8lx %s\n",
|
||||
ErrorF(" rep_outw(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n",
|
||||
port, count, base, d_f ? "up" : "down");
|
||||
while (count--) {
|
||||
x_outw(port, MEM_RW(pInt, dst));
|
||||
@@ -300,7 +300,7 @@ port_rep_outl(xf86Int10InfoPtr pInt,
|
||||
register int inc = d_f ? -4 : 4;
|
||||
CARD32 dst = base;
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" rep_outl(%#x) %ld bytes at %8.8lx %s\n",
|
||||
ErrorF(" rep_outl(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n",
|
||||
port, count, base, d_f ? "up" : "down");
|
||||
while (count--) {
|
||||
x_outl(port, MEM_RL(pInt, dst));
|
||||
@@ -410,7 +410,7 @@ x_inl(CARD16 port)
|
||||
if (!pciCfg1in(port, &val)) {
|
||||
val = inl(Int10Current->ioBase + port);
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" inl(%#x) = %8.8lx\n", port, val);
|
||||
ErrorF(" inl(%#x) = %8.8" PRIx32 "\n", port, val);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
@@ -420,7 +420,7 @@ x_outl(CARD16 port, CARD32 val)
|
||||
{
|
||||
if (!pciCfg1out(port, val)) {
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" outl(%#x, %8.8lx)\n", port, val);
|
||||
ErrorF(" outl(%#x, %8.8" PRIx32 ")\n", port, val);
|
||||
outl(Int10Current->ioBase + port, val);
|
||||
}
|
||||
}
|
||||
@@ -506,7 +506,7 @@ pciCfg1in(CARD16 addr, CARD32 *val)
|
||||
pci_device_cfg_read_u32(pci_device_for_cfg_address(PciCfg1Addr),
|
||||
(uint32_t *)val, PCI_OFFSET(PciCfg1Addr));
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" cfg_inl(%#lx) = %8.8lx\n", PciCfg1Addr, *val);
|
||||
ErrorF(" cfg_inl(%#" PRIx32 ") = %8.8" PRIx32 "\n", PciCfg1Addr, *val);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -521,7 +521,7 @@ pciCfg1out(CARD16 addr, CARD32 val)
|
||||
}
|
||||
if (addr == 0xCFC) {
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" cfg_outl(%#lx, %8.8lx)\n", PciCfg1Addr, val);
|
||||
ErrorF(" cfg_outl(%#" PRIx32 ", %8.8" PRIx32 ")\n", PciCfg1Addr, val);
|
||||
pci_device_cfg_write_u32(pci_device_for_cfg_address(PciCfg1Addr),
|
||||
val, PCI_OFFSET(PciCfg1Addr));
|
||||
return 1;
|
||||
@@ -545,7 +545,7 @@ pciCfg1inw(CARD16 addr, CARD16 *val)
|
||||
pci_device_cfg_read_u16(pci_device_for_cfg_address(PciCfg1Addr),
|
||||
val, PCI_OFFSET(PciCfg1Addr) + offset);
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" cfg_inw(%#lx) = %4.4x\n", PciCfg1Addr + offset, *val);
|
||||
ErrorF(" cfg_inw(%#" PRIx32 ") = %4.4x\n", PciCfg1Addr + offset, *val);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -566,7 +566,7 @@ pciCfg1outw(CARD16 addr, CARD16 val)
|
||||
const unsigned offset = addr - 0xCFC;
|
||||
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" cfg_outw(%#lx, %4.4x)\n", PciCfg1Addr + offset, val);
|
||||
ErrorF(" cfg_outw(%#" PRIx32 ", %4.4x)\n", PciCfg1Addr + offset, val);
|
||||
pci_device_cfg_write_u16(pci_device_for_cfg_address(PciCfg1Addr),
|
||||
val, PCI_OFFSET(PciCfg1Addr) + offset);
|
||||
return 1;
|
||||
@@ -590,7 +590,7 @@ pciCfg1inb(CARD16 addr, CARD8 *val)
|
||||
pci_device_cfg_read_u8(pci_device_for_cfg_address(PciCfg1Addr),
|
||||
val, PCI_OFFSET(PciCfg1Addr) + offset);
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" cfg_inb(%#lx) = %2.2x\n", PciCfg1Addr + offset, *val);
|
||||
ErrorF(" cfg_inb(%#" PRIx32 ") = %2.2x\n", PciCfg1Addr + offset, *val);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -611,7 +611,7 @@ pciCfg1outb(CARD16 addr, CARD8 val)
|
||||
const unsigned offset = addr - 0xCFC;
|
||||
|
||||
if (PRINT_PORT && DEBUG_IO_TRACE())
|
||||
ErrorF(" cfg_outb(%#lx, %2.2x)\n", PciCfg1Addr + offset, val);
|
||||
ErrorF(" cfg_outb(%#" PRIx32 ", %2.2x)\n", PciCfg1Addr + offset, val);
|
||||
pci_device_cfg_write_u8(pci_device_for_cfg_address(PciCfg1Addr),
|
||||
val, PCI_OFFSET(PciCfg1Addr) + offset);
|
||||
return 1;
|
||||
|
||||
@@ -147,7 +147,6 @@ ProcAppleWMQueryVersion(
|
||||
)
|
||||
{
|
||||
xAppleWMQueryVersionReply rep;
|
||||
register int n;
|
||||
|
||||
REQUEST_SIZE_MATCH(xAppleWMQueryVersionReq);
|
||||
rep.type = X_Reply;
|
||||
@@ -157,8 +156,8 @@ ProcAppleWMQueryVersion(
|
||||
rep.minorVersion = SERVER_APPLEWM_MINOR_VERSION;
|
||||
rep.patchVersion = SERVER_APPLEWM_PATCH_VERSION;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
}
|
||||
WriteToClient(client, sizeof(xAppleWMQueryVersionReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -681,9 +680,8 @@ SProcAppleWMQueryVersion(
|
||||
register ClientPtr client
|
||||
)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xAppleWMQueryVersionReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
return ProcAppleWMQueryVersion(client);
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ static int ProcPseudoramiXGetState(ClientPtr client)
|
||||
REQUEST(xPanoramiXGetStateReq);
|
||||
WindowPtr pWin;
|
||||
xPanoramiXGetStateReply rep;
|
||||
register int n, rc;
|
||||
register int rc;
|
||||
|
||||
TRACE();
|
||||
|
||||
@@ -197,9 +197,9 @@ static int ProcPseudoramiXGetState(ClientPtr client)
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.state = !noPseudoramiXExtension;
|
||||
if (client->swapped) {
|
||||
swaps (&rep.sequenceNumber, n);
|
||||
swapl (&rep.length, n);
|
||||
swaps (&rep.state, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.state);
|
||||
}
|
||||
WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
|
||||
return Success;
|
||||
@@ -212,7 +212,7 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client)
|
||||
REQUEST(xPanoramiXGetScreenCountReq);
|
||||
WindowPtr pWin;
|
||||
xPanoramiXGetScreenCountReply rep;
|
||||
register int n, rc;
|
||||
register int rc;
|
||||
|
||||
TRACE();
|
||||
|
||||
@@ -226,9 +226,9 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client)
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.ScreenCount = pseudoramiXNumScreens;
|
||||
if (client->swapped) {
|
||||
swaps (&rep.sequenceNumber, n);
|
||||
swapl (&rep.length, n);
|
||||
swaps (&rep.ScreenCount, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.ScreenCount);
|
||||
}
|
||||
WriteToClient (client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -259,10 +259,10 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client)
|
||||
rep.height = pseudoramiXScreens[stuff->screen].h;
|
||||
// was screenInfo.screens[stuff->screen]->height;
|
||||
if (client->swapped) {
|
||||
swaps (&rep.sequenceNumber, n);
|
||||
swapl (&rep.length, n);
|
||||
swaps (&rep.width, n);
|
||||
swaps (&rep.height, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.width);
|
||||
swaps(&rep.height);
|
||||
}
|
||||
WriteToClient (client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -284,10 +284,9 @@ static int ProcPseudoramiXIsActive(ClientPtr client)
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.state = !noPseudoramiXExtension;
|
||||
if (client->swapped) {
|
||||
register int n;
|
||||
swaps (&rep.sequenceNumber, n);
|
||||
swapl (&rep.length, n);
|
||||
swapl (&rep.state, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.state);
|
||||
}
|
||||
WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
|
||||
return Success;
|
||||
@@ -309,10 +308,9 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client)
|
||||
rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens;
|
||||
rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
|
||||
if (client->swapped) {
|
||||
register int n;
|
||||
swaps (&rep.sequenceNumber, n);
|
||||
swapl (&rep.length, n);
|
||||
swapl (&rep.number, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.number);
|
||||
}
|
||||
WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep);
|
||||
|
||||
@@ -327,11 +325,10 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client)
|
||||
scratch.height = pseudoramiXScreens[i].h;
|
||||
|
||||
if(client->swapped) {
|
||||
register int n;
|
||||
swaps (&scratch.x_org, n);
|
||||
swaps (&scratch.y_org, n);
|
||||
swaps (&scratch.width, n);
|
||||
swaps (&scratch.height, n);
|
||||
swaps(&scratch.x_org);
|
||||
swaps(&scratch.y_org);
|
||||
swaps(&scratch.width);
|
||||
swaps(&scratch.height);
|
||||
}
|
||||
WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch);
|
||||
}
|
||||
@@ -369,11 +366,10 @@ static int
|
||||
SProcPseudoramiXQueryVersion (ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXQueryVersionReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps(&stuff->length,n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
||||
return ProcPseudoramiXQueryVersion(client);
|
||||
}
|
||||
@@ -382,11 +378,10 @@ static int
|
||||
SProcPseudoramiXGetState(ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXGetStateReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||
return ProcPseudoramiXGetState(client);
|
||||
}
|
||||
@@ -395,11 +390,10 @@ static int
|
||||
SProcPseudoramiXGetScreenCount(ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXGetScreenCountReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||
return ProcPseudoramiXGetScreenCount(client);
|
||||
}
|
||||
@@ -408,11 +402,10 @@ static int
|
||||
SProcPseudoramiXGetScreenSize(ClientPtr client)
|
||||
{
|
||||
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||
return ProcPseudoramiXGetScreenSize(client);
|
||||
}
|
||||
@@ -422,11 +415,10 @@ static int
|
||||
SProcPseudoramiXIsActive(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXineramaIsActiveReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
||||
return ProcPseudoramiXIsActive(client);
|
||||
}
|
||||
@@ -436,11 +428,10 @@ static int
|
||||
SProcPseudoramiXQueryScreens(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXineramaQueryScreensReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
||||
return ProcPseudoramiXQueryScreens(client);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,6 @@ ProcAppleDRIQueryVersion(
|
||||
)
|
||||
{
|
||||
xAppleDRIQueryVersionReply rep;
|
||||
register int n;
|
||||
|
||||
REQUEST_SIZE_MATCH(xAppleDRIQueryVersionReq);
|
||||
rep.type = X_Reply;
|
||||
@@ -101,8 +100,8 @@ ProcAppleDRIQueryVersion(
|
||||
rep.minorVersion = SERVER_APPLEDRI_MINOR_VERSION;
|
||||
rep.patchVersion = SERVER_APPLEDRI_PATCH_VERSION;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
}
|
||||
WriteToClient(client, sizeof(xAppleDRIQueryVersionReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -372,9 +371,8 @@ SProcAppleDRIQueryVersion(
|
||||
register ClientPtr client
|
||||
)
|
||||
{
|
||||
register int n;
|
||||
REQUEST(xAppleDRIQueryVersionReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
return ProcAppleDRIQueryVersion(client);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,8 +91,8 @@ ProcWindowsWMQueryVersion(ClientPtr client)
|
||||
rep.patchVersion = SERVER_WINDOWSWM_PATCH_VERSION;
|
||||
if (client->swapped)
|
||||
{
|
||||
swaps(&rep.sequenceNumber, n);
|
||||
swapl(&rep.length, n);
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
}
|
||||
WriteToClient(client, sizeof(xWindowsWMQueryVersionReply), (char *)&rep);
|
||||
return Success;
|
||||
@@ -588,7 +588,7 @@ SProcWindowsWMQueryVersion (ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST(xWindowsWMQueryVersionReq);
|
||||
swaps(&stuff->length, n);
|
||||
swaps(&stuff->length);
|
||||
return ProcWindowsWMQueryVersion(client);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user