diff options
Diffstat (limited to 'Xext/xcmisc.c')
-rw-r--r-- | Xext/xcmisc.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c index 4977fdf88..1d3b416db 100644 --- a/Xext/xcmisc.c +++ b/Xext/xcmisc.c @@ -26,28 +26,44 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/programs/Xserver/Xext/xcmisc.c,v 3.5 2001/12/14 19:58:51 dawes Exp $ */ +#define NEED_EVENTS +#define NEED_REPLIES #include "X.h" #include "Xproto.h" #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" +#include "swaprep.h" #include "xcmiscstr.h" static unsigned char XCMiscCode; -static int ProcXCMiscDispatch(), SProcXCMiscDispatch(); -static void XCMiscResetProc(); -extern void Swap32Write(); /* XXX should be in header file */ + +static void XCMiscResetProc( +#if NeedFunctionPrototypes + ExtensionEntry * /* extEntry */ +#endif +); + +static DISPATCH_PROC(ProcXCMiscDispatch); +static DISPATCH_PROC(ProcXCMiscGetVersion); +static DISPATCH_PROC(ProcXCMiscGetXIDList); +static DISPATCH_PROC(ProcXCMiscGetXIDRange); +static DISPATCH_PROC(SProcXCMiscDispatch); +static DISPATCH_PROC(SProcXCMiscGetVersion); +static DISPATCH_PROC(SProcXCMiscGetXIDList); +static DISPATCH_PROC(SProcXCMiscGetXIDRange); void XCMiscExtensionInit() { - ExtensionEntry *extEntry, *AddExtension(); + ExtensionEntry *extEntry; - if (extEntry = AddExtension(XCMiscExtensionName, 0, 0, + if ((extEntry = AddExtension(XCMiscExtensionName, 0, 0, ProcXCMiscDispatch, SProcXCMiscDispatch, - XCMiscResetProc, StandardMinorOpcode)) + XCMiscResetProc, StandardMinorOpcode)) != 0) XCMiscCode = (unsigned char)extEntry->base; DeclareExtensionSecurity(XCMiscExtensionName, TRUE); } @@ -63,7 +79,6 @@ static int ProcXCMiscGetVersion(client) register ClientPtr client; { - REQUEST(xXCMiscGetVersionReq); xXCMiscGetVersionReply rep; register int n; @@ -86,7 +101,6 @@ static int ProcXCMiscGetXIDRange(client) register ClientPtr client; { - REQUEST(xXCMiscGetXIDRangeReq); xXCMiscGetXIDRangeReply rep; register int n; XID min_id, max_id; @@ -137,7 +151,7 @@ ProcXCMiscGetXIDList(client) WriteToClient(client, sizeof(xXCMiscGetXIDListReply), (char *)&rep); if (count) { - client->pSwapReplyFunc = Swap32Write; + client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, count * sizeof(XID), pids); } DEALLOCATE_LOCAL(pids); |