diff options
Diffstat (limited to 'xorg-server/Xext/dpms.c')
-rw-r--r-- | xorg-server/Xext/dpms.c | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/xorg-server/Xext/dpms.c b/xorg-server/Xext/dpms.c index 5f1a35d9c..6a6039ad3 100644 --- a/xorg-server/Xext/dpms.c +++ b/xorg-server/Xext/dpms.c @@ -28,6 +28,8 @@ Equipment Corporation. #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> +#else +#define DPMSExtension #endif #include <X11/X.h> @@ -45,16 +47,15 @@ static int ProcDPMSGetVersion(ClientPtr client) { /* REQUEST(xDPMSGetVersionReq); */ - xDPMSGetVersionReply rep = { - .type = X_Reply, - .sequenceNumber = client->sequence, - .length = 0, - .majorVersion = DPMSMajorVersion, - .minorVersion = DPMSMinorVersion - }; + xDPMSGetVersionReply rep; REQUEST_SIZE_MATCH(xDPMSGetVersionReq); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.majorVersion = DPMSMajorVersion; + rep.minorVersion = DPMSMinorVersion; if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.majorVersion); @@ -68,15 +69,15 @@ static int ProcDPMSCapable(ClientPtr client) { /* REQUEST(xDPMSCapableReq); */ - xDPMSCapableReply rep = { - .type = X_Reply, - .sequenceNumber = client->sequence, - .length = 0, - .capable = DPMSCapableFlag - }; + xDPMSCapableReply rep; REQUEST_SIZE_MATCH(xDPMSCapableReq); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.capable = DPMSCapableFlag; + if (client->swapped) { swaps(&rep.sequenceNumber); } @@ -88,17 +89,17 @@ static int ProcDPMSGetTimeouts(ClientPtr client) { /* REQUEST(xDPMSGetTimeoutsReq); */ - xDPMSGetTimeoutsReply rep = { - .type = X_Reply, - .sequenceNumber = client->sequence, - .length = 0, - .standby = DPMSStandbyTime / MILLI_PER_SECOND, - .suspend = DPMSSuspendTime / MILLI_PER_SECOND, - .off = DPMSOffTime / MILLI_PER_SECOND - }; + xDPMSGetTimeoutsReply rep; REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.standby = DPMSStandbyTime / MILLI_PER_SECOND; + rep.suspend = DPMSSuspendTime / MILLI_PER_SECOND; + rep.off = DPMSOffTime / MILLI_PER_SECOND; + if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.standby); @@ -189,16 +190,16 @@ static int ProcDPMSInfo(ClientPtr client) { /* REQUEST(xDPMSInfoReq); */ - xDPMSInfoReply rep = { - .type = X_Reply, - .sequenceNumber = client->sequence, - .length = 0, - .power_level = DPMSPowerLevel, - .state = DPMSEnabled - }; + xDPMSInfoReply rep; REQUEST_SIZE_MATCH(xDPMSInfoReq); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.power_level = DPMSPowerLevel; + rep.state = DPMSEnabled; + if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.power_level); |