diff options
author | Adam Jackson <ajax@benzedrine.nwnk.net> | 2007-03-25 17:57:54 -0400 |
---|---|---|
committer | Adam Jackson <ajax@benzedrine.nwnk.net> | 2007-03-25 17:57:54 -0400 |
commit | 4b5802ddbd45271be3cadeae0a83a6742df2515b (patch) | |
tree | 9569d18b523da979175562b113dd610752afd6ec /dix/extension.c | |
parent | 04b87d6dfae02e4ecdb5216d12c6cdafd1e8c2b4 (diff) |
General DIX static and dead code cleanup.
Diffstat (limited to 'dix/extension.c')
-rw-r--r-- | dix/extension.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/dix/extension.c b/dix/extension.c index fb4ee6b95..88dff15e2 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -66,8 +66,6 @@ SOFTWARE. #define LAST_EVENT 128 #define LAST_ERROR 255 -static ScreenProcEntry AuxillaryScreenProcs[MAXSCREENS]; - static ExtensionEntry **extensions = (ExtensionEntry **)NULL; int lastEvent = EXTENSION_EVENT_BASE; @@ -298,21 +296,8 @@ CloseDownExtensions() extensions = (ExtensionEntry **)NULL; lastEvent = EXTENSION_EVENT_BASE; lastError = FirstExtensionError; - for (i=0; i<MAXSCREENS; i++) - { - ScreenProcEntry *spentry = &AuxillaryScreenProcs[i]; - - while (spentry->num) - { - spentry->num--; - xfree(spentry->procList[spentry->num].name); - } - xfree(spentry->procList); - spentry->procList = (ProcEntryPtr)NULL; - } } - int ProcQueryExtension(ClientPtr client) { @@ -406,72 +391,6 @@ ProcListExtensions(ClientPtr client) return(client->noClientException); } - -ExtensionLookupProc -LookupProc(char *name, GCPtr pGC) -{ - int i; - ScreenProcEntry *spentry; - spentry = &AuxillaryScreenProcs[pGC->pScreen->myNum]; - if (spentry->num) - { - for (i = 0; i < spentry->num; i++) - if (strcmp(name, spentry->procList[i].name) == 0) - return(spentry->procList[i].proc); - } - return (ExtensionLookupProc)NULL; -} - -Bool -RegisterProc(char *name, GC *pGC, ExtensionLookupProc proc) -{ - return RegisterScreenProc(name, pGC->pScreen, proc); -} - -Bool -RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc) -{ - ScreenProcEntry *spentry; - ProcEntryPtr procEntry = (ProcEntryPtr)NULL; - char *newname; - int i; - - spentry = &AuxillaryScreenProcs[pScreen->myNum]; - /* first replace duplicates */ - if (spentry->num) - { - for (i = 0; i < spentry->num; i++) - if (strcmp(name, spentry->procList[i].name) == 0) - { - procEntry = &spentry->procList[i]; - break; - } - } - if (procEntry) - procEntry->proc = proc; - else - { - newname = (char *)xalloc(strlen(name)+1); - if (!newname) - return FALSE; - procEntry = (ProcEntryPtr) - xrealloc(spentry->procList, - sizeof(ProcEntryRec) * (spentry->num+1)); - if (!procEntry) - { - xfree(newname); - return FALSE; - } - spentry->procList = procEntry; - procEntry += spentry->num; - procEntry->name = newname; - strcpy(newname, name); - procEntry->proc = proc; - spentry->num++; - } - return TRUE; -} - #ifdef XSERVER_DTRACE void LoadExtensionNames(char **RequestNames) { int i; |