[PATCH 2/2] dix: remove proc tables initialization

Tiago Vignatti tiago.vignatti at nokia.com
Tue Sep 7 05:48:57 PDT 2010


Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 dix/dispatch.c |   20 ---
 dix/main.c     |    4 -
 dix/tables.c   |  508 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 492 insertions(+), 40 deletions(-)

diff --git a/dix/dispatch.c b/dix/dispatch.c
index 0e5aced..17f308c 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -238,7 +238,6 @@ long	    SmartLastPrint;
 #endif
 
 void        Dispatch(void);
-void        InitProcVectors(void);
 
 static int
 SmartScheduleClient (int *clientReady, int nready)
@@ -3387,25 +3386,6 @@ int ProcNoOperation(ClientPtr client)
     return Success;
 }
 
-void
-InitProcVectors(void)
-{
-    int i;
-    for (i = 0; i<256; i++)
-    {
-	if(!ProcVector[i])
-	{
-            ProcVector[i] = SwappedProcVector[i] = ProcBadRequest;
-	    ReplySwapVector[i] = ReplyNotSwappd;
-	}
-    }
-    for(i = LASTEvent; i < 128; i++)
-    {
-	EventSwapVector[i] = NotImplemented;
-    }
-    
-}
-
 /**********************
  * CloseDownClient
  *
diff --git a/dix/main.c b/dix/main.c
index 47a932f..692bec1 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -108,7 +108,6 @@ Equipment Corporation.
 #include "panoramiXsrv.h"
 #else
 #include "dixevents.h"		/* InitEvents() */
-#include "dispatch.h"		/* InitProcVectors() */
 #endif
 
 #ifdef DPMSExtension
@@ -118,8 +117,6 @@ Equipment Corporation.
 
 extern void Dispatch(void);
 
-extern void InitProcVectors(void);
-
 #ifdef XQUARTZ
 #include <pthread.h>
 
@@ -171,7 +168,6 @@ int main(int argc, char *argv[], char *envp[])
 	if(serverGeneration == 1)
 	{
 	    CreateWellKnownSockets();
-	    InitProcVectors();
 	    for (i=1; i<MAXCLIENTS; i++)
 		clients[i] = NullClient;
 	    serverClient = calloc(sizeof(ClientRec), 1);
diff --git a/dix/tables.c b/dix/tables.c
index 5aafb8b..5bd9ea0 100644
--- a/dix/tables.c
+++ b/dix/tables.c
@@ -192,14 +192,142 @@ int (* ProcVector[256]) (
     ProcGetPointerMapping,
     ProcSetModifierMapping,
     ProcGetModifierMapping,
-    0,					/* 120 */
-    0,
-    0,
-    0,
-    0,
-    0,					/* 125 */
-    0,
-    ProcNoOperation    
+    ProcBadRequest,				/* 120 */
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,				/* 125 */
+    ProcBadRequest,
+    ProcNoOperation,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest
 };
 
 int (* SwappedProcVector[256]) (
@@ -326,14 +454,142 @@ int (* SwappedProcVector[256]) (
     SProcSimpleReq,			/* GetPointerMapping, */
     SProcSimpleReq,			/* SetModifierMapping, */
     SProcSimpleReq,			/* GetModifierMapping, */
-    0,					/* 120 */
-    0,
-    0,
-    0,
-    0,
-    0,					/* 125 */
-    0,
-    SProcNoOperation
+    ProcBadRequest,				/* 120 */
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,				/* 125 */
+    ProcBadRequest,
+    SProcNoOperation,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest,
+    ProcBadRequest
 };
 
 EventSwapPtr EventSwapVector[128] =
@@ -373,6 +629,99 @@ EventSwapPtr EventSwapVector[128] =
     SColormapEvent,
     SClientMessageEvent,
     SMappingEvent,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented,
+    NotImplemented
 };
 
 
@@ -506,5 +855,132 @@ ReplySwapPtr ReplySwapVector[256] =
     ReplyNotSwappd,				/* 125 */
     ReplyNotSwappd,				/* 126 */
     ReplyNotSwappd,				/* NoOperation */
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
+    ReplyNotSwappd,
     ReplyNotSwappd
 };
-- 
1.7.1.226.g770c5



More information about the xorg-devel mailing list