Module Name: xsrc
Committed By: mrg
Date: Fri May 31 09:21:06 UTC 2013
Modified Files:
xsrc/external/mit/libXt/dist/man: XtAppCreateShell.man
xsrc/external/mit/libXt/dist/src: NextEvent.c TMparse.c
xsrc/external/mit/libXtst/dist/man: XTestQueryExtension.man
xsrc/external/mit/libXtst/dist/src: XRecord.c
Removed Files:
xsrc/external/mit/libXt/dist: compile
xsrc/external/mit/libXt/dist/m4: libtool.m4 ltoptions.m4 ltsugar.m4
ltversion.m4 lt~obsolete.m4
xsrc/external/mit/libXt/dist/specs: CH01 CH02 CH03 CH04 CH05 CH06 CH07
CH08 CH09 CH10 CH11 CH12 CH13 Xtk.intr.front appA appB appC appD
appE appF intr.idxmac.t postproc strings.mit
Log Message:
merge libXt 1.1.4 and libXtst 1.2.2.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r0 xsrc/external/mit/libXt/dist/compile
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/libXt/dist/m4/libtool.m4 \
xsrc/external/mit/libXt/dist/m4/ltoptions.m4 \
xsrc/external/mit/libXt/dist/m4/ltsugar.m4 \
xsrc/external/mit/libXt/dist/m4/ltversion.m4 \
xsrc/external/mit/libXt/dist/m4/lt~obsolete.m4
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/libXt/dist/man/XtAppCreateShell.man
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/libXt/dist/specs/CH01 \
xsrc/external/mit/libXt/dist/specs/CH02 \
xsrc/external/mit/libXt/dist/specs/CH03 \
xsrc/external/mit/libXt/dist/specs/CH04 \
xsrc/external/mit/libXt/dist/specs/CH05 \
xsrc/external/mit/libXt/dist/specs/CH06 \
xsrc/external/mit/libXt/dist/specs/CH07 \
xsrc/external/mit/libXt/dist/specs/CH08 \
xsrc/external/mit/libXt/dist/specs/CH09 \
xsrc/external/mit/libXt/dist/specs/CH10 \
xsrc/external/mit/libXt/dist/specs/CH11 \
xsrc/external/mit/libXt/dist/specs/CH12 \
xsrc/external/mit/libXt/dist/specs/CH13 \
xsrc/external/mit/libXt/dist/specs/Xtk.intr.front \
xsrc/external/mit/libXt/dist/specs/appA \
xsrc/external/mit/libXt/dist/specs/appB \
xsrc/external/mit/libXt/dist/specs/appC \
xsrc/external/mit/libXt/dist/specs/appD \
xsrc/external/mit/libXt/dist/specs/appE \
xsrc/external/mit/libXt/dist/specs/appF \
xsrc/external/mit/libXt/dist/specs/intr.idxmac.t \
xsrc/external/mit/libXt/dist/specs/postproc \
xsrc/external/mit/libXt/dist/specs/strings.mit
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/libXt/dist/src/NextEvent.c
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/libXt/dist/src/TMparse.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/libXtst/dist/man/XTestQueryExtension.man
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/libXtst/dist/src/XRecord.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/libXt/dist/man/XtAppCreateShell.man
diff -u xsrc/external/mit/libXt/dist/man/XtAppCreateShell.man:1.4 xsrc/external/mit/libXt/dist/man/XtAppCreateShell.man:1.5
--- xsrc/external/mit/libXt/dist/man/XtAppCreateShell.man:1.4 Wed Jul 18 14:34:03 2012
+++ xsrc/external/mit/libXt/dist/man/XtAppCreateShell.man Fri May 31 09:21:05 2013
@@ -1,26 +1,26 @@
.\" Copyright (c) 1993, 1994 X Consortium
-.\"
+.\"
.\" 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
+.\" 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 furnished to do so, subject to the following conditions:
-.\"
+.\"
.\" 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 X CONSORTIUM 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
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+.\" THE X CONSORTIUM 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 X Consortium shall not
-.\" be used in advertising or otherwise to promote the sale, use or other
-.\" dealing in this Software without prior written authorization from the
+.\"
+.\" Except as contained in this notice, the name of the X Consortium shall not
+.\" be used in advertising or otherwise to promote the sale, use or other
+.\" dealing in this Software without prior written authorization from the
.\" X Consortium.
.\"
.ds tk X Toolkit
@@ -36,7 +36,7 @@
.de Ds
.nf
.\\$1D \\$2 \\$1
-.ft 1
+.ft CW
.ps \\n(PS
.\".if \\n(VS>=40 .vs \\n(VSu
.\".if \\n(VS<=39 .vs \\n(VSp
@@ -50,43 +50,8 @@
.sp \\n(DDu
.fi
..
-.de FD
-.LP
-.KS
-.TA .5i 3i
-.ta .5i 3i
-.nf
-..
-.de FN
-.fi
-.KE
-.LP
-..
.de IN \" send an index entry to the stderr
..
-.de C{
-.KS
-.nf
-.D
-.\"
-.\" choose appropriate monospace font
-.\" the imagen conditional, 480,
-.\" may be changed to L if LB is too
-.\" heavy for your eyes...
-.\"
-.ie "\\*(.T"480" .ft L
-.el .ie "\\*(.T"300" .ft L
-.el .ie "\\*(.T"202" .ft PO
-.el .ie "\\*(.T"aps" .ft CW
-.el .ft R
-.ps \\n(PS
-.ie \\n(VS>40 .vs \\n(VSu
-.el .vs \\n(VSp
-..
-.de C}
-.DE
-.R
-..
.de Pn
.ie t \\$1\fB\^\\$2\^\fR\\$3
.el \\$1\fI\^\\$2\^\fP\\$3
@@ -95,32 +60,6 @@
.ie t \fB\^\\$1\^\fR\\$2
.el \fI\^\\$1\^\fP\\$2
..
-.de NT
-.ne 7
-.ds NO Note
-.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
-.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
-.ie n .sp
-.el .sp 10p
-.TB
-.ce
-\\*(NO
-.ie n .sp
-.el .sp 5p
-.if '\\$1'C' .ce 99
-.if '\\$2'C' .ce 99
-.in +5n
-.ll -5n
-.R
-..
-. \" Note End -- doug kraft 3/85
-.de NE
-.ce 0
-.in -5n
-.ll +5n
-.ie n .sp
-.el .sp 10p
-..
.ny0
.TH XtAppCreateShell __libmansuffix__ __xorgversion__ "XT FUNCTIONS"
.SH NAME
@@ -129,11 +68,11 @@ XtAppCreateShell, XtVaAppCreateShell \-
.HP
Widget XtAppCreateShell(String \fIapplication_name\fP, String
\fIapplication_class\fP, WidgetClass \fIwidget_class\fP, Display
-*\fIdisplay\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP);
+*\fIdisplay\fP, ArgList \fIargs\fP, Cardinal \fInum_args\fP);
.HP
Widget XtVaAppCreateShell(String \fIapplication_name\fP, String
\fIapplication_class\fP, WidgetClass \fIwidget_class\fP, Display
-*\fIdisplay\fP, ...\^);
+*\fIdisplay\fP, ...\^);
.SH ARGUMENTS
.IP \fIapplication_name\fP 1i
Specifies the name of the application instance.
@@ -155,14 +94,14 @@ Specifies the variable argument list\*(D
.SH DESCRIPTION
The
.ZN XtAppCreateShell
-function saves the specified application name and application class
+function saves the specified application name and application class
for qualifying all widget resource specifiers.
The application name and application class are used as the left-most components
in all widget resource names for this application.
.ZN XtAppCreateShell
should be used to create a new logical application within a program
or to create a shell on another display.
-In the first case,
+In the first case,
it allows the specification of a new root in the resource hierarchy.
In the second case,
it uses the resource database associated with the other display.
Index: xsrc/external/mit/libXt/dist/src/NextEvent.c
diff -u xsrc/external/mit/libXt/dist/src/NextEvent.c:1.5 xsrc/external/mit/libXt/dist/src/NextEvent.c:1.6
--- xsrc/external/mit/libXt/dist/src/NextEvent.c:1.5 Sun Nov 21 05:52:58 2010
+++ xsrc/external/mit/libXt/dist/src/NextEvent.c Fri May 31 09:21:05 2013
@@ -75,9 +75,6 @@ in this Software without prior written a
#include <stdio.h>
#include <errno.h>
-#ifdef __UNIXOS2__
-#include <sys/time.h>
-#endif
static TimerEventRec* freeTimerRecs;
static WorkProcRec* freeWorkRecs;
@@ -731,7 +728,14 @@ WaitLoop:
#endif
return dpy_no;
}
- goto WaitLoop;
+ if (block)
+ goto WaitLoop;
+ else {
+#ifdef USE_POLL
+ XtStackFree ((XtPointer) wf.fdlist, fdlist);
+#endif
+ return -1;
+ }
}
#define IeCallProc(ptr) \
Index: xsrc/external/mit/libXt/dist/src/TMparse.c
diff -u xsrc/external/mit/libXt/dist/src/TMparse.c:1.4 xsrc/external/mit/libXt/dist/src/TMparse.c:1.5
--- xsrc/external/mit/libXt/dist/src/TMparse.c:1.4 Sun Nov 21 05:52:58 2010
+++ xsrc/external/mit/libXt/dist/src/TMparse.c Fri May 31 09:21:05 2013
@@ -113,14 +113,14 @@ typedef TMShortCard Value;
typedef void (*ModifierProc)(Value, LateBindingsPtr*, Boolean, Value*);
typedef struct _ModifierRec {
- char* name;
+ const char *name;
XrmQuark signature;
ModifierProc modifierParseProc;
Value value;
} ModifierRec, *ModifierKeys;
typedef struct _EventKey {
- char *event;
+ const char *event;
XrmQuark signature;
EventType eventType;
ParseProc parseDetail;
@@ -128,7 +128,7 @@ typedef struct _EventKey {
}EventKey, *EventKeys;
typedef struct {
- char *name;
+ const char *name;
XrmQuark signature;
Value value;
} NameValueRec, *NameValueTable;
@@ -380,11 +380,7 @@ static EventKey events[] = {
};
-#ifndef __UNIXOS2__
#define IsNewline(str) ((str) == '\n')
-#else
-#define IsNewline(str) ((str) == '\n' || (str) == '\r')
-#endif
#define ScanFor(str, ch) \
while ((*(str) != (ch)) && (*(str) != '\0') && !IsNewline(*(str))) (str)++
@@ -396,13 +392,8 @@ static EventKey events[] = {
('a' <= *(str) && *(str) <= 'z') || \
('0' <= *(str) && *(str) <= '9')) (str)++
-#ifndef __UNIXOS2__
#define ScanWhitespace(str) \
while (*(str) == ' ' || *(str) == '\t') (str)++
-#else
-#define ScanWhitespace(str) \
- while (*(str) == ' ' || *(str) == '\t' || *(str) == '\r') (str)++
-#endif
static Boolean initialized = FALSE;
static XrmQuark QMeta;
@@ -1811,11 +1802,7 @@ static void ShowProduction(
size_t len;
char *eol, *production, productionbuf[500];
-#ifdef __UNIXOS2__
- eol = strchr(currentProduction, '\r');
- if (!eol) /* try '\n' as well below */
-#endif
- eol = strchr(currentProduction, '\n');
+ eol = strchr(currentProduction, '\n');
if (eol) len = eol - currentProduction;
else len = strlen (currentProduction);
production = XtStackAlloc (len + 1, productionbuf);
Index: xsrc/external/mit/libXtst/dist/man/XTestQueryExtension.man
diff -u xsrc/external/mit/libXtst/dist/man/XTestQueryExtension.man:1.4 xsrc/external/mit/libXtst/dist/man/XTestQueryExtension.man:1.5
--- xsrc/external/mit/libXtst/dist/man/XTestQueryExtension.man:1.4 Fri May 31 01:19:45 2013
+++ xsrc/external/mit/libXtst/dist/man/XTestQueryExtension.man Fri May 31 09:21:05 2013
@@ -1,7 +1,7 @@
'\" t
.\" Title: XTest
.\" Author: Kieron Drake
-.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets vsnapshot_9276 <http://docbook.sf.net/>
.\" Date: <pubdate>6 June 2007</pubdate>
.\" Manual: XTST FUNCTIONS
.\" Source: __xorgversion__
Index: xsrc/external/mit/libXtst/dist/src/XRecord.c
diff -u xsrc/external/mit/libXtst/dist/src/XRecord.c:1.2 xsrc/external/mit/libXtst/dist/src/XRecord.c:1.3
--- xsrc/external/mit/libXtst/dist/src/XRecord.c:1.2 Fri May 31 01:37:29 2013
+++ xsrc/external/mit/libXtst/dist/src/XRecord.c Fri May 31 09:21:06 2013
@@ -49,6 +49,9 @@ from The Open Group.
* By Stephen Gildea, X Consortium, and Martha Zimet, NCD.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <assert.h>
#include <X11/Xlibint.h>
@@ -56,6 +59,18 @@ from The Open Group.
#include <X11/extensions/extutil.h>
#include <X11/extensions/recordproto.h>
#include <X11/extensions/record.h>
+#include <limits.h>
+
+#ifndef HAVE__XEATDATAWORDS
+static inline void _XEatDataWords(Display *dpy, unsigned long n)
+{
+# ifndef LONG64
+ if (n >= (ULONG_MAX >> 2))
+ _XIOError(dpy);
+# endif
+ _XEatData (dpy, n << 2);
+}
+#endif
static XExtensionInfo _xrecord_info_data;
static XExtensionInfo *xrecord_info = &_xrecord_info_data;
@@ -405,11 +420,9 @@ XRecordGetContext(Display *dpy, XRecordC
XExtDisplayInfo *info = find_display (dpy);
register xRecordGetContextReq *req;
xRecordGetContextReply rep;
- int count, i, rn;
+ unsigned int count, i, rn;
xRecordRange xrange;
- XRecordRange *ranges = NULL;
xRecordClientInfo xclient_inf;
- XRecordClientInfo **client_inf, *client_inf_str = NULL;
XRecordState *ret;
XRecordCheckExtension (dpy, info, 0);
@@ -427,7 +440,7 @@ XRecordGetContext(Display *dpy, XRecordC
ret = (XRecordState*)Xmalloc(sizeof(XRecordState));
if (!ret) {
- /* XXX - eat data */
+ _XEatDataWords (dpy, rep.length);
UnlockDisplay(dpy);
SyncHandle();
return 0;
@@ -439,18 +452,19 @@ XRecordGetContext(Display *dpy, XRecordC
if (count)
{
- client_inf = (XRecordClientInfo **) Xcalloc(count, sizeof(XRecordClientInfo*));
- ret->client_info = client_inf;
- if (client_inf != NULL) {
- client_inf_str = (XRecordClientInfo *) Xmalloc(count*sizeof(XRecordClientInfo));
+ XRecordClientInfo **client_inf = NULL;
+ XRecordClientInfo *client_inf_str = NULL;
+
+ if (count < (INT_MAX / sizeof(XRecordClientInfo))) {
+ client_inf = Xcalloc(count, sizeof(XRecordClientInfo *));
+ if (client_inf != NULL)
+ client_inf_str = Xmalloc(count * sizeof(XRecordClientInfo));
}
+ ret->client_info = client_inf;
if (!client_inf || !client_inf_str)
{
- for(i = 0; i < count; i++)
- {
- _XEatData (dpy, sizeof(xRecordClientInfo));
- _XEatData (dpy, SIZEOF(xRecordRange)); /* XXX - don't know how many */
- }
+ free(client_inf);
+ _XEatDataWords (dpy, rep.length);
UnlockDisplay(dpy);
XRecordFreeState(ret);
SyncHandle();
@@ -465,11 +479,18 @@ XRecordGetContext(Display *dpy, XRecordC
if (xclient_inf.nRanges)
{
- client_inf_str[i].ranges = (XRecordRange**) Xcalloc(xclient_inf.nRanges, sizeof(XRecordRange*));
- if (client_inf_str[i].ranges != NULL) {
- ranges = (XRecordRange*)
- Xmalloc(xclient_inf.nRanges * sizeof(XRecordRange));
+ XRecordRange *ranges = NULL;
+
+ if (xclient_inf.nRanges < (INT_MAX / sizeof(XRecordRange))) {
+ client_inf_str[i].ranges =
+ Xcalloc(xclient_inf.nRanges, sizeof(XRecordRange *));
+ if (client_inf_str[i].ranges != NULL)
+ ranges =
+ Xmalloc(xclient_inf.nRanges * sizeof(XRecordRange));
}
+ else
+ client_inf_str[i].ranges = NULL;
+
if (!client_inf_str[i].ranges || !ranges) {
/* XXX eat data */
UnlockDisplay(dpy);