Commit ebea78cd authored by Tomas Carnecky's avatar Tomas Carnecky Committed by Eamon Walsh

Prepare for array-index based devPrivates.

TODO: static indices can be made just an int; some indices
can be combined.
parent ec7907f8
......@@ -40,7 +40,8 @@
int GEEventBase;
int GEErrorBase;
DevPrivateKey GEClientPrivateKey = &GEClientPrivateKey;
static int GEClientPrivateKeyIndex;
DevPrivateKey GEClientPrivateKey = &GEClientPrivateKeyIndex;
int GEEventType; /* The opcode for all GenericEvents will have. */
int RT_GECLIENT = 0;
......
......@@ -61,8 +61,10 @@ in this Software without prior written authorization from The Open Group.
static int MultibufferEventBase;
static int MultibufferErrorBase;
static DevPrivateKey MultibufferScreenPrivKey = &MultibufferScreenPrivKey;
static DevPrivateKey MultibufferWindowPrivKey = &MultibufferWindowPrivKey;
static int MultibufferScreenPrivKeyIndex;
static DevPrivateKey MultibufferScreenPrivKey = &MultibufferScreenPrivKeyIndex;
static int MultibufferWindowPrivKeyIndex;
static DevPrivateKey MultibufferWindowPrivKey = &MultibufferWindowPrivKeyIndex;
static void PerformDisplayRequest (
MultibuffersPtr * /* ppMultibuffers */,
......
......@@ -107,8 +107,10 @@ static void PanoramiXResetProc(ExtensionEntry*);
int (* SavedProcVector[256]) (ClientPtr client) = { NULL, };
static DevPrivateKey PanoramiXGCKey = &PanoramiXGCKey;
static DevPrivateKey PanoramiXScreenKey = &PanoramiXScreenKey;
static int PanoramiXGCKeyIndex;
static DevPrivateKey PanoramiXGCKey = &PanoramiXGCKeyIndex;
static int PanoramiXScreenKeyIndex;
static DevPrivateKey PanoramiXScreenKey = &PanoramiXScreenKeyIndex;
typedef struct {
DDXPointRec clipOrg;
......
......@@ -228,7 +228,8 @@ MakeScreenPrivate (
ScreenPtr /* pScreen */
);
static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKey;
static int ScreenPrivateKeyIndex;
static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKeyIndex;
#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \
dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey))
......
......@@ -50,7 +50,8 @@ static RESTYPE RTEventClient;
static CallbackListPtr SecurityValidateGroupCallback = NULL;
/* Private state record */
static DevPrivateKey stateKey = &stateKey;
static int stateKeyIndex;
static DevPrivateKey stateKey = &stateKeyIndex;
/* This is what we store as client security state */
typedef struct {
......
......@@ -139,7 +139,8 @@ static ShmDescPtr Shmsegs;
static Bool sharedPixmaps;
static ShmFuncsPtr shmFuncs[MAXSCREENS];
static DestroyPixmapProcPtr destroyPixmap[MAXSCREENS];
static DevPrivateKey shmPixmapPrivate = &shmPixmapPrivate;
static int shmPixmapPrivateIndex;
static DevPrivateKey shmPixmapPrivate = &shmPixmapPrivateIndex;
static ShmFuncs miFuncs = {NULL, NULL};
static ShmFuncs fbFuncs = {fbShmCreatePixmap, NULL};
......
......@@ -77,9 +77,11 @@ DeviceIntPtr xeviemouse = NULL;
Mask xevieMask = 0;
int xevieEventSent = 0;
int xevieKBEventSent = 0;
static DevPrivateKey xevieDevicePrivateKey = &xevieDevicePrivateKey;
static Bool xevieModifiersOn = FALSE;
static int xevieDevicePrivateKeyIndex;
static DevPrivateKey xevieDevicePrivateKey = &xevieDevicePrivateKeyIndex;
#define XEVIEINFO(dev) ((xevieDeviceInfoPtr) \
dixLookupPrivate(&(dev)->devPrivates, xevieDevicePrivateKey))
......
......@@ -62,9 +62,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* private state keys */
static DevPrivateKey subjectKey = &subjectKey;
static DevPrivateKey objectKey = &objectKey;
static DevPrivateKey dataKey = &dataKey;
static int subjectKeyIndex;
static DevPrivateKey subjectKey = &subjectKeyIndex;
static int objectKeyIndex;
static DevPrivateKey objectKey = &objectKeyIndex;
static int dataKeyIndex;
static DevPrivateKey dataKey = &dataKeyIndex;
/* subject state (clients and devices only) */
typedef struct {
......
......@@ -105,7 +105,8 @@ SOFTWARE.
#endif
#include "xvdisp.h"
static DevPrivateKey XvScreenKey = &XvScreenKey;
static int XvScreenKeyIndex;
static DevPrivateKey XvScreenKey = &XvScreenKeyIndex;
unsigned long XvExtensionGeneration = 0;
unsigned long XvScreenGeneration = 0;
unsigned long XvResourceGeneration = 0;
......
......@@ -34,7 +34,8 @@
#define DR_CLIENT_DRIVER_NAME_SIZE 48
#define DR_BUSID_SIZE 48
static DevPrivateKey XvMCScreenKey = NULL;
static int XvMCScreenKeyIndex;
static DevPrivateKey XvMCScreenKey;
unsigned long XvMCGeneration = 0;
......@@ -709,7 +710,7 @@ XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt)
{
XvMCScreenPtr pScreenPriv;
XvMCScreenKey = &XvMCScreenKey;
XvMCScreenKey = &XvMCScreenKeyIndex;
if(!(pScreenPriv = (XvMCScreenPtr)xalloc(sizeof(XvMCScreenRec))))
return BadAlloc;
......
......@@ -352,7 +352,8 @@ Mask PropagateMask[MAX_DEVICES];
*
*/
DevPrivateKey XIClientPrivateKey = &XIClientPrivateKey;
static int XIClientPrivateKeyIndex;
DevPrivateKey XIClientPrivateKey = &XIClientPrivateKeyIndex;
static XExtensionVersion thisversion = { XI_Present,
XI_2_Major,
......
......@@ -51,7 +51,8 @@
#define SERVER_COMPOSITE_MINOR 4
static CARD8 CompositeReqCode;
static DevPrivateKey CompositeClientPrivateKey = &CompositeClientPrivateKey;
static int CompositeClientPrivateKeyIndex;
static DevPrivateKey CompositeClientPrivateKey = &CompositeClientPrivateKeyIndex;
RESTYPE CompositeClientWindowType;
RESTYPE CompositeClientSubwindowsType;
RESTYPE CompositeClientOverlayType;
......
......@@ -46,9 +46,12 @@
#include "compint.h"
DevPrivateKey CompScreenPrivateKey = &CompScreenPrivateKey;
DevPrivateKey CompWindowPrivateKey = &CompWindowPrivateKey;
DevPrivateKey CompSubwindowsPrivateKey = &CompSubwindowsPrivateKey;
static int CompScreenPrivateKeyIndex;
DevPrivateKey CompScreenPrivateKey = &CompScreenPrivateKeyIndex;
static int CompWindowPrivateKeyIndex;
DevPrivateKey CompWindowPrivateKey = &CompWindowPrivateKeyIndex;
static int CompSubwindowsPrivateKeyIndex;
DevPrivateKey CompSubwindowsPrivateKey = &CompSubwindowsPrivateKeyIndex;
static Bool
......
......@@ -29,10 +29,12 @@
static unsigned char DamageReqCode;
static int DamageEventBase;
static int DamageErrorBase;
static DevPrivateKey DamageClientPrivateKey = &DamageClientPrivateKey;
static RESTYPE DamageExtType;
static RESTYPE DamageExtWinType;
static int DamageClientPrivateKeyIndex;
static DevPrivateKey DamageClientPrivateKey = &DamageClientPrivateKeyIndex;
/* Version of the damage extension supported by the server, as opposed to the
* DAMAGE_* defines from damageproto for what version the proto header
* supports.
......
......@@ -62,8 +62,10 @@
static Bool (* DbeInitFunct[MAXSCREENS])(); /* pScreen, pDbeScreenPriv */
/* These are static globals copied to DBE's screen private for use by DDX */
static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKey;
static DevPrivateKey dbeWindowPrivKey = &dbeWindowPrivKey;
static int dbeScreenPrivKeyIndex;
static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKeyIndex;
static int dbeWindowPrivKeyIndex;
static DevPrivateKey dbeWindowPrivKey = &dbeWindowPrivKeyIndex;
/* These are static globals copied to DBE's screen private for use by DDX */
static RESTYPE dbeDrawableResType;
......
......@@ -60,11 +60,14 @@
#include <stdio.h>
static DevPrivateKey miDbeWindowPrivPrivKey = &miDbeWindowPrivPrivKey;
static int miDbeWindowPrivPrivKeyIndex;
static DevPrivateKey miDbeWindowPrivPrivKey = &miDbeWindowPrivPrivKeyIndex;
static RESTYPE dbeDrawableResType;
static RESTYPE dbeWindowPrivResType;
static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKey;
static DevPrivateKey dbeWindowPrivKey = &dbeWindowPrivKey;
static int dbeScreenPrivKeyIndex;
static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKeyIndex;
static int dbeWindowPrivKeyIndex;
static DevPrivateKey dbeWindowPrivKey = &dbeWindowPrivKeyIndex;
/******************************************************************************
......
......@@ -91,9 +91,11 @@ SOFTWARE.
* This file handles input device-related stuff.
*/
DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKey;
static int CoreDevicePrivateKeyIndex;
DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKeyIndex;
/* Used to sture classes currently not in use by an MD */
DevPrivateKey UnusedClassesPrivateKey = &UnusedClassesPrivateKey;
static int UnusedClassesPrivateKeyIndex;
DevPrivateKey UnusedClassesPrivateKey = &UnusedClassesPrivateKeyIndex;
/**
......
......@@ -1504,7 +1504,8 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
}
/* Only ever used if a grab is called on an attached slave device. */
static DevPrivateKey GrabPrivateKey = &GrabPrivateKey;
static int GrabPrivateKeyIndex;
static DevPrivateKey GrabPrivateKey = &GrabPrivateKeyIndex;
typedef struct _GrabMemoryRec {
DeviceIntPtr oldmaster;
} GrabMemoryRec, *GrabMemoryPtr;
......
......@@ -154,7 +154,8 @@ _X_EXPORT int screenIsSaved = SCREEN_SAVER_OFF;
_X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
_X_EXPORT DevPrivateKey FocusPrivatesKey = &FocusPrivatesKey;
static int FocusPrivatesKeyIndex;
_X_EXPORT DevPrivateKey FocusPrivatesKey = &FocusPrivatesKeyIndex;
static Bool TileScreenSaver(int i, int kind);
......
......@@ -38,8 +38,10 @@
#include "exa.h"
#include "cw.h"
DevPrivateKey exaScreenPrivateKey = &exaScreenPrivateKey;
DevPrivateKey exaPixmapPrivateKey = &exaPixmapPrivateKey;
static int exaScreenPrivateKeyIndex;
DevPrivateKey exaScreenPrivateKey = &exaScreenPrivateKeyIndex;
static int exaPixmapPrivateKeyIndex;
DevPrivateKey exaPixmapPrivateKey = &exaPixmapPrivateKeyIndex;
static _X_INLINE void*
ExaGetPixmapAddress(PixmapPtr p)
......
......@@ -27,18 +27,23 @@
#include "fb.h"
#ifdef FB_SCREEN_PRIVATE
static DevPrivateKey fbScreenPrivateKey = &fbScreenPrivateKey;
static int fbScreenPrivateKeyIndex;
static DevPrivateKey fbScreenPrivateKey = &fbScreenPrivateKeyIndex;
DevPrivateKey fbGetScreenPrivateKey(void)
{
return fbScreenPrivateKey;
}
#endif
static DevPrivateKey fbGCPrivateKey = &fbGCPrivateKey;
static int fbGCPrivateKeyIndex;
static DevPrivateKey fbGCPrivateKey = &fbGCPrivateKeyIndex;
DevPrivateKey fbGetGCPrivateKey(void)
{
return fbGCPrivateKey;
}
static DevPrivateKey fbWinPrivateKey = &fbWinPrivateKey;
static int fbWinPrivateKeyIndex;
static DevPrivateKey fbWinPrivateKey = &fbWinPrivateKeyIndex;
DevPrivateKey fbGetWinPrivateKey(void)
{
return fbWinPrivateKey;
......
......@@ -33,7 +33,8 @@
#include "fboverlay.h"
#include "shmint.h"
static DevPrivateKey fbOverlayScreenPrivateKey = &fbOverlayScreenPrivateKey;
static int fbOverlayScreenPrivateKeyIndex;
static DevPrivateKey fbOverlayScreenPrivateKey = &fbOverlayScreenPrivateKeyIndex;
DevPrivateKey fbOverlayGetScreenPrivateKey(void)
{
......
......@@ -54,7 +54,8 @@ RESTYPE __glXSwapBarrierRes;
*/
xGLXSingleReply __glXReply;
static DevPrivateKey glxClientPrivateKey = &glxClientPrivateKey;
static int glxClientPrivateKeyIndex;
static DevPrivateKey glxClientPrivateKey = &glxClientPrivateKeyIndex;
/*
** Client that called into GLX dispatch.
......
......@@ -48,7 +48,8 @@
#include "glxutil.h"
#include "glxext.h"
static DevPrivateKey glxScreenPrivateKey = &glxScreenPrivateKey;
static int glxScreenPrivateKeyIndex;
static DevPrivateKey glxScreenPrivateKey = &glxScreenPrivateKeyIndex;
const char GLServerVersion[] = "1.4";
static const char GLServerExtensions[] =
......
......@@ -67,15 +67,22 @@ static Bool dmxSaveScreen(ScreenPtr pScreen, int what);
static unsigned long dmxGeneration;
static unsigned long *dmxCursorGeneration;
static int dmxGCPrivateKeyIndex;
DevPrivateKey dmxGCPrivateKey = &dmxGCPrivateKey; /**< Private index for GCs */
DevPrivateKey dmxWinPrivateKey = &dmxWinPrivateKey; /**< Private index for Windows */
DevPrivateKey dmxPixPrivateKey = &dmxPixPrivateKey; /**< Private index for Pixmaps */
static int dmxWinPrivateKeyIndex;
DevPrivateKey dmxWinPrivateKey = &dmxWinPrivateKeyIndex; /**< Private index for Windows */
static int dmxPixPrivateKeyIndex;
DevPrivateKey dmxPixPrivateKey = &dmxPixPrivateKeyIndex; /**< Private index for Pixmaps */
int dmxFontPrivateIndex; /**< Private index for Fonts */
DevPrivateKey dmxScreenPrivateKey = &dmxScreenPrivateKey; /**< Private index for Screens */
DevPrivateKey dmxColormapPrivateKey = &dmxColormapPrivateKey; /**< Private index for Colormaps */
static int dmxScreenPrivateKeyIndex;
DevPrivateKey dmxScreenPrivateKey = &dmxScreenPrivateKeyIndex; /**< Private index for Screens */
static int dmxColormapPrivateKeyIndex;
DevPrivateKey dmxColormapPrivateKey = &dmxColormapPrivateKeyIndex; /**< Private index for Colormaps */
#ifdef RENDER
DevPrivateKey dmxPictPrivateKey = &dmxPictPrivateKey; /**< Private index for Picts */
DevPrivateKey dmxGlyphSetPrivateKey = &dmxGlyphSetPrivateKey; /**< Private index for GlyphSets */
static int dmxPictPrivateKeyIndex;
DevPrivateKey dmxPictPrivateKey = &dmxPictPrivateKeyIndex; /**< Private index for Picts */
static int dmxGlyphSetPrivateKeyIndex;
DevPrivateKey dmxGlyphSetPrivateKey = &dmxGlyphSetPrivateKeyIndex; /**< Private index for GlyphSets */
#endif
/** Initialize the parts of screen \a idx that require access to the
......
......@@ -111,8 +111,10 @@ static Bool findWindowPairFromLocal (WindowPtr a_local,
static unsigned char DRIReqCode = 0;
static DevPrivateKey ephyrDRIWindowKey = &ephyrDRIWindowKey;
static DevPrivateKey ephyrDRIScreenKey = &ephyrDRIScreenKey;
static int ephyrDRIWindowKeyIndex;
static DevPrivateKey ephyrDRIWindowKey = &ephyrDRIWindowKeyIndex;
static int ephyrDRIScreenKeyIndex;
static DevPrivateKey ephyrDRIScreenKey = &ephyrDRIScreenKeyIndex;
#define GET_EPHYR_DRI_WINDOW_PRIV(win) ((EphyrDRIWindowPrivPtr) \
dixLookupPrivate(&(win)->devPrivates, ephyrDRIWindowKey))
......
......@@ -67,7 +67,8 @@ KdDepths kdDepths[] = {
#define KD_DEFAULT_BUTTONS 5
DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKey;
static int kdScreenPrivateKeyIndex;
DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKeyIndex;
unsigned long kdGeneration;
Bool kdVideoTest;
......
......@@ -103,9 +103,10 @@ static void KdXVClipNotify(WindowPtr pWin, int dx, int dy);
/* misc */
static Bool KdXVInitAdaptors(ScreenPtr, KdVideoAdaptorPtr*, int);
DevPrivateKey KdXVWindowKey = &KdXVWindowKey;
DevPrivateKey KdXvScreenKey = &KdXvScreenKey;
static int KdXVWindowKeyIndex;
DevPrivateKey KdXVWindowKey = &KdXVWindowKeyIndex;
static int KdXvScreenKeyIndex;
DevPrivateKey KdXvScreenKey = &KdXvScreenKeyIndex;
static unsigned long KdXVGeneration = 0;
static unsigned long PortResource = 0;
......
......@@ -50,7 +50,8 @@
#include "mi.h"
static DevPrivateKey DGAScreenKey = NULL;
static int DGAScreenKeyIndex;
static DevPrivateKey DGAScreenKey;
static int mieq_installed = 0;
static Bool DGACloseScreen(int i, ScreenPtr pScreen);
......@@ -116,7 +117,7 @@ DGAInit(
if(!modes || num <= 0)
return FALSE;
DGAScreenKey = &DGAScreenKey;
DGAScreenKey = &DGAScreenKeyIndex;
if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec))))
return FALSE;
......
......@@ -47,7 +47,8 @@
#ifdef DPMSExtension
static DevPrivateKey DPMSKey = NULL;
static int DPMSKeyIndex;
static DevPrivateKey DPMSKey;
static Bool DPMSClose(int i, ScreenPtr pScreen);
static int DPMSCount = 0;
#endif
......@@ -62,7 +63,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
pointer DPMSOpt;
MessageType enabled_from = X_INFO;
DPMSKey = &DPMSKey;
DPMSKey = &DPMSKeyIndex;
if (DPMSDisabledSwitch)
DPMSEnabled = FALSE;
......
......@@ -47,10 +47,13 @@
/* Globals that video drivers may access */
/* Index into pScreen.devPrivates */
DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKey;
static int xf86CreateRootWindowKeyIndex;
DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKeyIndex;
/* Index of ScrnInfo in pScreen.devPrivates */
_X_EXPORT DevPrivateKey xf86ScreenKey = &xf86ScreenKey;
_X_EXPORT DevPrivateKey xf86PixmapKey = &xf86PixmapKey;
static int xf86ScreenKeyIndex;
_X_EXPORT DevPrivateKey xf86ScreenKey = &xf86ScreenKeyIndex;
static int xf86PixmapKeyIndex;
_X_EXPORT DevPrivateKey xf86PixmapKey = &xf86PixmapKeyIndex;
_X_EXPORT ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */
_X_EXPORT const unsigned char byte_reversed[256] =
{
......
......@@ -256,8 +256,10 @@ static miPointerSpriteFuncRec RACSpriteFuncs = {
RACSpriteMoveCursor
};
static DevPrivateKey RACScreenKey = &RACScreenKey;
static DevPrivateKey RACGCKey = &RACGCKey;
static int RACScreenKeyIndex;
static DevPrivateKey RACScreenKey = &RACScreenKeyIndex;
static int RACGCKeyIndex;
static DevPrivateKey RACGCKey = &RACGCKeyIndex;
Bool
......
......@@ -46,7 +46,8 @@ typedef struct _xf86RandRInfo {
Rotation rotation;
} XF86RandRInfoRec, *XF86RandRInfoPtr;
static DevPrivateKey xf86RandRKey = NULL;
static int xf86RandRKeyIndex;
static DevPrivateKey xf86RandRKey;
#define XF86RANDRINFO(p) ((XF86RandRInfoPtr)dixLookupPrivate(&(p)->devPrivates, xf86RandRKey))
......@@ -423,7 +424,7 @@ xf86RandRInit (ScreenPtr pScreen)
return TRUE;
#endif
xf86RandRKey = &xf86RandRKey;
xf86RandRKey = &xf86RandRKeyIndex;
randrp = xalloc (sizeof (XF86RandRInfoRec));
if (!randrp)
......
......@@ -47,7 +47,8 @@
#include "vidmodeproc.h"
#include "xf86cmap.h"
static DevPrivateKey VidModeKey = NULL;
static int VidModeKeyIndex;
static DevPrivateKey VidModeKey;
static int VidModeCount = 0;
static Bool VidModeClose(int i, ScreenPtr pScreen);
......@@ -72,7 +73,7 @@ VidModeExtensionInit(ScreenPtr pScreen)
return FALSE;
}
VidModeKey = &VidModeKey;
VidModeKey = &VidModeKeyIndex;
if (!dixSetPrivate(&pScreen->devPrivates, VidModeKey,
xcalloc(sizeof(VidModeRec), 1))) {
......
......@@ -101,8 +101,10 @@ typedef struct {
int overscan;
} CMapColormapRec, *CMapColormapPtr;
static DevPrivateKey CMapScreenKey = NULL;
static DevPrivateKey CMapColormapKey = &CMapColormapKey;
static int CMapScreenKeyIndex;
static DevPrivateKey CMapScreenKey;
static int CMapColormapKeyIndex;
static DevPrivateKey CMapColormapKey = &CMapColormapKeyIndex;
static void CMapInstallColormap(ColormapPtr);
static void CMapStoreColors(ColormapPtr, int, xColorItem *);
......@@ -142,7 +144,7 @@ _X_EXPORT Bool xf86HandleColormaps(
if(!maxColors || !sigRGBbits || !loadPalette)
return FALSE;
CMapScreenKey = &CMapScreenKey;
CMapScreenKey = &CMapScreenKeyIndex;
elements = 1 << sigRGBbits;
......
......@@ -42,14 +42,15 @@
#define DEBUG
*/
static DevPrivateKey xf86FBManagerKey = NULL;
static int xf86FBManagerKeyIndex;
static DevPrivateKey xf86FBManagerKey;
_X_EXPORT Bool xf86RegisterOffscreenManager(
ScreenPtr pScreen,
FBManagerFuncsPtr funcs
){
xf86FBManagerKey = &xf86FBManagerKey;
xf86FBManagerKey = &xf86FBManagerKeyIndex;
dixSetPrivate(&pScreen->devPrivates, xf86FBManagerKey, funcs);
return TRUE;
......@@ -269,7 +270,8 @@ xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen)
\************************************************************/
static DevPrivateKey xf86FBScreenKey = &xf86FBScreenKey;
static int xf86FBScreenKeyIndex;
static DevPrivateKey xf86FBScreenKey = &xf86FBScreenKeyIndex;
typedef struct _FBLink {
FBArea area;
......
......@@ -602,7 +602,8 @@ xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp)
pScrn->virtualY = psdp->height;
}
static DevPrivateKey sbusPaletteKey = &sbusPaletteKey;
static sbusPaletteKeyIndex;
static DevPrivateKey sbusPaletteKey = &sbusPaletteKeyIndex;
typedef struct _sbusCmap {
sbusDevicePtr psdp;
CloseScreenProcPtr CloseScreen;
......
......@@ -110,8 +110,10 @@ static void xf86XVAdjustFrame(int index, int x, int y, int flags);
static Bool xf86XVInitAdaptors(ScreenPtr, XF86VideoAdaptorPtr*, int);
static DevPrivateKey XF86XVWindowKey = &XF86XVWindowKey;
DevPrivateKey XF86XvScreenKey;
static int XF86XVWindowKeyIndex;
static DevPrivateKey XF86XVWindowKey = &XF86XVWindowKeyIndex;
static int XF86XvScreenKeyIndex;
DevPrivateKey XF86XvScreenKey = &XF86XvScreenKeyIndex;
static unsigned long PortResource = 0;
DevPrivateKey (*XvGetScreenKeyProc)(void) = NULL;
......
......@@ -56,7 +56,8 @@ typedef struct {
XvMCAdaptorPtr dixinfo;
} xf86XvMCScreenRec, *xf86XvMCScreenPtr;
static DevPrivateKey XF86XvMCScreenKey = &XF86XvMCScreenKey;
static int XF86XvMCScreenKeyIndex;
static DevPrivateKey XF86XvMCScreenKey = &XF86XvMCScreenKeyIndex;
#define XF86XVMC_GET_PRIVATE(pScreen) (xf86XvMCScreenPtr) \
dixLookupPrivate(&(pScreen)->devPrivates, XF86XvMCScreenKey)
......
......@@ -62,7 +62,8 @@ unsigned char DGAReqCode = 0;
int DGAErrorBase;
int DGAEventBase;
static DevPrivateKey DGAClientPrivateKey = &DGAClientPrivateKey;
static int DGAClientPrivateKeyIndex;
static DevPrivateKey DGAClientPrivateKey = &DGAClientPrivateKeyIndex;
static int DGACallbackRefCount = 0;
/* This holds the client's version information */
......
......@@ -53,7 +53,8 @@ from Kaleb S. KEITHLEY
#define DEFAULT_XF86VIDMODE_VERBOSITY 3
static int VidModeErrorBase;
static DevPrivateKey VidModeClientPrivateKey = &VidModeClientPrivateKey;
static int VidModeClientPrivateKeyIndex;
static DevPrivateKey VidModeClientPrivateKey = &VidModeClientPrivateKeyIndex;
/* This holds the client's version information */
typedef struct {
......@@ -141,8 +142,9 @@ typedef struct _XF86VidModeScreenPrivate {
XF86VidModeEventPtr events;
Bool hasWindow;
} XF86VidModeScreenPrivateRec, *XF86VidModeScreenPrivatePtr;
static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKey;
static int ScreenPrivateKeyIndex;
static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKeyIndex;
#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \
dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey))
......
......@@ -79,8 +79,10 @@ extern Bool noPanoramiXExtension;
#endif
static int DRIEntPrivIndex = -1;
static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey;
static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey;
static int DRIScreenPrivKeyIndex;
static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKeyIndex;
static int DRIWindowPrivKeyIndex;
static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKeyIndex;
static unsigned long DRIGeneration = 0;
static unsigned int DRIDrawableValidationStamp = 0;
......@@ -343,7 +345,6 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
pDRIEntPriv = DRI_ENT_PRIV(pScrn);
DRIScreenPrivKey = &DRIScreenPrivKey;
if (DRIGeneration != serverGeneration)
DRIGeneration = serverGeneration;
......
......@@ -45,9 +45,12 @@
#include "xf86.h"
static DevPrivateKey dri2ScreenPrivateKey = &dri2ScreenPrivateKey;
static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKey;
static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKey;
static int dri2ScreenPrivateKeyIndex;
static DevPrivateKey dri2ScreenPrivateKey = &dri2ScreenPrivateKeyIndex;
static int dri2WindowPrivateKeyIndex;
static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKeyIndex;
static int dri2PixmapPrivateKeyIndex;
static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKeyIndex;
typedef struct _DRI2DrawablePriv {
unsigned int refCount;
......
......@@ -42,7 +42,8 @@ typedef struct _ExaXorgScreenPrivRec {
OptionInfoPtr options;
} ExaXorgScreenPrivRec, *ExaXorgScreenPrivPtr;
static DevPrivateKey exaXorgScreenPrivateKey = &exaXorgScreenPrivateKey;
static int exaXorgScreenPrivateKeyIndex;
static DevPrivateKey exaXorgScreenPrivateKey = &exaXorgScreenPrivateKeyIndex;
typedef enum {
EXAOPT_MIGRATION_HEURISTIC,
......
......@@ -63,6 +63,7 @@ static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen);
static int xf86RandR12Generation;
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
static int xf86RandR12KeyIndex;
static DevPrivateKey xf86RandR12Key;
#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \
dixLookupPrivate(&(p)->devPrivates, xf86RandR12Key))
......@@ -499,7 +500,7 @@ xf86RandR12Init (ScreenPtr pScreen)
xf86RandR12Generation = serverGeneration;
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
xf86RandR12Key = &xf86RandR12Key;
xf86RandR12Key = &xf86RandR12KeyIndex;
#else
xf86RandR12Index = AllocateScreenPrivateIndex();
#endif
......
......@@ -18,7 +18,8 @@
#include "inputstr.h"
extern InputInfo inputInfo;
DevPrivateKey xf86CursorScreenKey = &xf86CursorScreenKey;
static int xf86CursorScreenKeyIndex;
DevPrivateKey xf86CursorScreenKey = &xf86CursorScreenKeyIndex;
/* sprite functions */
......
......@@ -94,8 +94,10 @@ typedef struct {
} ShadowGCRec, *ShadowGCPtr;
static DevPrivateKey ShadowScreenKey = &ShadowScreenKey;
static DevPrivateKey ShadowGCKey = &ShadowGCKey;
static int ShadowScreenKeyIndex;
static DevPrivateKey ShadowScreenKey = &ShadowScreenKeyIndex;