ci: Check for DDXen to be built
[xserver.git] / Xext / bigreq.c
blob13114e326fc8a1546cc5f5ea059d53fbfeaca3b6
1 /*
3 Copyright 1992, 1998 The Open Group
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
9 documentation.
11 The above copyright notice and this permission notice shall be included
12 in all copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 OTHER DEALINGS IN THE SOFTWARE.
22 Except as contained in this notice, the name of The Open Group shall
23 not be used in advertising or otherwise to promote the sale, use or
24 other dealings in this Software without prior written authorization
25 from The Open Group.
29 #include <dix-config.h>
31 #include <X11/X.h>
32 #include <X11/Xproto.h>
33 #include <X11/extensions/bigreqsproto.h>
35 #include "dix/dix_priv.h"
37 #include "misc.h"
38 #include "os.h"
39 #include "dixstruct.h"
40 #include "extnsionst.h"
41 #include "opaque.h"
42 #include "extinit_priv.h"
44 static int
45 ProcBigReqDispatch(ClientPtr client)
47 REQUEST(xBigReqEnableReq);
48 xBigReqEnableReply rep;
50 if (client->swapped) {
51 swaps(&stuff->length);
53 if (stuff->brReqType != X_BigReqEnable)
54 return BadRequest;
55 REQUEST_SIZE_MATCH(xBigReqEnableReq);
56 client->big_requests = TRUE;
57 rep = (xBigReqEnableReply) {
58 .type = X_Reply,
59 .sequenceNumber = client->sequence,
60 .length = 0,
61 .max_request_size = maxBigRequestSize
63 if (client->swapped) {
64 swaps(&rep.sequenceNumber);
65 swapl(&rep.max_request_size);
67 WriteToClient(client, sizeof(xBigReqEnableReply), &rep);
68 return Success;
71 void
72 BigReqExtensionInit(void)
74 AddExtension(XBigReqExtensionName, 0, 0,
75 ProcBigReqDispatch, ProcBigReqDispatch,
76 NULL, StandardMinorOpcode);