From 6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 2 Sep 2009 19:53:35 +0000 Subject: Switched to xorg-server-1.6.3.901.tar.gz --- xorg-server/dix/deprecated.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'xorg-server/dix/deprecated.c') diff --git a/xorg-server/dix/deprecated.c b/xorg-server/dix/deprecated.c index 2bb81190c..4e20d6082 100644 --- a/xorg-server/dix/deprecated.c +++ b/xorg-server/dix/deprecated.c @@ -115,48 +115,66 @@ LookupClient(XID id, ClientPtr client) return (i == Success) ? pClient : NULL; } -/* replaced by dixLookupResource */ +/* replaced by dixLookupResourceByType */ _X_EXPORT pointer SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask access_mode) { pointer retval; - int i = dixLookupResource(&retval, id, rtype, client, access_mode); + int i = dixLookupResourceByType(&retval, id, rtype, client, access_mode); static int warn = 1; if (warn > 0 && --warn) ErrorF("Warning: LookupIDByType()/SecurityLookupIDByType() " "are deprecated. Please convert your driver/module " - "to use dixLookupResource().\n"); + "to use dixLookupResourceByType().\n"); return (i == Success) ? retval : NULL; } -/* replaced by dixLookupResource */ +/* replaced by dixLookupResourceByClass */ _X_EXPORT pointer SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask access_mode) { pointer retval; - int i = dixLookupResource(&retval, id, classes, client, access_mode); + int i = dixLookupResourceByClass(&retval, id, classes, client, access_mode); static int warn = 1; if (warn > 0 && --warn) ErrorF("Warning: LookupIDByClass()/SecurityLookupIDByClass() " "are deprecated. Please convert your driver/module " - "to use dixLookupResource().\n"); + "to use dixLookupResourceByClass().\n"); return (i == Success) ? retval : NULL; } -/* replaced by dixLookupResource */ +/* replaced by dixLookupResourceByType */ _X_EXPORT pointer LookupIDByType(XID id, RESTYPE rtype) { return SecurityLookupIDByType(NullClient, id, rtype, DixUnknownAccess); } -/* replaced by dixLookupResource */ +/* replaced by dixLookupResourceByClass */ _X_EXPORT pointer LookupIDByClass(XID id, RESTYPE classes) { return SecurityLookupIDByClass(NullClient, id, classes, DixUnknownAccess); } +/* replaced by dixLookupResourceBy{Type,Class} */ +_X_EXPORT int +dixLookupResource (pointer *result, XID id, RESTYPE rtype, + ClientPtr client, Mask mode) +{ + Bool istype = ((rtype & TypeMask) && (rtype != RC_ANY)) || (rtype == RT_NONE); + + static int warn = 1; + if (warn > 0 && --warn) + ErrorF("Warning: dixLookupResource() " + "is deprecated. Please convert your driver/module " + "to use dixLookupResourceByType/dixLookupResourceByClass().\n"); + if (istype) + return dixLookupResourceByType (result, id, rtype, client, mode); + else + return dixLookupResourceByClass (result, id, rtype, client, mode); +} + /* end deprecated functions */ -- cgit v1.2.3