Remove now-unused macro definitions from dix.h.

This commit is contained in:
Eamon Walsh 2006-12-14 19:31:58 -05:00 committed by Eamon Walsh
parent 00f0705b3b
commit 9e32bf98bc

View File

@ -81,107 +81,6 @@ SOFTWARE.
return(BadIDChoice);\
}
/* XXX if you are using this macro, you are probably not generating Match
* errors where appropriate */
#define LOOKUP_DRAWABLE(did, client)\
((client->lastDrawableID == did) ? \
client->lastDrawable : (DrawablePtr)LookupDrawable(did, client))
#ifdef XACE
#define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\
{\
pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
RC_DRAWABLE, mode);\
if (!pDraw) \
{\
client->errorValue = did; \
return BadDrawable;\
}\
if (pDraw->type == UNDRAWABLE_WINDOW)\
return BadMatch;\
}
#define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\
{\
pDraw = (DrawablePtr) SecurityLookupIDByClass(client, did, \
RC_DRAWABLE, mode);\
if (!pDraw) \
{\
client->errorValue = did; \
return BadDrawable;\
}\
}
#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
pGC = (GC *) SecurityLookupIDByType(client, rid, RT_GC, mode);\
if (!pGC)\
{\
client->errorValue = rid;\
return (BadGC);\
}
#define VERIFY_DRAWABLE(pDraw, did, client)\
SECURITY_VERIFY_DRAWABLE(pDraw, did, client, DixUnknownAccess)
#define VERIFY_GEOMETRABLE(pDraw, did, client)\
SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, DixUnknownAccess)
#define VERIFY_GC(pGC, rid, client)\
SECURITY_VERIFY_GC(pGC, rid, client, DixUnknownAccess)
#else /* not XACE */
#define VERIFY_DRAWABLE(pDraw, did, client)\
if (client->lastDrawableID == did)\
pDraw = client->lastDrawable;\
else \
{\
pDraw = (DrawablePtr) LookupIDByClass(did, RC_DRAWABLE);\
if (!pDraw) \
{\
client->errorValue = did; \
return BadDrawable;\
}\
if (pDraw->type == UNDRAWABLE_WINDOW)\
return BadMatch;\
}
#define VERIFY_GEOMETRABLE(pDraw, did, client)\
if (client->lastDrawableID == did)\
pDraw = client->lastDrawable;\
else \
{\
pDraw = (DrawablePtr) LookupIDByClass(did, RC_DRAWABLE);\
if (!pDraw) \
{\
client->errorValue = did; \
return BadDrawable;\
}\
}
#define VERIFY_GC(pGC, rid, client)\
if (client->lastGCID == rid)\
pGC = client->lastGC;\
else\
pGC = (GC *)LookupIDByType(rid, RT_GC);\
if (!pGC)\
{\
client->errorValue = rid;\
return (BadGC);\
}
#define SECURITY_VERIFY_DRAWABLE(pDraw, did, client, mode)\
VERIFY_DRAWABLE(pDraw, did, client)
#define SECURITY_VERIFY_GEOMETRABLE(pDraw, did, client, mode)\
VERIFY_GEOMETRABLE(pDraw, did, client)
#define SECURITY_VERIFY_GC(pGC, rid, client, mode)\
VERIFY_GC(pGC, rid, client)
#endif /* XACE */
/*
* We think that most hardware implementations of DBE will want
* LookupID*(dbe_back_buffer_id) to return the window structure that the