aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/test/xi2/protocol-xiqueryversion.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/test/xi2/protocol-xiqueryversion.c
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/test/xi2/protocol-xiqueryversion.c')
-rw-r--r--xorg-server/test/xi2/protocol-xiqueryversion.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/xorg-server/test/xi2/protocol-xiqueryversion.c b/xorg-server/test/xi2/protocol-xiqueryversion.c
index d60d16b9d..3d50fa888 100644
--- a/xorg-server/test/xi2/protocol-xiqueryversion.c
+++ b/xorg-server/test/xi2/protocol-xiqueryversion.c
@@ -41,7 +41,7 @@
#include <X11/Xproto.h>
#include <X11/extensions/XI2proto.h>
#include "inputstr.h"
-#include "extinit.h" /* for XInputExtensionInit */
+#include "extinit.h" /* for XInputExtensionInit */
#include "scrnintstr.h"
#include "xiqueryversion.h"
@@ -56,14 +56,14 @@ struct test_data {
int minor_server;
};
-static void reply_XIQueryVersion(ClientPtr client, int len, char* data, void *userdata)
+static void
+reply_XIQueryVersion(ClientPtr client, int len, char *data, void *userdata)
{
- xXIQueryVersionReply *rep = (xXIQueryVersionReply*)data;
- struct test_data *versions = (struct test_data*)userdata;
+ xXIQueryVersionReply *rep = (xXIQueryVersionReply *) data;
+ struct test_data *versions = (struct test_data *) userdata;
unsigned int sver, cver, ver;
- if (client->swapped)
- {
+ if (client->swapped) {
swapl(&rep->length);
swaps(&rep->sequenceNumber);
swaps(&rep->major_version);
@@ -88,7 +88,8 @@ static void reply_XIQueryVersion(ClientPtr client, int len, char* data, void *us
*
* Test is run normal, then for a swapped client.
*/
-static void request_XIQueryVersion(int smaj, int smin, int cmaj, int cmin, int error)
+static void
+request_XIQueryVersion(int smaj, int smin, int cmaj, int cmin, int error)
{
int rc;
struct test_data versions;
@@ -97,7 +98,7 @@ static void request_XIQueryVersion(int smaj, int smin, int cmaj, int cmin, int e
request_init(&request, XIQueryVersion);
client = init_client(request.length, &request);
- userdata = (void*)&versions;
+ userdata = (void *) &versions;
/* Change the server to support smaj.smin */
XIVersion.major_version = smaj;
@@ -126,7 +127,8 @@ static void request_XIQueryVersion(int smaj, int smin, int cmaj, int cmin, int e
/* Client version less than 2.0 must return BadValue, all other combinations
* Success */
-static void test_XIQueryVersion(void)
+static void
+test_XIQueryVersion(void)
{
reply_handler = reply_XIQueryVersion;
@@ -159,9 +161,9 @@ static void test_XIQueryVersion(void)
for (smaj = 2; smaj <= 0xFFFF; smaj++)
for (smin = 0; smin <= 0xFFFF; smin++)
for (cmin = 0; cmin <= 0xFFFF; cmin++)
- for (cmaj = 0; cmaj <= 0xFFFF; cmaj++)
- {
+ for (cmaj = 0; cmaj <= 0xFFFF; cmaj++) {
int error = (cmaj < 2) ? BadValue : Success;
+
request_XIQueryVersion(smaj, smin, cmaj, cmin, error);
}
@@ -170,7 +172,8 @@ static void test_XIQueryVersion(void)
reply_handler = NULL;
}
-int main(int argc, char** argv)
+int
+main(int argc, char **argv)
{
init_simple();