summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2006-12-15 18:27:16 -0500
committerEamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil>2006-12-15 18:27:16 -0500
commit012807356883128fde58bb2d4f91dd356d6418fc (patch)
tree81baa642f899b02c58f82965dc7dc4b60a5e6185 /dix
parentab1d5b0c31a1cfce95ab6b1d06f209f2c44e19ac (diff)
Add loud warnings to deprecated lookup functions.
Hopefully this will alert external driver maintainers.
Diffstat (limited to 'dix')
-rw-r--r--dix/dixutils.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 2859b96e9..084d2e4c5 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -281,39 +281,53 @@ dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
* These are deprecated compatibility functions and will be removed soon!
* Please use the new dixLookup*() functions above.
*/
-_X_EXPORT WindowPtr
+_X_EXPORT _X_DEPRECATED WindowPtr
SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode)
{
WindowPtr pWin;
int i = dixLookupWindow(&pWin, id, client, access_mode);
+ static int warn = 1;
+ if (warn-- > 0)
+ ErrorF("Warning: LookupWindow()/SecurityLookupWindow() "
+ "are deprecated. Please convert your driver/module "
+ "to use dixLookupWindow().\n");
return (i == Success) ? pWin : NULL;
}
-_X_EXPORT WindowPtr
+_X_EXPORT _X_DEPRECATED WindowPtr
LookupWindow(XID id, ClientPtr client)
{
return SecurityLookupWindow(id, client, DixUnknownAccess);
}
-_X_EXPORT pointer
+_X_EXPORT _X_DEPRECATED pointer
SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode)
{
DrawablePtr pDraw;
int i = dixLookupDrawable(&pDraw, id, client, M_DRAWABLE, access_mode);
+ static int warn = 1;
+ if (warn-- > 0)
+ ErrorF("Warning: LookupDrawable()/SecurityLookupDrawable() "
+ "are deprecated. Please convert your driver/module "
+ "to use dixLookupDrawable().\n");
return (i == Success) ? pDraw : NULL;
}
-_X_EXPORT pointer
+_X_EXPORT _X_DEPRECATED pointer
LookupDrawable(XID id, ClientPtr client)
{
return SecurityLookupDrawable(id, client, DixUnknownAccess);
}
-_X_EXPORT ClientPtr
+_X_EXPORT _X_DEPRECATED ClientPtr
LookupClient(XID id, ClientPtr client)
{
ClientPtr pClient;
int i = dixLookupClient(&pClient, id, client, DixUnknownAccess);
+ static int warn = 1;
+ if (warn-- > 0)
+ ErrorF("Warning: LookupClient() is deprecated. Please convert your "
+ "driver/module to use dixLookupClient().\n");
return (i == Success) ? pClient : NULL;
}