libxtst: Changes to 'upstream-unstable'
.gitignore | 11 ++
Makefile.am | 6 -
README | 24 +++++
configure.ac | 17 +--
include/X11/extensions/XTest.h | 146 +++++++++++++++++++++++++++++++
include/X11/extensions/record.h | 183 ++++++++++++++++++++++++++++++++++++++++
man/.gitignore | 7 -
man/Makefile.am | 66 ++++++++------
man/XTest.xml | 16 +--
src/.gitignore | 6 -
src/Makefile.am | 10 +-
src/XRecord.c | 81 +++++------------
src/XTest.c | 109 ++++++-----------------
13 files changed, 489 insertions(+), 193 deletions(-)
New commits:
commit ddc11c4ef1bd0e6c970630dea74f54bb2b0ea893
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Oct 5 11:38:38 2009 +1000
libXtst 1.1.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index 8b624d4..19d167c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
-AC_INIT(libXtst, 1.0.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXtst)
+AC_INIT(libXtst, 1.1.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXtst)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
commit e3d74ecf1a3a7adfeafca8cd02c1da82e95d5eaf
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Oct 5 11:40:53 2009 +1000
Require libXext 1.0.99.4
libXext 1.0.99.1 up to including 1.0.99.3 had the XTest.h header which is
now in this module.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index aed19a0..8b624d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ AC_PATH_PROG([XMLTO], [xmlto])
AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x"])
# Check for dependencies
-PKG_CHECK_MODULES(XTST, x11 xext xi [recordproto >= 1.13.99.1] [xextproto >= 7.0.99.3] inputproto)
+PKG_CHECK_MODULES(XTST, x11 [xext >= 1.0.99.4] xi [recordproto >= 1.13.99.1] [xextproto >= 7.0.99.3] inputproto)
XTST_CFLAGS="$CWARNFLAGS $XTST_CFLAGS"
AC_SUBST(XTST_CFLAGS)
AC_SUBST(XTST_LIBS)
commit 7a9b269ed83c106265896373120603b9c06997f3
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Oct 5 10:38:34 2009 +1000
Require macros 1.3 for XORG_DEFAULT_OPTIONS
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index b090f16..aed19a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,15 +27,15 @@ AC_INIT(libXtst, 1.0.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=x
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
-# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
-m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.2)
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
AM_CONFIG_HEADER(config.h)
# Check for progs
AC_PROG_CC
AC_PROG_LIBTOOL
-XORG_CWARNFLAGS
+XORG_DEFAULT_OPTIONS
# Check for xmlto for man page conversion
# (only needed by people building tarballs)
@@ -54,10 +54,6 @@ XORG_WITH_LINT
XORG_LINT_LIBRARY([Xtst])
LINT_FLAGS="${LINT_FLAGS} ${XTST_CFLAGS}"
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
-
AC_OUTPUT([Makefile
man/Makefile
src/Makefile
commit 9f727168f561c76c5ae6c3115282ac803172e9f8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Aug 25 14:09:47 2009 +1000
Version bump: 1.0.99.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index 2287275..b090f16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
-AC_INIT(libXtst, 1.0.99.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXtst)
+AC_INIT(libXtst, 1.0.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXtst)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
commit 527759ae93ceaafca670995ab97545112f89bfbc
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Aug 18 11:12:37 2009 +1000
Include recordproto.h instead of recordstr.h
diff --git a/src/XRecord.c b/src/XRecord.c
index fe733ff..a0f7c52 100644
--- a/src/XRecord.c
+++ b/src/XRecord.c
@@ -59,7 +59,7 @@ from The Open Group.
#include <X11/Xlibint.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
-#include <X11/extensions/recordstr.h>
+#include <X11/extensions/recordproto.h>
#include <X11/extensions/record.h>
static XExtensionInfo _xrecord_info_data;
commit 849fa907e129575831fbd3fa69249ff843413fd5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Aug 14 14:15:48 2009 +1000
Move record headers to here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index f37b120..2287275 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ AC_PATH_PROG([XMLTO], [xmlto])
AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x"])
# Check for dependencies
-PKG_CHECK_MODULES(XTST, x11 xext xi recordproto [xextproto >= 7.0.99.3] inputproto)
+PKG_CHECK_MODULES(XTST, x11 xext xi [recordproto >= 1.13.99.1] [xextproto >= 7.0.99.3] inputproto)
XTST_CFLAGS="$CWARNFLAGS $XTST_CFLAGS"
AC_SUBST(XTST_CFLAGS)
AC_SUBST(XTST_LIBS)
diff --git a/include/X11/extensions/record.h b/include/X11/extensions/record.h
new file mode 100644
index 0000000..e82b06c
--- /dev/null
+++ b/include/X11/extensions/record.h
@@ -0,0 +1,183 @@
+/***************************************************************************
+ * Copyright 1995 Network Computing Devices
+ *
+ * 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, and that the name of Network Computing Devices
+ * not be used in advertising or publicity pertaining to distribution
+ * of the software without specific, written prior permission.
+ *
+ * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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.
+ **************************************************************************/
+
+#ifndef _RECORD_H_
+#define _RECORD_H_
+
+#include <X11/extensions/recordconst.h>
+
+typedef unsigned long XRecordClientSpec;
+typedef unsigned long XRecordContext;
+
+typedef struct
+{
+ unsigned char first;
+ unsigned char last;
+} XRecordRange8;
+
+typedef struct
+{
+ unsigned short first;
+ unsigned short last;
+} XRecordRange16;
+
+typedef struct
+{
+ XRecordRange8 ext_major;
+ XRecordRange16 ext_minor;
+} XRecordExtRange;
+
+typedef struct
+{
+ XRecordRange8 core_requests; /* core X requests */
+ XRecordRange8 core_replies; /* core X replies */
+ XRecordExtRange ext_requests; /* extension requests */
+ XRecordExtRange ext_replies; /* extension replies */
+ XRecordRange8 delivered_events; /* delivered core and ext events */
+ XRecordRange8 device_events; /* all core and ext device events */
+ XRecordRange8 errors; /* core X and ext errors */
+ Bool client_started; /* connection setup reply */
+ Bool client_died; /* notice of client disconnect */
+} XRecordRange;
+
+typedef struct
+{
+ XRecordClientSpec client;
+ unsigned long nranges;
+ XRecordRange **ranges;
+} XRecordClientInfo;
+
+typedef struct
+{
+ Bool enabled;
+ int datum_flags;
+ unsigned long nclients;
+ XRecordClientInfo **client_info;
+} XRecordState;
+
+typedef struct
+{
+ XID id_base;
+ Time server_time;
+ unsigned long client_seq;
+ int category;
+ Bool client_swapped;
+ unsigned char *data;
+ unsigned long data_len; /* in 4-byte units */
+} XRecordInterceptData;
+
+_XFUNCPROTOBEGIN
+
+/*********************************************************
+ *
+ * Prototypes
+ *
+ */
+
+XID XRecordIdBaseMask(
+ Display *dpy
+);
+
+extern Status XRecordQueryVersion(
+ Display* /* dpy */,
+ int* /* cmajor_return */,
+ int* /* cminor_return */
+);
+
+extern XRecordContext XRecordCreateContext(
+ Display* /* dpy */,
+ int /* datum_flags */,
+ XRecordClientSpec* /* clients */,
+ int /* nclients */,
+ XRecordRange** /* ranges */,
+ int /* nranges */
+);
+
+extern XRecordRange *XRecordAllocRange(
+ void
+);
+
+extern Status XRecordRegisterClients(
+ Display* /* dpy */,
+ XRecordContext /* context */,
+ int /* datum_flags */,
+ XRecordClientSpec* /* clients */,
+ int /* nclients */,
+ XRecordRange** /* ranges */,
+ int /* nranges */
+);
+
+extern Status XRecordUnregisterClients(
+ Display* /* dpy */,
+ XRecordContext /* context */,
+ XRecordClientSpec* /* clients */,
+ int /* nclients */
+);
+
+extern Status XRecordGetContext(
+ Display* /* dpy */,
+ XRecordContext /* context */,
+ XRecordState** /* state_return */
+);
+
+extern void XRecordFreeState(
+XRecordState* /* state */
+);
+
+typedef void (*XRecordInterceptProc) (
+ XPointer /* closure */,
+ XRecordInterceptData* /* recorded_data */
+);
+
+extern Status XRecordEnableContext(
+ Display* /* dpy */,
+ XRecordContext /* context */,
+ XRecordInterceptProc /* callback */,
+ XPointer /* closure */
+);
+
+extern Status XRecordEnableContextAsync(
+ Display* /* dpy */,
+ XRecordContext /* context */,
+ XRecordInterceptProc /* callback */,
+ XPointer /* closure */
+);
+
+extern void XRecordProcessReplies(
+ Display* /* dpy */
+);
+
+extern void XRecordFreeData(
+XRecordInterceptData* /* data */
+);
+
+extern Status XRecordDisableContext(
+ Display* /* dpy */,
+ XRecordContext /* context */
+);
+
+extern Status XRecordFreeContext(
+ Display* /* dpy */,
+ XRecordContext /* context */
+);
+
+_XFUNCPROTOEND
+
+#endif
diff --git a/src/Makefile.am b/src/Makefile.am
index e8594c7..a2f3db0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,7 +14,8 @@ AM_CFLAGS=\
libXtst_la_LDFLAGS = -version-number 6:1:0 -no-undefined
libXtstincludedir = $(includedir)/X11/extensions
-libXtstinclude_HEADERS = $(top_srcdir)/include/X11/extensions/XTest.h
+libXtstinclude_HEADERS = $(top_srcdir)/include/X11/extensions/XTest.h \
+ $(top_srcdir)/include/X11/extensions/record.h
if LINT
ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
diff --git a/src/XRecord.c b/src/XRecord.c
index 2d76f5c..fe733ff 100644
--- a/src/XRecord.c
+++ b/src/XRecord.c
@@ -60,6 +60,7 @@ from The Open Group.
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
#include <X11/extensions/recordstr.h>
+#include <X11/extensions/record.h>
static XExtensionInfo _xrecord_info_data;
static XExtensionInfo *xrecord_info = &_xrecord_info_data;
commit 1c928d9c138c90512d534e67e96bced247ca3241
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Aug 14 15:00:15 2009 +1000
XRecord: avoid use of uninitialised variables.
Both variables are initialized inside an if condition but later checked for
NULL.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/XRecord.c b/src/XRecord.c
index 9c6fe87..2d76f5c 100644
--- a/src/XRecord.c
+++ b/src/XRecord.c
@@ -411,9 +411,9 @@ XRecordGetContext(Display *dpy, XRecordContext context,
xRecordGetContextReply rep;
int count, i, rn;
xRecordRange xrange;
- XRecordRange *ranges;
+ XRecordRange *ranges = NULL;
xRecordClientInfo xclient_inf;
- XRecordClientInfo **client_inf, *client_inf_str;
+ XRecordClientInfo **client_inf, *client_inf_str = NULL;
XRecordState *ret;
XRecordCheckExtension (dpy, info, 0);
commit c0404c6db9a8eacc07d140093982b910e54e3f97
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Jul 22 20:34:51 2009 +1000
Version bump: 1.0.99.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index e29cbda..f37b120 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
-AC_INIT(libXtst, 1.0.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXtst)
+AC_INIT(libXtst, 1.0.99.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXtst)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
commit 3f4b895a29b1b48336621e6dcc80831a5910bed9
Author: Magnus Kessler <Magnus.Kessler@gmx.net>
Date: Wed Jul 22 09:29:16 2009 +0100
Rename xtest.h to xtestconst.h to avoid a collision with XTest.h on case-insensitive filesystems
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index 0f0b33e..e29cbda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ AC_PATH_PROG([XMLTO], [xmlto])
AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x"])
# Check for dependencies
-PKG_CHECK_MODULES(XTST, x11 xext xi recordproto [xextproto >= 7.0.99.1] inputproto)
+PKG_CHECK_MODULES(XTST, x11 xext xi recordproto [xextproto >= 7.0.99.3] inputproto)
XTST_CFLAGS="$CWARNFLAGS $XTST_CFLAGS"
AC_SUBST(XTST_CFLAGS)
AC_SUBST(XTST_LIBS)
diff --git a/include/X11/extensions/XTest.h b/include/X11/extensions/XTest.h
index f27407a..aad9420 100644
--- a/include/X11/extensions/XTest.h
+++ b/include/X11/extensions/XTest.h
@@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group.
#define _XTEST_H_
#include <X11/Xfuncproto.h>
-#include <X11/extensions/xtest.h>
+#include <X11/extensions/xtestconst.h>
#include <X11/extensions/XInput.h>
_XFUNCPROTOBEGIN
commit ab9ad139b1f20866405ddcc44d25b7b141cd7bce
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Jul 20 13:26:45 2009 +1000
Move XTest.h header from xextproto/libXext to here.
XTest.h was in xextproto until xextproto-7.1 and did a short but whoefully
misguided visit to libXext during the cleanup of the xextproto headers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/include/X11/extensions/XTest.h b/include/X11/extensions/XTest.h
new file mode 100644
index 0000000..f27407a
--- /dev/null
+++ b/include/X11/extensions/XTest.h
@@ -0,0 +1,146 @@
+/* $Xorg: XTest.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */
+/*
+
+Copyright 1992, 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/include/extensions/XTest.h,v 3.3 2001/12/14 19:53:28 dawes Exp $ */
+
+#ifndef _XTEST_H_
+#define _XTEST_H_
+
+#include <X11/Xfuncproto.h>
+#include <X11/extensions/xtest.h>
+#include <X11/extensions/XInput.h>
+
+_XFUNCPROTOBEGIN
+
+Bool XTestQueryExtension(
+ Display* /* dpy */,
+ int* /* event_basep */,
+ int* /* error_basep */,
+ int* /* majorp */,
+ int* /* minorp */
+);
+
+Bool XTestCompareCursorWithWindow(
+ Display* /* dpy */,
+ Window /* window */,
+ Cursor /* cursor */
+);
+
+Bool XTestCompareCurrentCursorWithWindow(
+ Display* /* dpy */,
+ Window /* window */
+);
+
+extern int XTestFakeKeyEvent(
+ Display* /* dpy */,
+ unsigned int /* keycode */,
+ Bool /* is_press */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeButtonEvent(
+ Display* /* dpy */,
+ unsigned int /* button */,
+ Bool /* is_press */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeMotionEvent(
+ Display* /* dpy */,
+ int /* screen */,
+ int /* x */,
+ int /* y */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeRelativeMotionEvent(
+ Display* /* dpy */,
+ int /* x */,
+ int /* y */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeDeviceKeyEvent(
+ Display* /* dpy */,
+ XDevice* /* dev */,
+ unsigned int /* keycode */,
+ Bool /* is_press */,
+ int* /* axes */,
+ int /* n_axes */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeDeviceButtonEvent(
+ Display* /* dpy */,
+ XDevice* /* dev */,
+ unsigned int /* button */,
+ Bool /* is_press */,
+ int* /* axes */,
+ int /* n_axes */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeProximityEvent(
+ Display* /* dpy */,
+ XDevice* /* dev */,
+ Bool /* in_prox */,
+ int* /* axes */,
+ int /* n_axes */,
+ unsigned long /* delay */
+);
+
+extern int XTestFakeDeviceMotionEvent(
+ Display* /* dpy */,
+ XDevice* /* dev */,
+ Bool /* is_relative */,
+ int /* first_axis */,
+ int* /* axes */,
+ int /* n_axes */,
+ unsigned long /* delay */
+);
+
+extern int XTestGrabControl(
+ Display* /* dpy */,
+ Bool /* impervious */
+);
+
+void XTestSetGContextOfGC(
+ GC /* gc */,
+ GContext /* gid */
+);
+
+void XTestSetVisualIDOfVisual(
+ Visual* /* visual */,
+ VisualID /* visualid */
+);
+
+Status XTestDiscard(
+ Display* /* dpy */
+);
+
+_XFUNCPROTOEND
+
+#endif
diff --git a/src/Makefile.am b/src/Makefile.am
index 7e3a901..e8594c7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,10 +5,17 @@ libXtst_la_SOURCES = \
XTest.c
libXtst_la_LIBADD = @XTST_LIBS@
-AM_CFLAGS = @XTST_CFLAGS@
+
+AM_CFLAGS=\
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/include/X11/extensions\
+ @XTST_CFLAGS@
libXtst_la_LDFLAGS = -version-number 6:1:0 -no-undefined
+libXtstincludedir = $(includedir)/X11/extensions
+libXtstinclude_HEADERS = $(top_srcdir)/include/X11/extensions/XTest.h
+
if LINT
ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS)
commit a119baf3c5aa4f035040e0b991e99e6b382b9670
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jul 16 09:41:33 2009 +1000
Include xtestproto.h, not xteststr.h
Require xextproto 7.0.99.1.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index 61d4bc3..0f0b33e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ AC_PATH_PROG([XMLTO], [xmlto])
AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x"])
# Check for dependencies
-PKG_CHECK_MODULES(XTST, x11 xext xi recordproto xextproto inputproto)
+PKG_CHECK_MODULES(XTST, x11 xext xi recordproto [xextproto >= 7.0.99.1] inputproto)
XTST_CFLAGS="$CWARNFLAGS $XTST_CFLAGS"
AC_SUBST(XTST_CFLAGS)
AC_SUBST(XTST_LIBS)
diff --git a/src/XTest.c b/src/XTest.c
index 45f593e..ed45e41 100644
--- a/src/XTest.c
+++ b/src/XTest.c
@@ -35,7 +35,7 @@ from The Open Group.
#define NEED_REPLIES
#include <X11/Xlibint.h>
#include <X11/extensions/XTest.h>
-#include <X11/extensions/xteststr.h>
+#include <X11/extensions/xtestproto.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
#include <X11/extensions/XInput.h>
commit 378db00ee91a11629666fc1c5e5a5e13c65ffefc
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Mon Feb 2 20:34:37 2009 -0800
Add README with pointers to mailing list, bugzilla & git repos
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
diff --git a/README b/README
index e69de29..eed8652 100644
--- a/README
+++ b/README
@@ -0,0 +1,24 @@
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/lib/libXtst
+
+ http://cgit.freedesktop.org/xorg/lib/libXtst
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
commit 3237cc5b45a41ffe93ebde10b1090a7f2db6f88e
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date: Fri Jan 30 20:41:31 2009 -0200
Janitor: ansification, make distcheck, compiler warnings.
Manual page generation, and xmlto handling, shamelessly cut&paste'd
from libXi/man/Makefile.am, so that make distcheck will work.
diff --git a/.gitignore b/.gitignore
index bf285fe..c085562 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.deps
+.libs
aclocal.m4
autom4te.cache
compile
@@ -19,4 +21,13 @@ missing
mkinstalldirs
stamp-h1
xtst.pc
+x.stamp
*~
+*.3
+*.la
+*.lo
+*.man
+*.o
+libXtst-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 49b5ec3..7e9ac81 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,13 +24,13 @@ SUBDIRS = src man
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xtst.pc
-EXTRA_DIST = xtst.pc.in autogen.sh ChangeLog
+EXTRA_DIST = xtst.pc.in ChangeLog
MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog
ChangeLog:
- (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+ $(CHANGELOG_CMD)
dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index b310518..61d4bc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,11 +27,15 @@ AC_INIT(libXtst, 1.0.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
+# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.2)
AM_CONFIG_HEADER(config.h)
# Check for progs
AC_PROG_CC
AC_PROG_LIBTOOL
+XORG_CWARNFLAGS
# Check for xmlto for man page conversion
# (only needed by people building tarballs)
@@ -41,17 +45,18 @@ AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x"])
# Check for dependencies
PKG_CHECK_MODULES(XTST, x11 xext xi recordproto xextproto inputproto)
+XTST_CFLAGS="$CWARNFLAGS $XTST_CFLAGS"
+AC_SUBST(XTST_CFLAGS)
+AC_SUBST(XTST_LIBS)
dnl Allow checking code with lint, sparse, etc.
XORG_WITH_LINT
XORG_LINT_LIBRARY([Xtst])
LINT_FLAGS="${LINT_FLAGS} ${XTST_CFLAGS}"
-AC_SUBST(XTST_CFLAGS)
-AC_SUBST(XTST_LIBS)
-
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile
man/Makefile
diff --git a/man/.gitignore b/man/.gitignore
deleted file mode 100644
index 74c6b15..0000000
--- a/man/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-shadows.DONE
-*.3
-*~
-*.man
-*.__libmansuffix__
-Makefile
-Makefile.in
diff --git a/man/Makefile.am b/man/Makefile.am
index 6a5291a..17553a4 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -28,30 +28,30 @@ libmandir = $(LIB_MAN_DIR)
LIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%)
-libman_xml = $(srcdir)/XTest.xml
-
-XTest_manpages = \
- XTestQueryExtension \
- XTestCompareCursorWithWindow \
- XTestCompareCurrentCursorWithWindow \
- XTestFakeKeyEvent \
- XTestFakeButtonEvent \
- XTestFakeMotionEvent \
- XTestFakeRelativeMotionEvent \
- XTestGrabControl \
- XTestSetGContextOfGC \
- XTestSetVisualIDOfVisual \
- XTestDiscard
-
-libman_PRE = $(XTest_manpages:%=%.man)
-
-EXTRA_DIST = $(libman_PRE) $(libman_xml)
+libman_xml = XTest.xml
+
+libman_PRE = \
+ XTestQueryExtension.man \
+ XTestCompareCursorWithWindow.man \
+ XTestCompareCurrentCursorWithWindow.man \
+ XTestFakeKeyEvent.man \
+ XTestFakeButtonEvent.man \
+ XTestFakeMotionEvent.man \
+ XTestFakeRelativeMotionEvent.man \
+ XTestGrabControl.man \
+ XTestSetGContextOfGC.man \
+ XTestSetVisualIDOfVisual.man \
+ XTestDiscard.man
+
+EXTRA_DIST = $(libman_PRE) $(libman_xml) x.stamp
CLEANFILES = $(libman_DATA) $(BUILT_SOURCES)
MAINTAINERCLEANFILES = $(libman_PRE)
+if HAVE_XMLTO
libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@)
+endif
SED = sed
@@ -72,20 +72,25 @@ SUFFIXES = .$(LIB_MAN_SUFFIX) .man
.man.$(LIB_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
-# Generate nroff sources from DocBook/xml
-
-dist-hook: $(libman_PRE)
-
+# This is ugly, but handling of tools with multiple outputs in make is a
+# huge PITA. The commands below are taken from the automake manual:
+# http://www.gnu.org/software/automake/manual/automake.html#Multiple-Outputs
if HAVE_XMLTO
-# The .PHONY intermediate target exists to make parallel builds work.
-.PHONY: do_xmlto_stage
-
-$(libman_PRE): do_xmlto_stage
-
-do_xmlto_stage: $(libman_xml)
- $(XMLTO) man $(libman_xml)
- for m in $(XTest_manpages); do \
- mv -f $$m.__libmansuffix__ $$m.man ; \
+x.stamp: $(libman_xml)
+ @rm -f x.tmp
+ @touch x.tmp
+ $(XMLTO) man $^
+ @for man in $(libman_PRE); do \
+ out=`echo $$man | sed 's/\.man/.__libmansuffix__/'`; \
+ echo mv -f $$out $$man; \
+ mv -f $$out $$man || exit 1; \
done
-
-endif HAVE_XMLTO
+ @mv -f x.tmp $@
+$(libman_PRE): x.stamp
+ @if test -f $@; then :; else \
+ rm -f $<; \
+ $(MAKE) $(AM_MAKEFLAGS) $<; \
+ fi
+CLEANFILES += x.tmp
+MAINTAINERCLEANFILES += x.stamp
+endif # HAVE_XMLTO
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index 4fcb96e..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-libXtst.la
-*.lo
-Makefile
-Makefile.in
diff --git a/src/XRecord.c b/src/XRecord.c
index 5d2623e..9c6fe87 100644
--- a/src/XRecord.c
+++ b/src/XRecord.c
@@ -251,16 +251,13 @@ SendRange(
**************************************************************************/
XID
-XRecordIdBaseMask(dpy)
- Display *dpy;
+XRecordIdBaseMask(Display *dpy)
{
return 0x1fffffff & ~dpy->resource_mask;
}
Status
-XRecordQueryVersion (dpy, cmajor_return, cminor_return)
- Display *dpy;
- int *cmajor_return, *cminor_return;
+XRecordQueryVersion(Display *dpy, int *cmajor_return, int *cminor_return)
{
XExtDisplayInfo *info = find_display (dpy);
register xRecordQueryVersionReq *req;
@@ -288,13 +285,9 @@ XRecordQueryVersion (dpy, cmajor_return, cminor_return)
}
XRecordContext
-XRecordCreateContext(dpy, datum_flags, clients, nclients, ranges, nranges)
- Display *dpy;
- int datum_flags;
- XRecordClientSpec *clients;
- int nclients;
- XRecordRange **ranges;
- int nranges;
+XRecordCreateContext(Display *dpy, int datum_flags,
+ XRecordClientSpec *clients, int nclients,
+ XRecordRange **ranges, int nranges)
{
XExtDisplayInfo *info = find_display (dpy);
register xRecordCreateContextReq *req;
@@ -322,20 +315,15 @@ XRecordCreateContext(dpy, datum_flags, clients, nclients, ranges, nranges)
}
XRecordRange *
-XRecordAllocRange()
+XRecordAllocRange(void)
{
return (XRecordRange*)Xcalloc(1, sizeof(XRecordRange));
}
Status
-XRecordRegisterClients(dpy, context, datum_flags, clients, nclients, ranges, nranges)
- Display *dpy;
Reply to: