aboutsummaryrefslogtreecommitdiff
path: root/libXext/src
diff options
context:
space:
mode:
Diffstat (limited to 'libXext/src')
-rw-r--r--libXext/src/DPMS.c2
-rw-r--r--libXext/src/MITMisc.c2
-rw-r--r--libXext/src/XAppgroup.c2
-rw-r--r--libXext/src/XEVI.c2
-rw-r--r--libXext/src/XLbx.c3
-rw-r--r--libXext/src/XMultibuf.c2
-rw-r--r--libXext/src/XSecurity.c620
-rw-r--r--libXext/src/XShape.c2
-rw-r--r--libXext/src/XShm.c3
-rw-r--r--libXext/src/XSync.c1
-rw-r--r--libXext/src/XTestExt1.c2
-rw-r--r--libXext/src/Xcup.c2
-rw-r--r--libXext/src/Xdbe.c2
-rw-r--r--libXext/src/extutil.c2
-rw-r--r--libXext/src/globals.c176
15 files changed, 396 insertions, 427 deletions
diff --git a/libXext/src/DPMS.c b/libXext/src/DPMS.c
index 02698aad7..c6d0adac6 100644
--- a/libXext/src/DPMS.c
+++ b/libXext/src/DPMS.c
@@ -1,4 +1,3 @@
-/* $Xorg: DPMS.c,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ */
/*****************************************************************
Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
@@ -26,7 +25,6 @@ dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
-/* $XFree86: xc/lib/Xext/DPMS.c,v 3.5 2002/10/16 00:37:27 dawes Exp $ */
/*
* HISTORY
diff --git a/libXext/src/MITMisc.c b/libXext/src/MITMisc.c
index 0304bf320..20d1157cb 100644
--- a/libXext/src/MITMisc.c
+++ b/libXext/src/MITMisc.c
@@ -1,5 +1,4 @@
/*
- * $Xorg: MITMisc.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $
*
Copyright 1989, 1998 The Open Group
@@ -24,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*
*/
-/* $XFree86: xc/lib/Xext/MITMisc.c,v 1.3 2002/10/16 00:37:27 dawes Exp $ */
/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM BLESSING */
diff --git a/libXext/src/XAppgroup.c b/libXext/src/XAppgroup.c
index c533fd25f..2d3edf35f 100644
--- a/libXext/src/XAppgroup.c
+++ b/libXext/src/XAppgroup.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/lib/Xext/XAppgroup.c,v 1.11 2002/10/16 02:19:22 dawes Exp $ */
/*
Copyright 1996, 1998 The Open Group
@@ -24,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $Xorg: XAppgroup.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/libXext/src/XEVI.c b/libXext/src/XEVI.c
index b4e5b77f4..caf988977 100644
--- a/libXext/src/XEVI.c
+++ b/libXext/src/XEVI.c
@@ -1,4 +1,3 @@
-/* $Xorg: XEVI.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $ */
/************************************************************
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute this
@@ -21,7 +20,6 @@ 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.
********************************************************/
-/* $XFree86$ */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/libXext/src/XLbx.c b/libXext/src/XLbx.c
index fc2873be9..0b7eb5827 100644
--- a/libXext/src/XLbx.c
+++ b/libXext/src/XLbx.c
@@ -1,6 +1,4 @@
/*
- * $Xorg: XLbx.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $
- *
* Copyright 1992 Network Computing Devices
*
* Permission to use, copy, modify, distribute, and sell this software and its
@@ -22,7 +20,6 @@
*
* Author: Keith Packard, Network Computing Devices
*/
-/* $XFree86: xc/lib/Xext/XLbx.c,v 1.4 2002/10/16 00:37:27 dawes Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/libXext/src/XMultibuf.c b/libXext/src/XMultibuf.c
index 5c9cfc78c..67551443d 100644
--- a/libXext/src/XMultibuf.c
+++ b/libXext/src/XMultibuf.c
@@ -1,5 +1,4 @@
/*
- * $Xorg: XMultibuf.c,v 1.6 2001/02/09 02:03:49 xorgcvs Exp $
*
Copyright 1989, 1998 The Open Group
@@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
*
* Authors: Jim Fulton, MIT X Consortium
*/
-/* $XFree86: xc/lib/Xext/XMultibuf.c,v 1.5 2001/12/14 19:55:00 dawes Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/libXext/src/XSecurity.c b/libXext/src/XSecurity.c
index 478b06218..4ce7c4d01 100644
--- a/libXext/src/XSecurity.c
+++ b/libXext/src/XSecurity.c
@@ -1,311 +1,309 @@
-/* $Xorg: XSecurity.c,v 1.6 2001/02/09 02:03:49 xorgcvs Exp $ */
-/*
-
-Copyright 1996, 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.
-
-*/
-/* $XFree86: xc/lib/Xext/XSecurity.c,v 1.5 2002/10/16 00:37:27 dawes Exp $ */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <X11/Xlibint.h>
-#include <stdio.h>
-#include <X11/extensions/Xext.h>
-#include <X11/extensions/extutil.h>
-#include <X11/extensions/securproto.h>
-#include <X11/extensions/security.h>
-
-static XExtensionInfo _Security_info_data;
-static XExtensionInfo *Security_info = &_Security_info_data;
-static char *Security_extension_name = SECURITY_EXTENSION_NAME;
-
-#define SecurityCheckExtension(dpy,i,val) \
- XextCheckExtension (dpy, i, Security_extension_name, val)
-#define SecuritySimpleCheckExtension(dpy,i) \
- XextSimpleCheckExtension (dpy, i, Security_extension_name)
-
-#define SecurityGetReq(name,req,info) GetReq (name, req); \
- req->reqType = info->codes->major_opcode; \
- req->securityReqType = X_##name;
-
-/*****************************************************************************
- * *
- * private utility routines *
- * *
- *****************************************************************************/
-
-/*
- * find_display - locate the display info block
- */
-static int close_display(Display *dpy, XExtCodes *codes);
-static Bool wire_to_event(Display *dpy, XEvent *event, xEvent *wire);
-static Status event_to_wire(Display *dpy, XEvent *event, xEvent *wire);
-static char *error_string(Display *dpy, int code, XExtCodes *codes,
- char *buf, int n);
-
-static XExtensionHooks Security_extension_hooks = {
- NULL, /* create_gc */
- NULL, /* copy_gc */
- NULL, /* flush_gc */
- NULL, /* free_gc */
- NULL, /* create_font */
- NULL, /* free_font */
- close_display, /* close_display */
- wire_to_event, /* wire_to_event */
- event_to_wire, /* event_to_wire */
- NULL, /* error */
- error_string /* error_string */
-};
-
-static char *security_error_list[] = {
- "BadAuthorization",
- "BadAuthorizationProtocol"
-};
-
-static XEXT_GENERATE_FIND_DISPLAY (find_display, Security_info,
- Security_extension_name,
- &Security_extension_hooks,
- XSecurityNumberEvents, NULL)
-
-static XEXT_GENERATE_CLOSE_DISPLAY (close_display, Security_info)
-
-static
-XEXT_GENERATE_ERROR_STRING(error_string, Security_extension_name,
- XSecurityNumberErrors, security_error_list)
-
-static Bool
-wire_to_event(Display *dpy, XEvent *event, xEvent *wire)
-{
- XExtDisplayInfo *info = find_display(dpy);
-
- SecurityCheckExtension (dpy, info, False);
-
- switch ((wire->u.u.type & 0x7F) - info->codes->first_event)
- {
- case XSecurityAuthorizationRevoked:
- {
- xSecurityAuthorizationRevokedEvent *rwire =
- (xSecurityAuthorizationRevokedEvent *)wire;
- XSecurityAuthorizationRevokedEvent *revent =
- (XSecurityAuthorizationRevokedEvent *)event;
-
- revent->type = rwire->type & 0x7F;
- revent->serial = _XSetLastRequestRead(dpy,
- (xGenericReply *) wire);
- revent->send_event = (rwire->type & 0x80) != 0;
- revent->display = dpy;
- revent->auth_id = rwire->authId;
- return True;
- }
- }
- return False;
-}
-
-static Status
-event_to_wire(Display *dpy, XEvent *event, xEvent *wire)
-{
- XExtDisplayInfo *info = find_display(dpy);
-
- SecurityCheckExtension(dpy, info, False);
-
- switch ((event->type & 0x7F) - info->codes->first_event)
- {
- case XSecurityAuthorizationRevoked:
- {
- xSecurityAuthorizationRevokedEvent *rwire =
- (xSecurityAuthorizationRevokedEvent *)wire;
- XSecurityAuthorizationRevokedEvent *revent =
- (XSecurityAuthorizationRevokedEvent *)event;
- rwire->type = revent->type | (revent->send_event ? 0x80 : 0);
- rwire->sequenceNumber = revent->serial & 0xFFFF;
- return True;
- }
- }
- return False;
-}
-
-/*****************************************************************************
- * *
- * Security public interfaces *
- * *
- *****************************************************************************/
-
-Status XSecurityQueryExtension (
- Display *dpy,
- int *major_version_return,
- int *minor_version_return)
-{
- XExtDisplayInfo *info = find_display (dpy);
- xSecurityQueryVersionReply rep;
- register xSecurityQueryVersionReq *req;
-
- if (!XextHasExtension (info))
- return (Status)0; /* failure */
-
- LockDisplay (dpy);
- SecurityGetReq (SecurityQueryVersion, req, info);
- req->majorVersion = SECURITY_MAJOR_VERSION;
- req->minorVersion = SECURITY_MINOR_VERSION;
-
- if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
- UnlockDisplay (dpy);
- SyncHandle ();
- return (Status)0; /* failure */
- }
- *major_version_return = rep.majorVersion;
- *minor_version_return = rep.minorVersion;
- UnlockDisplay (dpy);
-
- SyncHandle ();
-
- if (*major_version_return != SECURITY_MAJOR_VERSION)
- return (Status)0; /* failure */
- else
- return (Status)1; /* success */
-}
-
-Xauth *
-XSecurityAllocXauth(void)
-{
- return Xcalloc(1, sizeof(Xauth));
-}
-
-void
-XSecurityFreeXauth(Xauth *auth)
-{
- XFree(auth);
-}
-
-static int
-Ones(Mask mask)
-{
- register Mask y;
-
- y = (mask >> 1) &033333333333;
- y = mask - y - ((y >>1) & 033333333333);
- return (((y + (y >> 3)) & 030707070707) % 077);
-}
-
-Xauth *
-XSecurityGenerateAuthorization(
- Display *dpy,
- Xauth *auth_in,
- unsigned long valuemask,
- XSecurityAuthorizationAttributes *attributes,
- XSecurityAuthorization *auth_id_return)
-{
- XExtDisplayInfo *info = find_display (dpy);
- register xSecurityGenerateAuthorizationReq *req;
- xSecurityGenerateAuthorizationReply rep;
- Xauth *auth_return;
- unsigned long values[3];
- unsigned long *value = values;
- unsigned int nvalues;
-
- *auth_id_return = 0; /* in case we fail */
-
- /* make sure extension is available */
-
- SecurityCheckExtension (dpy, info, (Xauth *)NULL);
-
- LockDisplay(dpy);
- SecurityGetReq(SecurityGenerateAuthorization, req, info);
-
- req->nbytesAuthProto = auth_in->name_length;
- req->nbytesAuthData = auth_in->data_length;
-
- /* adjust length to account for auth name and data */
- req->length += (auth_in->name_length + (unsigned)3) >> 2;
- req->length += (auth_in->data_length + (unsigned)3) >> 2;
-
- /* adjust length to account for list of values */
- req->valueMask = valuemask & XSecurityAllAuthorizationAttributes;
- nvalues = Ones(req->valueMask);
- req->length += nvalues;
-
- /* send auth name and data */
- Data(dpy, auth_in->name, auth_in->name_length);
- Data(dpy, auth_in->data, auth_in->data_length);
-
- /* send values */
- if (valuemask & XSecurityTimeout) *value++ = attributes->timeout;
- if (valuemask & XSecurityTrustLevel) *value++ = attributes->trust_level;
- if (valuemask & XSecurityGroup) *value++ = attributes->group;
- if (valuemask & XSecurityEventMask) *value++ = attributes->event_mask;
-
- nvalues <<= 2;
- Data32(dpy, (long *)values, (long)nvalues);
-
- if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) {
- UnlockDisplay (dpy);
- SyncHandle ();
- return (Xauth *)NULL;
- }
-
- *auth_id_return = rep.authId;
-
- /* Allocate space for the Xauth struct and the auth name and data all
- * in one hunk. This lets XSecurityFreeXauth not have to care
- * about whether the auth was allocated here or in
- * XSecurityAllocXauth; in both cases, you just free one pointer.
- */
-
- if ((auth_return = (Xauth *)Xcalloc(1,
- (sizeof(Xauth) + auth_in->name_length + rep.dataLength))))
- {
- auth_return->data_length = rep.dataLength;
- auth_return->data = (char *)&auth_return[1];
- _XReadPad(dpy, auth_return->data, (long)rep.dataLength);
-
- auth_return->name_length = auth_in->name_length;
- auth_return->name = auth_return->data + auth_return->data_length;
- memcpy(auth_return->name, auth_in->name, auth_return->name_length);
- }
- else
- {
- _XEatData(dpy, (unsigned long) (rep.dataLength + 3) & ~3);
- }
-
- UnlockDisplay (dpy);
- SyncHandle ();
- return auth_return;
-
-} /* XSecurityGenerateAuthorization */
-
-Status
-XSecurityRevokeAuthorization(
- Display *dpy,
- XSecurityAuthorization auth_id)
-{
- XExtDisplayInfo *info = find_display (dpy);
- xSecurityRevokeAuthorizationReq *req;
-
- SecurityCheckExtension (dpy, info, 0);
- LockDisplay(dpy);
- SecurityGetReq(SecurityRevokeAuthorization, req, info);
- req->authId = auth_id;
- UnlockDisplay (dpy);
- SyncHandle ();
- return 1;
-} /* XSecurityRevokeAuthorization */
+/*
+
+Copyright 1996, 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <X11/Xlibint.h>
+#include <stdio.h>
+#include <X11/extensions/Xext.h>
+#include <X11/extensions/extutil.h>
+#include <X11/extensions/securproto.h>
+#include <X11/extensions/security.h>
+
+static XExtensionInfo _Security_info_data;
+static XExtensionInfo *Security_info = &_Security_info_data;
+static char *Security_extension_name = SECURITY_EXTENSION_NAME;
+
+#define SecurityCheckExtension(dpy,i,val) \
+ XextCheckExtension (dpy, i, Security_extension_name, val)
+#define SecuritySimpleCheckExtension(dpy,i) \
+ XextSimpleCheckExtension (dpy, i, Security_extension_name)
+
+#define SecurityGetReq(name,req,info) GetReq (name, req); \
+ req->reqType = info->codes->major_opcode; \
+ req->securityReqType = X_##name;
+
+/*****************************************************************************
+ * *
+ * private utility routines *
+ * *
+ *****************************************************************************/
+
+/*
+ * find_display - locate the display info block
+ */
+static int close_display(Display *dpy, XExtCodes *codes);
+static Bool wire_to_event(Display *dpy, XEvent *event, xEvent *wire);
+static Status event_to_wire(Display *dpy, XEvent *event, xEvent *wire);
+static char *error_string(Display *dpy, int code, XExtCodes *codes,
+ char *buf, int n);
+
+static XExtensionHooks Security_extension_hooks = {
+ NULL, /* create_gc */
+ NULL, /* copy_gc */
+ NULL, /* flush_gc */
+ NULL, /* free_gc */
+ NULL, /* create_font */
+ NULL, /* free_font */
+ close_display, /* close_display */
+ wire_to_event, /* wire_to_event */
+ event_to_wire, /* event_to_wire */
+ NULL, /* error */
+ error_string /* error_string */
+};
+
+static char *security_error_list[] = {
+ "BadAuthorization",
+ "BadAuthorizationProtocol"
+};
+
+static XEXT_GENERATE_FIND_DISPLAY (find_display, Security_info,
+ Security_extension_name,
+ &Security_extension_hooks,
+ XSecurityNumberEvents, NULL)
+
+static XEXT_GENERATE_CLOSE_DISPLAY (close_display, Security_info)
+
+static
+XEXT_GENERATE_ERROR_STRING(error_string, Security_extension_name,
+ XSecurityNumberErrors, security_error_list)
+
+static Bool
+wire_to_event(Display *dpy, XEvent *event, xEvent *wire)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+
+ SecurityCheckExtension (dpy, info, False);
+
+ switch ((wire->u.u.type & 0x7F) - info->codes->first_event)
+ {
+ case XSecurityAuthorizationRevoked:
+ {
+ xSecurityAuthorizationRevokedEvent *rwire =
+ (xSecurityAuthorizationRevokedEvent *)wire;
+ XSecurityAuthorizationRevokedEvent *revent =
+ (XSecurityAuthorizationRevokedEvent *)event;
+
+ revent->type = rwire->type & 0x7F;
+ revent->serial = _XSetLastRequestRead(dpy,
+ (xGenericReply *) wire);
+ revent->send_event = (rwire->type & 0x80) != 0;
+ revent->display = dpy;
+ revent->auth_id = rwire->authId;
+ return True;
+ }
+ }
+ return False;
+}
+
+static Status
+event_to_wire(Display *dpy, XEvent *event, xEvent *wire)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+
+ SecurityCheckExtension(dpy, info, False);
+
+ switch ((event->type & 0x7F) - info->codes->first_event)
+ {
+ case XSecurityAuthorizationRevoked:
+ {
+ xSecurityAuthorizationRevokedEvent *rwire =
+ (xSecurityAuthorizationRevokedEvent *)wire;
+ XSecurityAuthorizationRevokedEvent *revent =
+ (XSecurityAuthorizationRevokedEvent *)event;
+ rwire->type = revent->type | (revent->send_event ? 0x80 : 0);
+ rwire->sequenceNumber = revent->serial & 0xFFFF;
+ return True;
+ }
+ }
+ return False;
+}
+
+/*****************************************************************************
+ * *
+ * Security public interfaces *
+ * *
+ *****************************************************************************/
+
+Status XSecurityQueryExtension (
+ Display *dpy,
+ int *major_version_return,
+ int *minor_version_return)
+{
+ XExtDisplayInfo *info = find_display (dpy);
+ xSecurityQueryVersionReply rep;
+ register xSecurityQueryVersionReq *req;
+
+ if (!XextHasExtension (info))
+ return (Status)0; /* failure */
+
+ LockDisplay (dpy);
+ SecurityGetReq (SecurityQueryVersion, req, info);
+ req->majorVersion = SECURITY_MAJOR_VERSION;
+ req->minorVersion = SECURITY_MINOR_VERSION;
+
+ if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
+ UnlockDisplay (dpy);
+ SyncHandle ();
+ return (Status)0; /* failure */
+ }
+ *major_version_return = rep.majorVersion;
+ *minor_version_return = rep.minorVersion;
+ UnlockDisplay (dpy);
+
+ SyncHandle ();
+
+ if (*major_version_return != SECURITY_MAJOR_VERSION)
+ return (Status)0; /* failure */
+ else
+ return (Status)1; /* success */
+}
+
+Xauth *
+XSecurityAllocXauth(void)
+{
+ return Xcalloc(1, sizeof(Xauth));
+}
+
+void
+XSecurityFreeXauth(Xauth *auth)
+{
+ XFree(auth);
+}
+
+static int
+Ones(Mask mask)
+{
+ register Mask y;
+
+ y = (mask >> 1) &033333333333;
+ y = mask - y - ((y >>1) & 033333333333);
+ return (((y + (y >> 3)) & 030707070707) % 077);
+}
+
+Xauth *
+XSecurityGenerateAuthorization(
+ Display *dpy,
+ Xauth *auth_in,
+ unsigned long valuemask,
+ XSecurityAuthorizationAttributes *attributes,
+ XSecurityAuthorization *auth_id_return)
+{
+ XExtDisplayInfo *info = find_display (dpy);
+ register xSecurityGenerateAuthorizationReq *req;
+ xSecurityGenerateAuthorizationReply rep;
+ Xauth *auth_return;
+ unsigned long values[3];
+ unsigned long *value = values;
+ unsigned int nvalues;
+
+ *auth_id_return = 0; /* in case we fail */
+
+ /* make sure extension is available */
+
+ SecurityCheckExtension (dpy, info, (Xauth *)NULL);
+
+ LockDisplay(dpy);
+ SecurityGetReq(SecurityGenerateAuthorization, req, info);
+
+ req->nbytesAuthProto = auth_in->name_length;
+ req->nbytesAuthData = auth_in->data_length;
+
+ /* adjust length to account for auth name and data */
+ req->length += (auth_in->name_length + (unsigned)3) >> 2;
+ req->length += (auth_in->data_length + (unsigned)3) >> 2;
+
+ /* adjust length to account for list of values */
+ req->valueMask = valuemask & XSecurityAllAuthorizationAttributes;
+ nvalues = Ones(req->valueMask);
+ req->length += nvalues;
+
+ /* send auth name and data */
+ Data(dpy, auth_in->name, auth_in->name_length);
+ Data(dpy, auth_in->data, auth_in->data_length);
+
+ /* send values */
+ if (valuemask & XSecurityTimeout) *value++ = attributes->timeout;
+ if (valuemask & XSecurityTrustLevel) *value++ = attributes->trust_level;
+ if (valuemask & XSecurityGroup) *value++ = attributes->group;
+ if (valuemask & XSecurityEventMask) *value++ = attributes->event_mask;
+
+ nvalues <<= 2;
+ Data32(dpy, (long *)values, (long)nvalues);
+
+ if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) {
+ UnlockDisplay (dpy);
+ SyncHandle ();
+ return (Xauth *)NULL;
+ }
+
+ *auth_id_return = rep.authId;
+
+ /* Allocate space for the Xauth struct and the auth name and data all
+ * in one hunk. This lets XSecurityFreeXauth not have to care
+ * about whether the auth was allocated here or in
+ * XSecurityAllocXauth; in both cases, you just free one pointer.
+ */
+
+ if ((auth_return = (Xauth *)Xcalloc(1,
+ (sizeof(Xauth) + auth_in->name_length + rep.dataLength))))
+ {
+ auth_return->data_length = rep.dataLength;
+ auth_return->data = (char *)&auth_return[1];
+ _XReadPad(dpy, auth_return->data, (long)rep.dataLength);
+
+ auth_return->name_length = auth_in->name_length;
+ auth_return->name = auth_return->data + auth_return->data_length;
+ memcpy(auth_return->name, auth_in->name, auth_return->name_length);
+ }
+ else
+ {
+ _XEatData(dpy, (unsigned long) (rep.dataLength + 3) & ~3);
+ }
+
+ UnlockDisplay (dpy);
+ SyncHandle ();
+ return auth_return;
+
+} /* XSecurityGenerateAuthorization */
+
+Status
+XSecurityRevokeAuthorization(
+ Display *dpy,
+ XSecurityAuthorization auth_id)
+{
+ XExtDisplayInfo *info = find_display (dpy);
+ xSecurityRevokeAuthorizationReq *req;
+
+ SecurityCheckExtension (dpy, info, 0);
+ LockDisplay(dpy);
+ SecurityGetReq(SecurityRevokeAuthorization, req, info);
+ req->authId = auth_id;
+ UnlockDisplay (dpy);
+ SyncHandle ();
+ return 1;
+} /* XSecurityRevokeAuthorization */
diff --git a/libXext/src/XShape.c b/libXext/src/XShape.c
index 2810a4dc1..f189a41b9 100644
--- a/libXext/src/XShape.c
+++ b/libXext/src/XShape.c
@@ -1,5 +1,4 @@
/*
- * $Xorg: XShape.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $
*
Copyright 1989, 1998 The Open Group
@@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Keith Packard, MIT X Consortium
*/
-/* $XFree86: xc/lib/Xext/XShape.c,v 1.3 2002/10/16 00:37:27 dawes Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/libXext/src/XShm.c b/libXext/src/XShm.c
index 81d2b9db6..cffd30756 100644
--- a/libXext/src/XShm.c
+++ b/libXext/src/XShm.c
@@ -1,6 +1,4 @@
-/* $XdotOrg: $ */
/*
- * $Xorg: XShm.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $
*
Copyright 1989, 1998 The Open Group
@@ -26,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Bob Scheifler and Keith Packard, MIT X Consortium
*/
-/* $XFree86: xc/lib/Xext/XShm.c,v 1.6 2002/10/16 02:19:22 dawes Exp $ */
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
diff --git a/libXext/src/XSync.c b/libXext/src/XSync.c
index e7c0c3f78..250d10cd3 100644
--- a/libXext/src/XSync.c
+++ b/libXext/src/XSync.c
@@ -49,7 +49,6 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/Xext/XSync.c,v 1.7tsi Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/libXext/src/XTestExt1.c b/libXext/src/XTestExt1.c
index 7a73a8ae8..83a59a3d8 100644
--- a/libXext/src/XTestExt1.c
+++ b/libXext/src/XTestExt1.c
@@ -1,4 +1,3 @@
-/* $Xorg: XTestExt1.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ */
/*
* File: xtestext1lib.c
*
@@ -51,7 +50,6 @@ Telephone and Telegraph Company or of the Regents of the
University of California.
*/
-/* $XFree86: xc/lib/Xext/XTestExt1.c,v 1.3 2001/01/17 19:42:46 dawes Exp $ */
/******************************************************************************
* include files
diff --git a/libXext/src/Xcup.c b/libXext/src/Xcup.c
index 8d3cb70a2..d050ba0b6 100644
--- a/libXext/src/Xcup.c
+++ b/libXext/src/Xcup.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/lib/Xext/Xcup.c,v 1.8 2002/10/16 02:19:22 dawes Exp $ */
/*
Copyright 1987, 1988, 1998 The Open Group
@@ -24,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $Xorg: Xcup.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/libXext/src/Xdbe.c b/libXext/src/Xdbe.c
index 5b8573e19..930b51f60 100644
--- a/libXext/src/Xdbe.c
+++ b/libXext/src/Xdbe.c
@@ -1,4 +1,3 @@
-/* $Xorg: Xdbe.c,v 1.4 2000/08/17 19:45:53 cpqbld Exp $ */
/******************************************************************************
*
* Copyright (c) 1994, 1995 Hewlett-Packard Company
@@ -30,7 +29,6 @@
* Xlib DBE code
*
*****************************************************************************/
-/* $XFree86: xc/lib/Xext/Xdbe.c,v 3.7 2002/10/16 02:19:22 dawes Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/libXext/src/extutil.c b/libXext/src/extutil.c
index 144af9072..8813c1154 100644
--- a/libXext/src/extutil.c
+++ b/libXext/src/extutil.c
@@ -1,5 +1,4 @@
/*
- * $Xorg: extutil.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $
*
Copyright 1989, 1998 The Open Group
@@ -45,7 +44,6 @@ in this Software without prior written authorization from The Open Group.
* XSetExtensionErrorHandler establish an extension error handler
* XMissingExtension raise an error about missing ext
*/
-/* $XFree86: xc/lib/Xext/extutil.c,v 1.5 2002/10/16 00:37:27 dawes Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/libXext/src/globals.c b/libXext/src/globals.c
index c20dbacd4..a40492abe 100644
--- a/libXext/src/globals.c
+++ b/libXext/src/globals.c
@@ -1,89 +1,87 @@
-/* $Xorg: globals.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */
-/*
-
-Copyright 1989, 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.
-
-*/
-/* $XFree86: xc/lib/Xext/globals.c,v 3.4 2001/07/29 05:01:12 tsi Exp $ */
-
-/*
- * This file should contain only those objects which must be predefined.
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <X11/Xlib.h>
-#include <X11/extensions/Xext.h>
-#include <stddef.h> /* for definition of NULL */
-
-/*
- * If possible, it is useful to have the global data default to a null value.
- * Some shared library implementations are *much* happier if there isn't any
- * global initialized data.
- */
-#ifdef NULL_NOT_ZERO /* then need to initialize */
-#define SetZero(t,var,z) t var = z
-#else
-#define SetZero(t,var,z) t var
-#endif
-
-#ifdef ATTSHAREDLIB /* then need extra variables */
-/*
- * If we need to define extra variables for each global
- */
-#if !defined(UNIXCPP) || defined(ANSICPP)
-#define ZEROINIT(t,var,val) SetZero(t,var,val); \
- SetZero (long, _libX_##var##Flag, 0); \
- SetZero (void *, _libX_##var##Ptr, NULL)
-#else /* else pcc concatenation */
-#define ZEROINIT(t,var,val) SetZero(t,var,val); \
- SetZero (long, _libX_/**/var/**/Flag, 0); \
- SetZero (void *, _libX_/**/var/**/Ptr, NULL)
-#endif /* concat ANSI C vs. pcc */
-
-#else /* else not ATTSHAREDLIB */
-/*
- * no extra crud
- */
-#define ZEROINIT(t,var,val) SetZero (t, var, val)
-
-#endif /* ATTSHAREDLIB */
-
-
-/*
- * Error handlers; used to be in XlibInt.c
- */
-ZEROINIT (XextErrorHandler, _XExtensionErrorFunction, NULL);
-
-/*
- * NOTE: any additional external definition NEED
- * to be inserted BELOW this point!!!
- */
-
-/*
- * NOTE: any additional external definition NEED
- * to be inserted ABOVE this point!!!
- */
-
+/*
+
+Copyright 1989, 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.
+
+*/
+
+/*
+ * This file should contain only those objects which must be predefined.
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <X11/Xlib.h>
+#include <X11/extensions/Xext.h>
+#include <stddef.h> /* for definition of NULL */
+
+/*
+ * If possible, it is useful to have the global data default to a null value.
+ * Some shared library implementations are *much* happier if there isn't any
+ * global initialized data.
+ */
+#ifdef NULL_NOT_ZERO /* then need to initialize */
+#define SetZero(t,var,z) t var = z
+#else
+#define SetZero(t,var,z) t var
+#endif
+
+#ifdef ATTSHAREDLIB /* then need extra variables */
+/*
+ * If we need to define extra variables for each global
+ */
+#if !defined(UNIXCPP) || defined(ANSICPP)
+#define ZEROINIT(t,var,val) SetZero(t,var,val); \
+ SetZero (long, _libX_##var##Flag, 0); \
+ SetZero (void *, _libX_##var##Ptr, NULL)
+#else /* else pcc concatenation */
+#define ZEROINIT(t,var,val) SetZero(t,var,val); \
+ SetZero (long, _libX_/**/var/**/Flag, 0); \
+ SetZero (void *, _libX_/**/var/**/Ptr, NULL)
+#endif /* concat ANSI C vs. pcc */
+
+#else /* else not ATTSHAREDLIB */
+/*
+ * no extra crud
+ */
+#define ZEROINIT(t,var,val) SetZero (t, var, val)
+
+#endif /* ATTSHAREDLIB */
+
+
+/*
+ * Error handlers; used to be in XlibInt.c
+ */
+ZEROINIT (XextErrorHandler, _XExtensionErrorFunction, NULL);
+
+/*
+ * NOTE: any additional external definition NEED
+ * to be inserted BELOW this point!!!
+ */
+
+/*
+ * NOTE: any additional external definition NEED
+ * to be inserted ABOVE this point!!!
+ */
+