From 1254cc399c53eadcc32eeabf69990ed2526c7ae0 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 21:43:06 -0400 Subject: [PATCH] registry: Register Fontcache extension protocol names. --- Xext/fontcache.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/Xext/fontcache.c b/Xext/fontcache.c index c54340b61..9fae2d70b 100644 --- a/Xext/fontcache.c +++ b/Xext/fontcache.c @@ -42,6 +42,7 @@ #include "scrnintstr.h" #include "inputstr.h" #include "servermd.h" +#include "registry.h" #define _FONTCACHE_SERVER_ #include #include @@ -67,28 +68,34 @@ static DISPATCH_PROC(SProcFontCacheGetCacheStatistics); static DISPATCH_PROC(SProcFontCacheQueryVersion); static DISPATCH_PROC(SProcFontCacheChangeCacheSettings); -#if 0 -static unsigned char FontCacheReqCode = 0; -#endif - void FontCacheExtensionInit(INITARGS) { ExtensionEntry* extEntry; - if ( + if (! (extEntry = AddExtension(FONTCACHENAME, FontCacheNumberEvents, FontCacheNumberErrors, ProcFontCacheDispatch, SProcFontCacheDispatch, FontCacheResetProc, - StandardMinorOpcode))) { -#if 0 - FontCacheReqCode = (unsigned char)extEntry->base; -#endif - miscErrorBase = extEntry->errorBase; - } + StandardMinorOpcode))) + return; + + RegisterRequestName(extEntry->base, X_FontCacheQueryVersion, + FONTCACHENAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_FontCacheGetCacheSettings, + FONTCACHENAME ":GetCacheSettings"); + RegisterRequestName(extEntry->base, X_FontCacheChangeCacheSettings, + FONTCACHENAME ":ChangeCacheSettings"); + RegisterRequestName(extEntry->base, X_FontCacheGetCacheStatistics, + FONTCACHENAME ":GetCacheStatistics"); + + RegisterErrorName(extEntry->errorBase + FontCacheBadProtocol, + FONTCACHENAME ":BadProtocol"); + RegisterErrorName(extEntry->errorBase + FontCacheCannotAllocMemory, + FONTCACHENAME ":CannotAllocMemory"); } /*ARGSUSED*/