aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/deprecated.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-02 19:53:35 +0000
committermarha <marha@users.sourceforge.net>2009-09-02 19:53:35 +0000
commit6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (patch)
treea49e113cbab862b959559a047afef689df50e492 /xorg-server/dix/deprecated.c
parent78b8aacf420184834a24f11d138b88c2f3ed09d1 (diff)
downloadvcxsrv-6f25a23db1df27e992c34f6fd4c82e83c44fc2e2.tar.gz
vcxsrv-6f25a23db1df27e992c34f6fd4c82e83c44fc2e2.tar.bz2
vcxsrv-6f25a23db1df27e992c34f6fd4c82e83c44fc2e2.zip
Switched to xorg-server-1.6.3.901.tar.gz
Diffstat (limited to 'xorg-server/dix/deprecated.c')
-rw-r--r--xorg-server/dix/deprecated.c34
1 files changed, 26 insertions, 8 deletions
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 */