summaryrefslogtreecommitdiff
path: root/Xext/xcmisc.c
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:49:22 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:49:22 +0000
commitd568221710959cf7d783e6ff0fb80fb43a231124 (patch)
tree8d6f039393294c6ffac8533639afdebe5d68bfc1 /Xext/xcmisc.c
parent9508a382f8a9f241dab097d921b6d290c1c3a776 (diff)
Diffstat (limited to 'Xext/xcmisc.c')
-rw-r--r--Xext/xcmisc.c32
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);