summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-10-15 21:35:12 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-10-15 21:35:12 -0400
commitf6226d3bfe1515058e2092e8662ae87825501209 (patch)
tree9d51c837cc1b18b652278d742d5b52ee7f0c7d54
parent7e182a5d89d618e20dcc77850131690733322d39 (diff)
registry: Register TOG-CUP extension protocol names.
-rw-r--r--Xext/cup.c41
1 files changed, 16 insertions, 25 deletions
diff --git a/Xext/cup.c b/Xext/cup.c
index b544a7517..4adfc6116 100644
--- a/Xext/cup.c
+++ b/Xext/cup.c
@@ -39,6 +39,7 @@ in this Software without prior written authorization from The Open Group.
#include "scrnintstr.h"
#include "servermd.h"
#include "swapreq.h"
+#include "registry.h"
#define _XCUP_SERVER_
#include <X11/extensions/Xcupstr.h>
#include <X11/Xfuncproto.h>
@@ -51,11 +52,6 @@ static int ProcDispatch(ClientPtr client);
static int SProcDispatch(ClientPtr client);
static void ResetProc(ExtensionEntry* extEntry);
-#if 0
-static unsigned char ReqCode = 0;
-static int ErrorBase;
-#endif
-
#if defined(WIN32) || defined(TESTWIN32)
#define HAVE_SPECIAL_DESKTOP_COLORS
#endif
@@ -128,30 +124,25 @@ static xColorItem citems[] = {
void
XcupExtensionInit (INITARGS)
{
-#if 0
ExtensionEntry* extEntry;
- if ((extEntry = AddExtension (XCUPNAME,
- 0,
- XcupNumberErrors,
- ProcDispatch,
- SProcDispatch,
- ResetProc,
- StandardMinorOpcode))) {
- ReqCode = (unsigned char)extEntry->base;
- ErrorBase = extEntry->errorBase;
- }
-#else
- (void) AddExtension (XCUPNAME,
- 0,
- XcupNumberErrors,
- ProcDispatch,
- SProcDispatch,
- ResetProc,
- StandardMinorOpcode);
-#endif
+ if (!(extEntry = AddExtension (XCUPNAME,
+ 0,
+ XcupNumberErrors,
+ ProcDispatch,
+ SProcDispatch,
+ ResetProc,
+ StandardMinorOpcode)))
+ return;
/* PC servers initialize the desktop colors (citems) here! */
+
+ RegisterRequestName(extEntry->base, X_XcupQueryVersion,
+ XCUPNAME ":QueryVersion");
+ RegisterRequestName(extEntry->base, X_XcupGetReservedColormapEntries,
+ XCUPNAME ":GetReservedColormapEntries");
+ RegisterRequestName(extEntry->base, X_XcupStoreColors,
+ XCUPNAME ":StoreColors");
}
/*ARGSUSED*/