1
/* $Xorg: bigreq.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
4
Copyright 1992, 1998 The Open Group
6
Permission to use, copy, modify, distribute, and sell this software and its
7
documentation for any purpose is hereby granted without fee, provided that
8
the above copyright notice appear in all copies and that both that
9
copyright notice and this permission notice appear in supporting
12
The above copyright notice and this permission notice shall be included
13
in all copies or substantial portions of the Software.
15
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
19
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21
OTHER DEALINGS IN THE SOFTWARE.
23
Except as contained in this notice, the name of The Open Group shall
24
not be used in advertising or otherwise to promote the sale, use or
25
other dealings in this Software without prior written authorization
29
/* $XFree86: xc/programs/Xserver/Xext/bigreq.c,v 3.8 2003/10/28 23:08:43 tsi Exp $ */
32
#ifdef HAVE_DIX_CONFIG_H
33
#include <dix-config.h>
37
#include <X11/Xproto.h>
40
#include "dixstruct.h"
41
#include "extnsionst.h"
42
#include <X11/extensions/bigreqstr.h>
47
static unsigned char XBigReqCode;
50
static void BigReqResetProc(
51
ExtensionEntry * /* extEntry */
54
static DISPATCH_PROC(ProcBigReqDispatch);
57
BigReqExtensionInit(INITARGS)
60
ExtensionEntry *extEntry;
62
if ((extEntry = AddExtension(XBigReqExtensionName, 0, 0,
63
ProcBigReqDispatch, ProcBigReqDispatch,
64
BigReqResetProc, StandardMinorOpcode)) != 0)
65
XBigReqCode = (unsigned char)extEntry->base;
67
(void) AddExtension(XBigReqExtensionName, 0, 0,
68
ProcBigReqDispatch, ProcBigReqDispatch,
69
BigReqResetProc, StandardMinorOpcode);
72
DeclareExtensionSecurity(XBigReqExtensionName, TRUE);
77
BigReqResetProc (extEntry)
78
ExtensionEntry *extEntry;
83
ProcBigReqDispatch (client)
84
register ClientPtr client;
86
REQUEST(xBigReqEnableReq);
87
xBigReqEnableReply rep;
90
if (client->swapped) {
91
swaps(&stuff->length, n);
93
if (stuff->brReqType != X_BigReqEnable)
95
REQUEST_SIZE_MATCH(xBigReqEnableReq);
96
client->big_requests = TRUE;
99
rep.sequenceNumber = client->sequence;
100
rep.max_request_size = maxBigRequestSize;
101
if (client->swapped) {
102
swaps(&rep.sequenceNumber, n);
103
swapl(&rep.max_request_size, n);
105
WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep);
106
return(client->noClientException);