[xorg-commit-diffs] xc/programs/Xserver/Xst xst_init.c, 1.1.4.1, 1.1.4.2 xst.h, 1.1.4.1, 1.1.4.2

Jay Hobson xorg-commit at pdx.freedesktop.org
Tue Apr 13 15:46:30 PDT 2004


Committed by: jhobson

Update of /cvs/xorg/xc/programs/Xserver/Xst
In directory pdx:/tmp/cvs-serv27976

Modified Files:
      Tag: XORG-RELEASE-1-STSF
	xst_init.c xst.h 
Log Message:
Added initialization of extension including number of additional new error messages
Get the offset of the error messages.


Index: xst_init.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/Xst/Attic/xst_init.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/xst_init.c	6 Apr 2004 02:41:20 -0000	1.1.4.1
+++ b/xst_init.c	13 Apr 2004 22:46:28 -0000	1.1.4.2
@@ -37,7 +37,7 @@
  *
  */
 
-/* "%W%	%E% SMI" */
+/* "@(#)xst_init.c	1.35	04/04/13 SMI" */
 
 #include "xst.h"
 #ifndef i386
@@ -111,6 +111,8 @@
 static int STgcFuncPrivIndex = -1;
 static int STGeneration      = 0;
 
+static int STErrorBase;
+
 static BOOL STCapableFlag;
 static BOOL STEnabled        = TRUE;
 extern BOOL STSupported();
@@ -157,6 +159,12 @@
     STCopyClip,
 };
 
+int
+_XSTGetErrorBase()
+{
+    return STErrorBase;
+}
+
 void
 XSTGetFB ( int screenID )
 {
@@ -1179,10 +1187,13 @@
     }
 #endif
 
-    if ((extEntry = AddExtension(STExtensionName, 0, 0,
+    if ((extEntry = AddExtension(STExtensionName, 0, ST_MAX_ERROR,
 				 ProcSTDispatch, SProcSTDispatch,
 				 STResetProc, StandardMinorOpcode)))
+    {
 	STCode = (unsigned char)extEntry->base;
+        STErrorBase = extEntry->errorBase;
+    }
 
     STscrPrivIndex = AllocateScreenPrivateIndex();
 

Index: xst.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/Xst/Attic/xst.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/xst.h	6 Apr 2004 02:41:20 -0000	1.1.4.1
+++ b/xst.h	13 Apr 2004 22:46:28 -0000	1.1.4.2
@@ -37,7 +37,7 @@
  *
  */
 
-/* "%W%	%E% SMI" */
+/* "@(#)xst.h	1.14	04/04/13 SMI" */
 
 #ifndef _XST_H
 #define _XST_H
@@ -162,7 +162,7 @@
 } STCacheDataRec, *STCacheDataPtr;
 #define STErrorToXError(a)	\
 	( a == 0 ? client->noClientException : \
-	  ( a + 20 ))
+	  ( a + _XSTGetErrorBase() ))
 
 #ifndef swapll
 /* byte swap a 64-bit value */




More information about the xorg-commit-diffs mailing list