From f6226d3bfe1515058e2092e8662ae87825501209 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 21:35:12 -0400 Subject: [PATCH] registry: Register TOG-CUP extension protocol names. --- Xext/cup.c | 41 ++++++++++++++++------------------------- 1 file 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 #include @@ -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*/