aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-12-10 19:06:59 +0000
committermarha <marha@users.sourceforge.net>2010-12-10 19:06:59 +0000
commit3a20d23b48c1051e1f22295fd886cc7f643417f6 (patch)
tree5192dddd9ecf591de2e22504f7268c2935382d90 /xorg-server/dix
parent531a0d974b98074978535f086a73b6b662fa0cea (diff)
downloadvcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.tar.gz
vcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.tar.bz2
vcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.zip
xserver git update 10/12/2010
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/Xserver-dtrace.h.in188
-rw-r--r--xorg-server/dix/Xserver.d116
-rw-r--r--xorg-server/dix/deprecated.c330
-rw-r--r--xorg-server/dix/devices.c17
-rw-r--r--xorg-server/dix/dispatch.c2
-rw-r--r--xorg-server/dix/dixfonts.c4
-rw-r--r--xorg-server/dix/events.c2
-rw-r--r--xorg-server/dix/resource.c2
8 files changed, 334 insertions, 327 deletions
diff --git a/xorg-server/dix/Xserver-dtrace.h.in b/xorg-server/dix/Xserver-dtrace.h.in
index fce28362a..dc9419b0d 100644
--- a/xorg-server/dix/Xserver-dtrace.h.in
+++ b/xorg-server/dix/Xserver-dtrace.h.in
@@ -1,94 +1,94 @@
-/* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * Generated by dtrace(1M), and then modified for backwards compatibility
- * with older versions of dtrace. Used if dtrace -h fails.
- * (Since _ENABLED support was added after dtrace -h, this assumes if
- * dtrace -h fails, _ENABLED will too.)
- */
-
-#ifndef _XSERVER_DTRACE_H
-#define _XSERVER_DTRACE_H
-
-#include <unistd.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if _DTRACE_VERSION
-
-#define XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3) \
- __dtrace_Xserver___client__auth(arg0, arg1, arg2, arg3)
-#define XSERVER_CLIENT_CONNECT(arg0, arg1) \
- __dtrace_Xserver___client__connect(arg0, arg1)
-#define XSERVER_CLIENT_DISCONNECT(arg0) \
- __dtrace_Xserver___client__disconnect(arg0)
-#define XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4) \
- __dtrace_Xserver___request__done(arg0, arg1, arg2, arg3, arg4)
-#define XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4) \
- __dtrace_Xserver___request__start(arg0, arg1, arg2, arg3, arg4)
-#define XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3) \
- __dtrace_Xserver___resource__alloc(arg0, arg1, arg2, arg3)
-#define XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3) \
- __dtrace_Xserver___resource__free(arg0, arg1, arg2, arg3)
-#define XSERVER_SEND_EVENT(arg0, arg1, arg2) \
- __dtrace_Xserver___send__event(arg0, arg1, arg2)
-
-
-extern void __dtrace_Xserver___client__auth(int, string, pid_t, zoneid_t);
-extern void __dtrace_Xserver___client__connect(int, int);
-extern void __dtrace_Xserver___client__disconnect(int);
-extern void __dtrace_Xserver___request__done(string, uint8_t, uint32_t, int, int);
-extern void __dtrace_Xserver___request__start(string, uint8_t, uint16_t, int, void *);
-extern void __dtrace_Xserver___resource__alloc(uint32_t, uint32_t, void *, string);
-extern void __dtrace_Xserver___resource__free(uint32_t, uint32_t, void *, string);
-extern void __dtrace_Xserver___send__event(int, uint8_t, void *);
-
-#else
-
-#define XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3)
-#define XSERVER_CLIENT_CONNECT(arg0, arg1)
-#define XSERVER_CLIENT_DISCONNECT(arg0)
-#define XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4)
-#define XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4)
-#define XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3)
-#define XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3)
-#define XSERVER_SEND_EVENT(arg0, arg1, arg2)
-
-#endif
-
-#define XSERVER_CLIENT_AUTH_ENABLED() (1)
-#define XSERVER_CLIENT_CONNECT_ENABLED() (1)
-#define XSERVER_CLIENT_DISCONNECT_ENABLED() (1)
-#define XSERVER_REQUEST_DONE_ENABLED() (1)
-#define XSERVER_REQUEST_START_ENABLED() (1)
-#define XSERVER_RESOURCE_ALLOC_ENABLED() (1)
-#define XSERVER_RESOURCE_FREE_ENABLED() (1)
-#define XSERVER_SEND_EVENT_ENABLED() (1)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _XSERVER_DTRACE_H */
+/* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Generated by dtrace(1M), and then modified for backwards compatibility
+ * with older versions of dtrace. Used if dtrace -h fails.
+ * (Since _ENABLED support was added after dtrace -h, this assumes if
+ * dtrace -h fails, _ENABLED will too.)
+ */
+
+#ifndef _XSERVER_DTRACE_H
+#define _XSERVER_DTRACE_H
+
+#include <unistd.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if _DTRACE_VERSION
+
+#define XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3) \
+ __dtrace_Xserver___client__auth(arg0, arg1, arg2, arg3)
+#define XSERVER_CLIENT_CONNECT(arg0, arg1) \
+ __dtrace_Xserver___client__connect(arg0, arg1)
+#define XSERVER_CLIENT_DISCONNECT(arg0) \
+ __dtrace_Xserver___client__disconnect(arg0)
+#define XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4) \
+ __dtrace_Xserver___request__done(arg0, arg1, arg2, arg3, arg4)
+#define XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4) \
+ __dtrace_Xserver___request__start(arg0, arg1, arg2, arg3, arg4)
+#define XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3) \
+ __dtrace_Xserver___resource__alloc(arg0, arg1, arg2, arg3)
+#define XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3) \
+ __dtrace_Xserver___resource__free(arg0, arg1, arg2, arg3)
+#define XSERVER_SEND_EVENT(arg0, arg1, arg2) \
+ __dtrace_Xserver___send__event(arg0, arg1, arg2)
+
+
+extern void __dtrace_Xserver___client__auth(int, string, pid_t, zoneid_t);
+extern void __dtrace_Xserver___client__connect(int, int);
+extern void __dtrace_Xserver___client__disconnect(int);
+extern void __dtrace_Xserver___request__done(string, uint8_t, uint32_t, int, int);
+extern void __dtrace_Xserver___request__start(string, uint8_t, uint16_t, int, void *);
+extern void __dtrace_Xserver___resource__alloc(uint32_t, uint32_t, void *, string);
+extern void __dtrace_Xserver___resource__free(uint32_t, uint32_t, void *, string);
+extern void __dtrace_Xserver___send__event(int, uint8_t, void *);
+
+#else
+
+#define XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3)
+#define XSERVER_CLIENT_CONNECT(arg0, arg1)
+#define XSERVER_CLIENT_DISCONNECT(arg0)
+#define XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4)
+#define XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4)
+#define XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3)
+#define XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3)
+#define XSERVER_SEND_EVENT(arg0, arg1, arg2)
+
+#endif
+
+#define XSERVER_CLIENT_AUTH_ENABLED() (1)
+#define XSERVER_CLIENT_CONNECT_ENABLED() (1)
+#define XSERVER_CLIENT_DISCONNECT_ENABLED() (1)
+#define XSERVER_REQUEST_DONE_ENABLED() (1)
+#define XSERVER_REQUEST_START_ENABLED() (1)
+#define XSERVER_RESOURCE_ALLOC_ENABLED() (1)
+#define XSERVER_RESOURCE_FREE_ENABLED() (1)
+#define XSERVER_SEND_EVENT_ENABLED() (1)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _XSERVER_DTRACE_H */
diff --git a/xorg-server/dix/Xserver.d b/xorg-server/dix/Xserver.d
index 4bc0b9a84..6584ece52 100644
--- a/xorg-server/dix/Xserver.d
+++ b/xorg-server/dix/Xserver.d
@@ -1,58 +1,58 @@
-/* Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * Xserver dtrace provider definition
- */
-#ifdef __APPLE__
-#define string char *
-#define pid_t uint32_t
-#define zoneid_t uint32_t
-#else
-#include <sys/types.h>
-#endif
-
-provider Xserver {
- /* reqType, data, length, client id, request buffer */
- probe request__start(string, uint8_t, uint16_t, int, void *);
- /* reqType, data, sequence, client id, result */
- probe request__done(string, uint8_t, uint32_t, int, int);
- /* client id, client fd */
- probe client__connect(int, int);
- /* client id, client address, client pid, client zone id */
- probe client__auth(int, string, pid_t, zoneid_t);
- /* client id */
- probe client__disconnect(int);
- /* resource id, resource type, value, resource type name */
- probe resource__alloc(uint32_t, uint32_t, void *, string);
- /* resource id, resource type, value, resource type name */
- probe resource__free(uint32_t, uint32_t, void *, string);
- /* client id, event type, event* */
- probe send__event(int, uint8_t, void *);
-};
-
-#pragma D attributes Unstable/Unstable/Common provider Xserver provider
-#pragma D attributes Private/Private/Unknown provider Xserver module
-#pragma D attributes Private/Private/Unknown provider Xserver function
-#pragma D attributes Unstable/Unstable/Common provider Xserver name
-#pragma D attributes Unstable/Unstable/Common provider Xserver args
-
+/* Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Xserver dtrace provider definition
+ */
+#ifdef __APPLE__
+#define string char *
+#define pid_t uint32_t
+#define zoneid_t uint32_t
+#else
+#include <sys/types.h>
+#endif
+
+provider Xserver {
+ /* reqType, data, length, client id, request buffer */
+ probe request__start(string, uint8_t, uint16_t, int, void *);
+ /* reqType, data, sequence, client id, result */
+ probe request__done(string, uint8_t, uint32_t, int, int);
+ /* client id, client fd */
+ probe client__connect(int, int);
+ /* client id, client address, client pid, client zone id */
+ probe client__auth(int, string, pid_t, zoneid_t);
+ /* client id */
+ probe client__disconnect(int);
+ /* resource id, resource type, value, resource type name */
+ probe resource__alloc(uint32_t, uint32_t, void *, string);
+ /* resource id, resource type, value, resource type name */
+ probe resource__free(uint32_t, uint32_t, void *, string);
+ /* client id, event type, event* */
+ probe send__event(int, uint8_t, void *);
+};
+
+#pragma D attributes Unstable/Unstable/Common provider Xserver provider
+#pragma D attributes Private/Private/Unknown provider Xserver module
+#pragma D attributes Private/Private/Unknown provider Xserver function
+#pragma D attributes Unstable/Unstable/Common provider Xserver name
+#pragma D attributes Unstable/Unstable/Common provider Xserver args
+
diff --git a/xorg-server/dix/deprecated.c b/xorg-server/dix/deprecated.c
index 21d0f574d..b1f4d6c5c 100644
--- a/xorg-server/dix/deprecated.c
+++ b/xorg-server/dix/deprecated.c
@@ -1,165 +1,165 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "dix.h"
-#include "misc.h"
-#include "dixstruct.h"
-
-/*
- * These are deprecated compatibility functions and will be marked as such
- * and removed soon!
- *
- * Please use the noted replacements instead.
- */
-
-/* replaced by dixLookupWindow */
-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 && --warn)
- ErrorF("Warning: LookupWindow()/SecurityLookupWindow() "
- "are deprecated. Please convert your driver/module "
- "to use dixLookupWindow().\n");
- return (i == Success) ? pWin : NULL;
-}
-
-/* replaced by dixLookupWindow */
-WindowPtr
-LookupWindow(XID id, ClientPtr client)
-{
- return SecurityLookupWindow(id, client, DixUnknownAccess);
-}
-
-/* replaced by dixLookupDrawable */
-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 && --warn)
- ErrorF("Warning: LookupDrawable()/SecurityLookupDrawable() "
- "are deprecated. Please convert your driver/module "
- "to use dixLookupDrawable().\n");
- return (i == Success) ? pDraw : NULL;
-}
-
-/* replaced by dixLookupDrawable */
-pointer
-LookupDrawable(XID id, ClientPtr client)
-{
- return SecurityLookupDrawable(id, client, DixUnknownAccess);
-}
-
-/* replaced by dixLookupClient */
-ClientPtr
-LookupClient(XID id, ClientPtr client)
-{
- ClientPtr pClient;
- int i = dixLookupClient(&pClient, id, client, DixUnknownAccess);
- static int warn = 1;
- if (warn > 0 && --warn)
- ErrorF("Warning: LookupClient() is deprecated. Please convert your "
- "driver/module to use dixLookupClient().\n");
- return (i == Success) ? pClient : NULL;
-}
-
-/* replaced by dixLookupResourceByType */
-pointer
-SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype,
- Mask access_mode)
-{
- pointer retval;
- 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 dixLookupResourceByType().\n");
- return (i == Success) ? retval : NULL;
-}
-
-pointer
-SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes,
- Mask access_mode)
-{
- pointer retval;
- 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 dixLookupResourceByClass().\n");
- return (i == Success) ? retval : NULL;
-}
-
-/* replaced by dixLookupResourceByType */
-pointer
-LookupIDByType(XID id, RESTYPE rtype)
-{
- pointer val;
- dixLookupResourceByType(&val, id, rtype, NullClient, DixUnknownAccess);
- return val;
-}
-
-/* replaced by dixLookupResourceByClass */
-pointer
-LookupIDByClass(XID id, RESTYPE classes)
-{
- pointer val;
- dixLookupResourceByClass(&val, id, classes, NullClient, DixUnknownAccess);
- return val;
-}
-
-/* end deprecated functions */
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "dix.h"
+#include "misc.h"
+#include "dixstruct.h"
+
+/*
+ * These are deprecated compatibility functions and will be marked as such
+ * and removed soon!
+ *
+ * Please use the noted replacements instead.
+ */
+
+/* replaced by dixLookupWindow */
+WindowPtr
+SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode)
+{
+ WindowPtr pWin;
+ static int warn = 1;
+ dixLookupWindow(&pWin, id, client, access_mode);
+ if (warn > 0 && warn--)
+ ErrorF("Warning: LookupWindow()/SecurityLookupWindow() "
+ "are deprecated. Please convert your driver/module "
+ "to use dixLookupWindow().\n");
+ return pWin;
+}
+
+/* replaced by dixLookupWindow */
+WindowPtr
+LookupWindow(XID id, ClientPtr client)
+{
+ return SecurityLookupWindow(id, client, DixUnknownAccess);
+}
+
+/* replaced by dixLookupDrawable */
+pointer
+SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode)
+{
+ DrawablePtr pDraw;
+ static int warn = 1;
+ dixLookupDrawable(&pDraw, id, client, M_DRAWABLE, access_mode);
+ if (warn > 0 && warn--)
+ ErrorF("Warning: LookupDrawable()/SecurityLookupDrawable() "
+ "are deprecated. Please convert your driver/module "
+ "to use dixLookupDrawable().\n");
+ return pDraw;
+}
+
+/* replaced by dixLookupDrawable */
+pointer
+LookupDrawable(XID id, ClientPtr client)
+{
+ return SecurityLookupDrawable(id, client, DixUnknownAccess);
+}
+
+/* replaced by dixLookupClient */
+ClientPtr
+LookupClient(XID id, ClientPtr client)
+{
+ ClientPtr pClient;
+ static int warn = 1;
+ dixLookupClient(&pClient, id, client, DixUnknownAccess);
+ if (warn > 0 && warn--)
+ ErrorF("Warning: LookupClient() is deprecated. Please convert your "
+ "driver/module to use dixLookupClient().\n");
+ return pClient;
+}
+
+/* replaced by dixLookupResourceByType */
+pointer
+SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype,
+ Mask access_mode)
+{
+ pointer retval;
+ static int warn = 1;
+ dixLookupResourceByType(&retval, id, rtype, client, access_mode);
+ if (warn > 0 && warn--)
+ ErrorF("Warning: LookupIDByType()/SecurityLookupIDByType() "
+ "are deprecated. Please convert your driver/module "
+ "to use dixLookupResourceByType().\n");
+ return retval;
+}
+
+pointer
+SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes,
+ Mask access_mode)
+{
+ pointer retval;
+ static int warn = 1;
+ dixLookupResourceByClass(&retval, id, classes, client, access_mode);
+ if (warn > 0 && warn--)
+ ErrorF("Warning: LookupIDByClass()/SecurityLookupIDByClass() "
+ "are deprecated. Please convert your driver/module "
+ "to use dixLookupResourceByClass().\n");
+ return retval;
+}
+
+/* replaced by dixLookupResourceByType */
+pointer
+LookupIDByType(XID id, RESTYPE rtype)
+{
+ pointer val;
+ dixLookupResourceByType(&val, id, rtype, NullClient, DixUnknownAccess);
+ return val;
+}
+
+/* replaced by dixLookupResourceByClass */
+pointer
+LookupIDByClass(XID id, RESTYPE classes)
+{
+ pointer val;
+ dixLookupResourceByClass(&val, id, classes, NullClient, DixUnknownAccess);
+ return val;
+}
+
+/* end deprecated functions */
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index c1b04a8e6..08eb6c1cd 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -2524,9 +2524,11 @@ AllocDevicePair (ClientPtr client, char* name,
if (!pointer)
return BadAlloc;
- pointer->name = calloc(strlen(name) + strlen(" pointer") + 1, sizeof(char));
- strcpy(pointer->name, name);
- strcat(pointer->name, " pointer");
+ if (asprintf(&pointer->name, "%s pointer", name) == -1) {
+ pointer->name = NULL;
+ RemoveDevice(pointer, FALSE);
+ return BadAlloc;
+ }
pointer->public.processInputProc = ProcessOtherEvent;
pointer->public.realInputProc = ProcessOtherEvent;
@@ -2547,9 +2549,12 @@ AllocDevicePair (ClientPtr client, char* name,
return BadAlloc;
}
- keyboard->name = calloc(strlen(name) + strlen(" keyboard") + 1, sizeof(char));
- strcpy(keyboard->name, name);
- strcat(keyboard->name, " keyboard");
+ if (asprintf(&keyboard->name, "%s keyboard", name) == -1) {
+ keyboard->name = NULL;
+ RemoveDevice(keyboard, FALSE);
+ RemoveDevice(pointer, FALSE);
+ return BadAlloc;
+ }
keyboard->public.processInputProc = ProcessOtherEvent;
keyboard->public.realInputProc = ProcessOtherEvent;
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index b321e995b..2474c2f3b 100644
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -75,7 +75,7 @@ Equipment Corporation.
******************************************************************/
/* XSERVER_DTRACE additions:
- * Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/xorg-server/dix/dixfonts.c b/xorg-server/dix/dixfonts.c
index bd62cc890..e249e6f55 100644
--- a/xorg-server/dix/dixfonts.c
+++ b/xorg-server/dix/dixfonts.c
@@ -1817,7 +1817,9 @@ SetDefaultFontPath(char *path)
start = end;
}
if (!start) {
- temp_path = Xprintf("%s%sbuilt-ins", path, *path ? "," : "");
+ if (asprintf(&temp_path, "%s%sbuilt-ins", path, *path ? "," : "")
+ == -1)
+ temp_path = NULL;
} else {
temp_path = strdup(path);
}
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index d1d6f910a..0667cc293 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -75,7 +75,7 @@ Equipment Corporation.
******************************************************************/
/*
- * Copyright © 2003-2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2003-2005, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/xorg-server/dix/resource.c b/xorg-server/dix/resource.c
index 178935701..bec68753e 100644
--- a/xorg-server/dix/resource.c
+++ b/xorg-server/dix/resource.c
@@ -73,7 +73,7 @@ Equipment Corporation.
******************************************************************/
/* XSERVER_DTRACE additions:
- * Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),