aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/randr/rrsdispatch.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-07 10:26:58 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-21 04:06:28 +0200
commite440ea768d004ca83993dfb5774daa7971d90c10 (patch)
treee3d7340c8780959619eb82273e23be08dcb78472 /nx-X11/programs/Xserver/randr/rrsdispatch.c
parent7f7c96c7c3ced441c59f4791ecc145a35dbd7286 (diff)
downloadnx-libs-e440ea768d004ca83993dfb5774daa7971d90c10.tar.gz
nx-libs-e440ea768d004ca83993dfb5774daa7971d90c10.tar.bz2
nx-libs-e440ea768d004ca83993dfb5774daa7971d90c10.zip
randr extension: Convert to Xorg coding style.
The reformatting has been achieved by applying x-indent.sh to all .c and .h files in Xserver/randr/.
Diffstat (limited to 'nx-X11/programs/Xserver/randr/rrsdispatch.c')
-rw-r--r--nx-X11/programs/Xserver/randr/rrsdispatch.c166
1 files changed, 93 insertions, 73 deletions
diff --git a/nx-X11/programs/Xserver/randr/rrsdispatch.c b/nx-X11/programs/Xserver/randr/rrsdispatch.c
index 202222785..3175340fa 100644
--- a/nx-X11/programs/Xserver/randr/rrsdispatch.c
+++ b/nx-X11/programs/Xserver/randr/rrsdispatch.c
@@ -23,12 +23,13 @@
#include "randrstr.h"
static int
-SProcRRQueryVersion (ClientPtr client)
+SProcRRQueryVersion(ClientPtr client)
{
register int n;
+
REQUEST(xRRQueryVersionReq);
- REQUEST_SIZE_MATCH(xRRQueryVersionReq);
+ REQUEST_SIZE_MATCH(xRRQueryVersionReq);
swaps(&stuff->length, n);
swapl(&stuff->majorVersion, n);
swapl(&stuff->minorVersion, n);
@@ -36,31 +37,31 @@ SProcRRQueryVersion (ClientPtr client)
}
static int
-SProcRRGetScreenInfo (ClientPtr client)
+SProcRRGetScreenInfo(ClientPtr client)
{
register int n;
+
REQUEST(xRRGetScreenInfoReq);
- REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
+ REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
swaps(&stuff->length, n);
swapl(&stuff->window, n);
return (*ProcRandrVector[stuff->randrReqType]) (client);
}
static int
-SProcRRSetScreenConfig (ClientPtr client)
+SProcRRSetScreenConfig(ClientPtr client)
{
register int n;
+
REQUEST(xRRSetScreenConfigReq);
- if (RRClientKnowsRates (client))
- {
- REQUEST_SIZE_MATCH (xRRSetScreenConfigReq);
- swaps (&stuff->rate, n);
+ if (RRClientKnowsRates(client)) {
+ REQUEST_SIZE_MATCH(xRRSetScreenConfigReq);
+ swaps(&stuff->rate, n);
}
- else
- {
- REQUEST_SIZE_MATCH (xRR1_0SetScreenConfigReq);
+ else {
+ REQUEST_SIZE_MATCH(xRR1_0SetScreenConfigReq);
}
swaps(&stuff->length, n);
@@ -72,12 +73,13 @@ SProcRRSetScreenConfig (ClientPtr client)
}
static int
-SProcRRSelectInput (ClientPtr client)
+SProcRRSelectInput(ClientPtr client)
{
register int n;
+
REQUEST(xRRSelectInputReq);
- REQUEST_SIZE_MATCH(xRRSelectInputReq);
+ REQUEST_SIZE_MATCH(xRRSelectInputReq);
swaps(&stuff->length, n);
swapl(&stuff->window, n);
swaps(&stuff->enable, n);
@@ -85,9 +87,10 @@ SProcRRSelectInput (ClientPtr client)
}
static int
-SProcRRGetScreenSizeRange (ClientPtr client)
+SProcRRGetScreenSizeRange(ClientPtr client)
{
int n;
+
REQUEST(xRRGetScreenSizeRangeReq);
REQUEST_SIZE_MATCH(xRRGetScreenSizeRangeReq);
@@ -97,9 +100,10 @@ SProcRRGetScreenSizeRange (ClientPtr client)
}
static int
-SProcRRSetScreenSize (ClientPtr client)
+SProcRRSetScreenSize(ClientPtr client)
{
int n;
+
REQUEST(xRRSetScreenSizeReq);
REQUEST_SIZE_MATCH(xRRSetScreenSizeReq);
@@ -113,9 +117,10 @@ SProcRRSetScreenSize (ClientPtr client)
}
static int
-SProcRRGetScreenResources (ClientPtr client)
+SProcRRGetScreenResources(ClientPtr client)
{
int n;
+
REQUEST(xRRGetScreenResourcesReq);
REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq);
@@ -125,9 +130,10 @@ SProcRRGetScreenResources (ClientPtr client)
}
static int
-SProcRRGetOutputInfo (ClientPtr client)
+SProcRRGetOutputInfo(ClientPtr client)
{
int n;
+
REQUEST(xRRGetOutputInfoReq);;
REQUEST_SIZE_MATCH(xRRGetOutputInfoReq);
@@ -138,9 +144,10 @@ SProcRRGetOutputInfo (ClientPtr client)
}
static int
-SProcRRListOutputProperties (ClientPtr client)
+SProcRRListOutputProperties(ClientPtr client)
{
int n;
+
REQUEST(xRRListOutputPropertiesReq);
REQUEST_SIZE_MATCH(xRRListOutputPropertiesReq);
@@ -150,9 +157,10 @@ SProcRRListOutputProperties (ClientPtr client)
}
static int
-SProcRRQueryOutputProperty (ClientPtr client)
+SProcRRQueryOutputProperty(ClientPtr client)
{
int n;
+
REQUEST(xRRQueryOutputPropertyReq);
REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq);
@@ -163,9 +171,10 @@ SProcRRQueryOutputProperty (ClientPtr client)
}
static int
-SProcRRConfigureOutputProperty (ClientPtr client)
+SProcRRConfigureOutputProperty(ClientPtr client)
{
int n;
+
REQUEST(xRRConfigureOutputPropertyReq);
swaps(&stuff->length, n);
@@ -176,37 +185,39 @@ SProcRRConfigureOutputProperty (ClientPtr client)
}
static int
-SProcRRChangeOutputProperty (ClientPtr client)
+SProcRRChangeOutputProperty(ClientPtr client)
{
int n;
+
REQUEST(xRRChangeOutputPropertyReq);
- REQUEST_AT_LEAST_SIZE (xRRChangeOutputPropertyReq);
+ REQUEST_AT_LEAST_SIZE(xRRChangeOutputPropertyReq);
swaps(&stuff->length, n);
swapl(&stuff->output, n);
swapl(&stuff->property, n);
swapl(&stuff->type, n);
swapl(&stuff->nUnits, n);
- switch(stuff->format) {
- case 8:
- break;
- case 16:
- SwapRestS(stuff);
- break;
- case 32:
- SwapRestL(stuff);
- break;
- default:
- client->errorValue = stuff->format;
- return BadValue;
+ switch (stuff->format) {
+ case 8:
+ break;
+ case 16:
+ SwapRestS(stuff);
+ break;
+ case 32:
+ SwapRestL(stuff);
+ break;
+ default:
+ client->errorValue = stuff->format;
+ return BadValue;
}
return (*ProcRandrVector[stuff->randrReqType]) (client);
}
static int
-SProcRRDeleteOutputProperty (ClientPtr client)
+SProcRRDeleteOutputProperty(ClientPtr client)
{
int n;
+
REQUEST(xRRDeleteOutputPropertyReq);
REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq);
@@ -217,9 +228,10 @@ SProcRRDeleteOutputProperty (ClientPtr client)
}
static int
-SProcRRGetOutputProperty (ClientPtr client)
+SProcRRGetOutputProperty(ClientPtr client)
{
int n;
+
REQUEST(xRRGetOutputPropertyReq);
REQUEST_SIZE_MATCH(xRRGetOutputPropertyReq);
@@ -233,10 +245,11 @@ SProcRRGetOutputProperty (ClientPtr client)
}
static int
-SProcRRCreateMode (ClientPtr client)
+SProcRRCreateMode(ClientPtr client)
{
int n;
xRRModeInfo *modeinfo;
+
REQUEST(xRRCreateModeReq);
REQUEST_AT_LEAST_SIZE(xRRCreateModeReq);
@@ -260,9 +273,10 @@ SProcRRCreateMode (ClientPtr client)
}
static int
-SProcRRDestroyMode (ClientPtr client)
+SProcRRDestroyMode(ClientPtr client)
{
int n;
+
REQUEST(xRRDestroyModeReq);
REQUEST_SIZE_MATCH(xRRDestroyModeReq);
@@ -272,9 +286,10 @@ SProcRRDestroyMode (ClientPtr client)
}
static int
-SProcRRAddOutputMode (ClientPtr client)
+SProcRRAddOutputMode(ClientPtr client)
{
int n;
+
REQUEST(xRRAddOutputModeReq);
REQUEST_SIZE_MATCH(xRRAddOutputModeReq);
@@ -285,9 +300,10 @@ SProcRRAddOutputMode (ClientPtr client)
}
static int
-SProcRRDeleteOutputMode (ClientPtr client)
+SProcRRDeleteOutputMode(ClientPtr client)
{
int n;
+
REQUEST(xRRDeleteOutputModeReq);
REQUEST_SIZE_MATCH(xRRDeleteOutputModeReq);
@@ -298,9 +314,10 @@ SProcRRDeleteOutputMode (ClientPtr client)
}
static int
-SProcRRGetCrtcInfo (ClientPtr client)
+SProcRRGetCrtcInfo(ClientPtr client)
{
int n;
+
REQUEST(xRRGetCrtcInfoReq);
REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq);
@@ -311,9 +328,10 @@ SProcRRGetCrtcInfo (ClientPtr client)
}
static int
-SProcRRSetCrtcConfig (ClientPtr client)
+SProcRRSetCrtcConfig(ClientPtr client)
{
int n;
+
REQUEST(xRRSetCrtcConfigReq);
REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq);
@@ -330,9 +348,10 @@ SProcRRSetCrtcConfig (ClientPtr client)
}
static int
-SProcRRGetCrtcGammaSize (ClientPtr client)
+SProcRRGetCrtcGammaSize(ClientPtr client)
{
int n;
+
REQUEST(xRRGetCrtcGammaSizeReq);
REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq);
@@ -342,9 +361,10 @@ SProcRRGetCrtcGammaSize (ClientPtr client)
}
static int
-SProcRRGetCrtcGamma (ClientPtr client)
+SProcRRGetCrtcGamma(ClientPtr client)
{
int n;
+
REQUEST(xRRGetCrtcGammaReq);
REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq);
@@ -354,9 +374,10 @@ SProcRRGetCrtcGamma (ClientPtr client)
}
static int
-SProcRRSetCrtcGamma (ClientPtr client)
+SProcRRSetCrtcGamma(ClientPtr client)
{
int n;
+
REQUEST(xRRSetCrtcGammaReq);
REQUEST_AT_LEAST_SIZE(xRRSetCrtcGammaReq);
@@ -367,35 +388,34 @@ SProcRRSetCrtcGamma (ClientPtr client)
return (*ProcRandrVector[stuff->randrReqType]) (client);
}
-int (*SProcRandrVector[RRNumberRequests])(ClientPtr) = {
- SProcRRQueryVersion, /* 0 */
+int (*SProcRandrVector[RRNumberRequests]) (ClientPtr) = {
+ SProcRRQueryVersion, /* 0 */
/* we skip 1 to make old clients fail pretty immediately */
- NULL, /* 1 SProcRandrOldGetScreenInfo */
+ NULL, /* 1 SProcRandrOldGetScreenInfo */
/* V1.0 apps share the same set screen config request id */
- SProcRRSetScreenConfig, /* 2 */
- NULL, /* 3 SProcRandrOldScreenChangeSelectInput */
+ SProcRRSetScreenConfig, /* 2 */
+ NULL, /* 3 SProcRandrOldScreenChangeSelectInput */
/* 3 used to be ScreenChangeSelectInput; deprecated */
- SProcRRSelectInput, /* 4 */
- SProcRRGetScreenInfo, /* 5 */
+ SProcRRSelectInput, /* 4 */
+ SProcRRGetScreenInfo, /* 5 */
/* V1.2 additions */
- SProcRRGetScreenSizeRange, /* 6 */
- SProcRRSetScreenSize, /* 7 */
- SProcRRGetScreenResources, /* 8 */
- SProcRRGetOutputInfo, /* 9 */
- SProcRRListOutputProperties,/* 10 */
- SProcRRQueryOutputProperty, /* 11 */
- SProcRRConfigureOutputProperty, /* 12 */
- SProcRRChangeOutputProperty,/* 13 */
- SProcRRDeleteOutputProperty,/* 14 */
- SProcRRGetOutputProperty, /* 15 */
- SProcRRCreateMode, /* 16 */
- SProcRRDestroyMode, /* 17 */
- SProcRRAddOutputMode, /* 18 */
- SProcRRDeleteOutputMode, /* 19 */
- SProcRRGetCrtcInfo, /* 20 */
- SProcRRSetCrtcConfig, /* 21 */
- SProcRRGetCrtcGammaSize, /* 22 */
- SProcRRGetCrtcGamma, /* 23 */
- SProcRRSetCrtcGamma, /* 24 */
+ SProcRRGetScreenSizeRange, /* 6 */
+ SProcRRSetScreenSize, /* 7 */
+ SProcRRGetScreenResources, /* 8 */
+ SProcRRGetOutputInfo, /* 9 */
+ SProcRRListOutputProperties, /* 10 */
+ SProcRRQueryOutputProperty, /* 11 */
+ SProcRRConfigureOutputProperty, /* 12 */
+ SProcRRChangeOutputProperty, /* 13 */
+ SProcRRDeleteOutputProperty, /* 14 */
+ SProcRRGetOutputProperty, /* 15 */
+ SProcRRCreateMode, /* 16 */
+ SProcRRDestroyMode, /* 17 */
+ SProcRRAddOutputMode, /* 18 */
+ SProcRRDeleteOutputMode, /* 19 */
+ SProcRRGetCrtcInfo, /* 20 */
+ SProcRRSetCrtcConfig, /* 21 */
+ SProcRRGetCrtcGammaSize, /* 22 */
+ SProcRRGetCrtcGamma, /* 23 */
+ SProcRRSetCrtcGamma, /* 24 */
};
-