summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/xprop/ChangeLog106
-rw-r--r--app/xprop/aclocal.m464
-rw-r--r--app/xprop/compile2
-rw-r--r--app/xprop/configure104
-rw-r--r--app/xprop/configure.ac4
-rw-r--r--app/xprop/dsimple.c8
-rw-r--r--app/xprop/dsimple.h2
-rw-r--r--app/xprop/man/xprop.man5
-rw-r--r--app/xprop/xprop.c69
9 files changed, 274 insertions, 90 deletions
diff --git a/app/xprop/ChangeLog b/app/xprop/ChangeLog
index 7e84e5d93..cee7b217a 100644
--- a/app/xprop/ChangeLog
+++ b/app/xprop/ChangeLog
@@ -1,3 +1,109 @@
+commit ded6efa3da1ce611e4668d7766e934a239f6120c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Mar 9 18:21:47 2018 -0800
+
+ xprop 1.2.3
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 331ab01ac2ccb7aea7084c4907a47291ae549e1d
+Author: Mihail Konev <k.mvc@ya.ru>
+Date: Thu Jan 26 14:00:21 2017 +1000
+
+ autogen: add default patch prefix
+
+ Signed-off-by: Mihail Konev <k.mvc@ya.ru>
+
+commit 78e28685ad86facdbf94de607050f3b2f1752d12
+Author: Emil Velikov <emil.l.velikov@gmail.com>
+Date: Mon Mar 9 12:00:52 2015 +0000
+
+ autogen.sh: use quoted string variables
+
+ Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
+ fall-outs, when they contain space.
+
+ Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
+ Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 44f2605cfecbf5b30677b6414389d8987c9dc59d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Jan 24 10:32:07 2017 +1000
+
+ autogen.sh: use exec instead of waiting for configure to finish
+
+ Syncs the invocation of configure with the one from the server.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit fa732adbbf5e29f4bb230e9b7c0c91ccb4b5af7e
+Author: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
+Date: Fri May 22 11:10:05 2015 +0200
+
+ Free the data returned by Format_Icons()
+
+ Signed-off-by: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
+
+commit 52c9aa32c8f1b787de7b68d9bb843fa7270cbaaf
+Author: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
+Date: Fri May 22 11:10:03 2015 +0200
+
+ Free the data returned by XGetWindowProperty()
+
+ Signed-off-by: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
+
+commit dee1d0c1316b1c62c6c62d6f0f4b13685e8e6630
+Author: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
+Date: Fri May 22 11:10:04 2015 +0200
+
+ Free the data returned by XListProperties()
+
+ Signed-off-by: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
+
+commit 4f748e3d2b1368ec0590a413ba5f7addc5e3344f
+Author: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
+Date: Fri May 22 11:10:02 2015 +0200
+
+ Free the thunks used by Show_Prop
+
+ Signed-off-by: Eirik Byrkjeflot Anonsen <eirik@eirikba.org>
+
+commit b0ae4b903067017ec7dc19f27d3916d2153410af
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue Jun 3 18:29:44 2014 -0700
+
+ Add -version option to print program version
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit faa4fa7785addc2170d4de7bf13d377324597e99
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue Jun 3 18:26:19 2014 -0700
+
+ Print which option was in error along with usage message
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 5d4c35a6ad0823f9c921058fa6efb972b29da2d8
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue Jun 3 17:47:13 2014 -0700
+
+ autogen.sh: Honor NOCONFIGURE=1
+
+ See http://people.gnome.org/~walters/docs/build-api.txt
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 678692d91e1b03aa27f8d924744be8a04adf5b41
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue Jun 3 17:47:13 2014 -0700
+
+ configure: Drop AM_MAINTAINER_MODE
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
commit 9e0f57f6a271313d1b49b5019753b4410f407cc5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Aug 8 20:04:00 2013 -0700
diff --git a/app/xprop/aclocal.m4 b/app/xprop/aclocal.m4
index c0dbcfb1f..8bef9a948 100644
--- a/app/xprop/aclocal.m4
+++ b/app/xprop/aclocal.m4
@@ -1242,7 +1242,7 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl
-dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
@@ -1279,7 +1279,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.19.0])
+m4_define([vers_have], [1.19.2])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1357,6 +1357,17 @@ AC_DEFUN([XORG_MANPAGE_SECTIONS],[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_SED])
+case $host_os in
+ solaris*)
+ # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
+ # check for a man page file found in later versions that use
+ # traditional section numbers instead
+ AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
+ [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
+ ;;
+ *) SYSV_MAN_SECTIONS=false ;;
+esac
+
if test x$APP_MAN_SUFFIX = x ; then
APP_MAN_SUFFIX=1
fi
@@ -1372,9 +1383,9 @@ if test x$LIB_MAN_DIR = x ; then
fi
if test x$FILE_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) FILE_MAN_SUFFIX=4 ;;
- *) FILE_MAN_SUFFIX=5 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) FILE_MAN_SUFFIX=4 ;;
+ *) FILE_MAN_SUFFIX=5 ;;
esac
fi
if test x$FILE_MAN_DIR = x ; then
@@ -1382,9 +1393,9 @@ if test x$FILE_MAN_DIR = x ; then
fi
if test x$MISC_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) MISC_MAN_SUFFIX=5 ;;
- *) MISC_MAN_SUFFIX=7 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) MISC_MAN_SUFFIX=5 ;;
+ *) MISC_MAN_SUFFIX=7 ;;
esac
fi
if test x$MISC_MAN_DIR = x ; then
@@ -1392,9 +1403,9 @@ if test x$MISC_MAN_DIR = x ; then
fi
if test x$DRIVER_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) DRIVER_MAN_SUFFIX=7 ;;
- *) DRIVER_MAN_SUFFIX=4 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) DRIVER_MAN_SUFFIX=7 ;;
+ *) DRIVER_MAN_SUFFIX=4 ;;
esac
fi
if test x$DRIVER_MAN_DIR = x ; then
@@ -1402,9 +1413,9 @@ if test x$DRIVER_MAN_DIR = x ; then
fi
if test x$ADMIN_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) ADMIN_MAN_SUFFIX=1m ;;
- *) ADMIN_MAN_SUFFIX=8 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) ADMIN_MAN_SUFFIX=1m ;;
+ *) ADMIN_MAN_SUFFIX=8 ;;
esac
fi
if test x$ADMIN_MAN_DIR = x ; then
@@ -1665,13 +1676,24 @@ m4_ifval([$1],
fi])
# Test for the ability of xmlto to generate a text target
+#
+# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
+# following test for empty XML docbook files.
+# For compatibility reasons use the following empty XML docbook file and if
+# it fails try it again with a non-empty XML file.
have_xmlto_text=no
cat > conftest.xml << "EOF"
EOF
AS_IF([test "$have_xmlto" = yes],
[AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
[have_xmlto_text=yes],
- [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+ [# Try it again with a non-empty XML file.
+ cat > conftest.xml << "EOF"
+<x></x>
+EOF
+ AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+ [have_xmlto_text=yes],
+ [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
rm -f conftest.xml
AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
@@ -3067,8 +3089,9 @@ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
+touch \$(top_srcdir)/INSTALL; \
+echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
AC_SUBST([INSTALL_CMD])
]) # XORG_INSTALL
dnl Copyright 2005 Red Hat, Inc
@@ -3129,10 +3152,11 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
#
#
AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
-|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
+|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
+touch \$(top_srcdir)/ChangeLog; \
+echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
AC_SUBST([CHANGELOG_CMD])
]) # XORG_CHANGELOG
diff --git a/app/xprop/compile b/app/xprop/compile
index 531136b06..a85b723c7 100644
--- a/app/xprop/compile
+++ b/app/xprop/compile
@@ -3,7 +3,7 @@
scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
diff --git a/app/xprop/configure b/app/xprop/configure
index 078a7b74b..3b572a876 100644
--- a/app/xprop/configure
+++ b/app/xprop/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xprop 1.2.2.
+# Generated by GNU Autoconf 2.69 for xprop 1.2.3.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -581,8 +581,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xprop'
PACKAGE_TARNAME='xprop'
-PACKAGE_VERSION='1.2.2'
-PACKAGE_STRING='xprop 1.2.2'
+PACKAGE_VERSION='1.2.3'
+PACKAGE_STRING='xprop 1.2.3'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@@ -1318,7 +1318,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xprop 1.2.2 to adapt to many kinds of systems.
+\`configure' configures xprop 1.2.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1388,7 +1388,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xprop 1.2.2:";;
+ short | recursive ) echo "Configuration of xprop 1.2.3:";;
esac
cat <<\_ACEOF
@@ -1504,7 +1504,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xprop configure 1.2.2
+xprop configure 1.2.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1852,7 +1852,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xprop $as_me 1.2.2, which was
+It was created by xprop $as_me 1.2.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2681,7 +2681,7 @@ fi
# Define the identity of the package.
PACKAGE='xprop'
- VERSION='1.2.2'
+ VERSION='1.2.3'
cat >>confdefs.h <<_ACEOF
@@ -10348,10 +10348,11 @@ _ACEOF
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
-|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
+|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
+touch \$(top_srcdir)/ChangeLog; \
+echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
@@ -10359,14 +10360,45 @@ echo 'git directory not found: installing possibly empty changelog.' >&2)"
macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
+touch \$(top_srcdir)/INSTALL; \
+echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
+case $host_os in
+ solaris*)
+ # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
+ # check for a man page file found in later versions that use
+ # traditional section numbers instead
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5
+$as_echo_n "checking for /usr/share/man/man7/attributes.7... " >&6; }
+if ${ac_cv_file__usr_share_man_man7_attributes_7+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ test "$cross_compiling" = yes &&
+ as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "/usr/share/man/man7/attributes.7"; then
+ ac_cv_file__usr_share_man_man7_attributes_7=yes
+else
+ ac_cv_file__usr_share_man_man7_attributes_7=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5
+$as_echo "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; }
+if test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes; then :
+ SYSV_MAN_SECTIONS=false
+else
+ SYSV_MAN_SECTIONS=true
+fi
+
+ ;;
+ *) SYSV_MAN_SECTIONS=false ;;
+esac
+
if test x$APP_MAN_SUFFIX = x ; then
APP_MAN_SUFFIX=1
fi
@@ -10382,9 +10414,9 @@ if test x$LIB_MAN_DIR = x ; then
fi
if test x$FILE_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) FILE_MAN_SUFFIX=4 ;;
- *) FILE_MAN_SUFFIX=5 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) FILE_MAN_SUFFIX=4 ;;
+ *) FILE_MAN_SUFFIX=5 ;;
esac
fi
if test x$FILE_MAN_DIR = x ; then
@@ -10392,9 +10424,9 @@ if test x$FILE_MAN_DIR = x ; then
fi
if test x$MISC_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) MISC_MAN_SUFFIX=5 ;;
- *) MISC_MAN_SUFFIX=7 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) MISC_MAN_SUFFIX=5 ;;
+ *) MISC_MAN_SUFFIX=7 ;;
esac
fi
if test x$MISC_MAN_DIR = x ; then
@@ -10402,9 +10434,9 @@ if test x$MISC_MAN_DIR = x ; then
fi
if test x$DRIVER_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) DRIVER_MAN_SUFFIX=7 ;;
- *) DRIVER_MAN_SUFFIX=4 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) DRIVER_MAN_SUFFIX=7 ;;
+ *) DRIVER_MAN_SUFFIX=4 ;;
esac
fi
if test x$DRIVER_MAN_DIR = x ; then
@@ -10412,9 +10444,9 @@ if test x$DRIVER_MAN_DIR = x ; then
fi
if test x$ADMIN_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) ADMIN_MAN_SUFFIX=1m ;;
- *) ADMIN_MAN_SUFFIX=8 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) ADMIN_MAN_SUFFIX=1m ;;
+ *) ADMIN_MAN_SUFFIX=8 ;;
esac
fi
if test x$ADMIN_MAN_DIR = x ; then
@@ -10518,12 +10550,12 @@ if test -n "$XPROP_CFLAGS"; then
pkg_cv_XPROP_CFLAGS="$XPROP_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xproto >= 7.0.17\""; } >&5
- ($PKG_CONFIG --exists --print-errors "x11 xproto >= 7.0.17") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xproto >= 7.0.25\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "x11 xproto >= 7.0.25") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_XPROP_CFLAGS=`$PKG_CONFIG --cflags "x11 xproto >= 7.0.17" 2>/dev/null`
+ pkg_cv_XPROP_CFLAGS=`$PKG_CONFIG --cflags "x11 xproto >= 7.0.25" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -10535,12 +10567,12 @@ if test -n "$XPROP_LIBS"; then
pkg_cv_XPROP_LIBS="$XPROP_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xproto >= 7.0.17\""; } >&5
- ($PKG_CONFIG --exists --print-errors "x11 xproto >= 7.0.17") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xproto >= 7.0.25\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "x11 xproto >= 7.0.25") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_XPROP_LIBS=`$PKG_CONFIG --libs "x11 xproto >= 7.0.17" 2>/dev/null`
+ pkg_cv_XPROP_LIBS=`$PKG_CONFIG --libs "x11 xproto >= 7.0.25" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -10561,14 +10593,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- XPROP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11 xproto >= 7.0.17" 2>&1`
+ XPROP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11 xproto >= 7.0.25" 2>&1`
else
- XPROP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11 xproto >= 7.0.17" 2>&1`
+ XPROP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11 xproto >= 7.0.25" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$XPROP_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (x11 xproto >= 7.0.17) were not met:
+ as_fn_error $? "Package requirements (x11 xproto >= 7.0.25) were not met:
$XPROP_PKG_ERRORS
@@ -11247,7 +11279,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xprop $as_me 1.2.2, which was
+This file was extended by xprop $as_me 1.2.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11313,7 +11345,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-xprop config.status 1.2.2
+xprop config.status 1.2.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/app/xprop/configure.ac b/app/xprop/configure.ac
index c0add2e57..805402b14 100644
--- a/app/xprop/configure.ac
+++ b/app/xprop/configure.ac
@@ -22,7 +22,7 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([xprop], [1.2.2],
+AC_INIT([xprop], [1.2.3],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xprop])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
@@ -40,7 +40,7 @@ XORG_DEFAULT_OPTIONS
AC_CHECK_HEADERS([wchar.h wctype.h langinfo.h])
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XPROP, [x11 xproto >= 7.0.17])
+PKG_CHECK_MODULES(XPROP, [x11 xproto >= 7.0.25])
XORG_WITH_LINT
diff --git a/app/xprop/dsimple.c b/app/xprop/dsimple.c
index 669d02e72..d721e4634 100644
--- a/app/xprop/dsimple.c
+++ b/app/xprop/dsimple.c
@@ -75,7 +75,7 @@ char *Get_Display_Name(
char *arg = argv[i];
if (!strcmp (arg, "-display") || !strcmp (arg, "-d")) {
- if (++i >= argc) usage ();
+ if (++i >= argc) usage ("-display requires an argument");
displayname = argv[i];
*pargc -= 2;
@@ -196,7 +196,7 @@ Window Select_Window_Args(
nargv = argv+1; argc = ARGC;
#define OPTION argv[0]
#define NXTOPTP ++argv, --argc>0
-#define NXTOPT if (++argv, --argc==0) usage()
+#define NXTOPT(arg) if (++argv, --argc==0) usage(arg " requires an argument")
#define COPYOPT nargv++[0]=OPTION, nargc++
while (NXTOPTP) {
@@ -211,7 +211,7 @@ Window Select_Window_Args(
continue;
}
if (!strcmp(OPTION, "-name")) {
- NXTOPT;
+ NXTOPT("-name");
w = Window_With_Name(dpy, RootWindow(dpy, screen),
OPTION);
if (!w)
@@ -219,7 +219,7 @@ Window Select_Window_Args(
continue;
}
if (!strcmp(OPTION, "-id")) {
- NXTOPT;
+ NXTOPT("-id");
w=0;
sscanf(OPTION, "0x%lx", &w);
if (!w)
diff --git a/app/xprop/dsimple.h b/app/xprop/dsimple.h
index ee12c6d6c..de934f4b5 100644
--- a/app/xprop/dsimple.h
+++ b/app/xprop/dsimple.h
@@ -64,7 +64,7 @@ void Setup_Display_And_Screen(int *, char **);
void Close_Display(void);
XFontStruct *Open_Font(const char *);
Window Select_Window_Args(int *, char **);
-void usage(void) _X_NORETURN;
+void usage(const char *errmsg) _X_NORETURN _X_COLD;
#define X_USAGE "[host:display]" /* X arguments handled by
Get_Display_Name */
diff --git a/app/xprop/man/xprop.man b/app/xprop/man/xprop.man
index 81dc02157..245cf9a93 100644
--- a/app/xprop/man/xprop.man
+++ b/app/xprop/man/xprop.man
@@ -36,6 +36,7 @@ xprop - property displayer for X
[-remove \fIproperty-name\fP]
[-set \fIproperty-name\fP \fIvalue\fP]
[-spy]
+[-version]
[-f \fIatom\fP \fIformat\fP [\fIdformat\fP]]*
[\fIformat\fP [\fIdformat\fP] \fIatom\fP]*
.SH SUMMARY
@@ -121,6 +122,10 @@ indicated window.
Examine window properties forever, looking for property change events.
.PP
.TP 8
+.B "-verson"
+Print program version information and exit.
+.PP
+.TP 8
.B "-f \fIname\fP \fIformat\fP [\fIdformat\fP]"
Specifies that the \fIformat\fP for \fIname\fP should be \fIformat\fP and that
the \fIdformat\fP for \fIname\fP should be \fIdformat\fP. If \fIdformat\fP
diff --git a/app/xprop/xprop.c b/app/xprop/xprop.c
index 4b948fd16..e7a66d9a3 100644
--- a/app/xprop/xprop.c
+++ b/app/xprop/xprop.c
@@ -95,14 +95,6 @@ Create_Thunk_List (void)
return tptr;
}
-#ifdef notused
-static void
-Free_Thunk_List (thunk *list)
-{
- free(list);
-}
-#endif
-
static thunk *
Add_Thunk (thunk *list, thunk t)
{
@@ -758,10 +750,14 @@ is_utf8_locale (void)
static const char *
Format_Icons (const unsigned long *icon, int len)
{
- char *result = NULL, *tail = NULL;
+ static char *result = NULL;
+ char *tail = NULL;
int alloced;
const unsigned long *end = icon + len / sizeof (unsigned long);
+ free(result);
+ result = NULL;
+
alloced = 0;
while (icon < end)
@@ -1431,9 +1427,15 @@ Get_Window_Property_Data_And_Type (Atom atom,
unsigned long nitems;
unsigned long nbytes;
unsigned long bytes_after;
- unsigned char *prop;
+ static unsigned char *prop = NULL;
int status;
-
+
+ if (prop)
+ {
+ XFree(prop);
+ prop = NULL;
+ }
+
status = XGetWindowProperty(dpy, target_win, atom, 0, (max_len+3)/4,
False, AnyPropertyType, &actual_type,
&actual_format, &nitems, &bytes_after,
@@ -1506,8 +1508,8 @@ Show_Prop (const char *format, const char *dformat, const char *prop)
}
thunks = Break_Down_Property(data, (int)length, type, format, size);
-
Display_Property(thunks, dformat, format);
+ free(thunks);
}
static void
@@ -1523,6 +1525,7 @@ Show_All_Props (void)
name = Format_Atom(atoms[i]);
Show_Prop(NULL, NULL, name);
}
+ XFree(atoms);
} else
for (i = 0; i < font->n_properties; i++) {
atom = font->properties[i].name;
@@ -1552,11 +1555,11 @@ Handle_Prop_Requests (int argc, char **argv)
/* Get overriding formats, if any */
if (Is_A_Format(argv[0])) {
format = argv++[0]; argc--;
- if (!argc) usage();
+ if (!argc) usage("format specified without atom");
}
if (Is_A_DFormat(argv[0])) {
dformat = argv++[0]; argc--;
- if (!argc) usage();
+ if (!argc) usage("dformat specified without atom");
}
/* Get property name */
@@ -1768,9 +1771,9 @@ Set_Property (Display *dpy, Window w, const char *propname, const char *value)
*/
void
-usage (void)
+usage (const char *errmsg)
{
- static const char help_message[] =
+ static const char *help_message =
"where options include:\n"
" -grammar print out full grammar for command line\n"
" -display host:dpy the X server to contact\n"
@@ -1785,10 +1788,15 @@ usage (void)
" -fs filename where to look for formats for properties\n"
" -frame don't ignore window manager frames\n"
" -f propname format [dformat] formats to use for property of given name\n"
-" -spy examine window properties forever\n";
+" -spy examine window properties forever\n"
+" -version print program version\n";
fflush (stdout);
+
+ if (errmsg != NULL)
+ fprintf (stderr, "%s: %s\n\n", program_name, errmsg);
+
fprintf (stderr,
"usage: %s [-options ...] [[format [dformat]] atom] ...\n\n",
program_name);
@@ -1826,7 +1834,7 @@ Parse_Format_Mapping (int *argc, char ***argv)
#define ARGC (*argc)
#define ARGV (*argv)
#define OPTION ARGV[0]
-#define NXTOPT if (++ARGV, --ARGC==0) usage()
+#define NXTOPT if (++ARGV, --ARGC==0) usage("insufficent arguments for -format")
char *type_name, *format, *dformat;
NXTOPT; type_name = OPTION;
@@ -1922,12 +1930,12 @@ main (int argc, char **argv)
continue;
}
if (!strcmp(argv[0], "-len")) {
- if (++argv, --argc == 0) usage();
+ if (++argv, --argc == 0) usage("-len requires an argument");
max_len = atoi(argv[0]);
continue;
}
if (!strcmp(argv[0], "-formats") || !strcmp(argv[0], "-fs")) {
- if (++argv, --argc == 0) usage();
+ if (++argv, --argc == 0) usage("-fs requires an argument");
if (!(stream = fopen(argv[0], "r")))
Fatal_Error("unable to open file %s for reading.", argv[0]);
Read_Mappings(stream);
@@ -1935,14 +1943,14 @@ main (int argc, char **argv)
continue;
}
if (!strcmp(argv[0], "-font")) {
- if (++argv, --argc == 0) usage();
+ if (++argv, --argc == 0) usage("-font requires an argument");
font = Open_Font(argv[0]);
target_win = -1;
continue;
}
if (!strcmp(argv[0], "-remove")) {
thunk t = {0};
- if (++argv, --argc == 0) usage();
+ if (++argv, --argc == 0) usage("-remove requires an argument");
t.propname = argv[0];
if (remove_props == NULL) remove_props = Create_Thunk_List();
remove_props = Add_Thunk(remove_props, t);
@@ -1950,7 +1958,7 @@ main (int argc, char **argv)
}
if (!strcmp(argv[0], "-set")) {
thunk t = {0};
- if (argc < 3) usage();
+ if (argc < 3) usage("insufficent arguments for -set");
t.propname = argv[1];
t.extra_value = argv[2];
argv += 3; argc -= 3;
@@ -1966,11 +1974,20 @@ main (int argc, char **argv)
Parse_Format_Mapping(&argc, &argv);
continue;
}
- usage();
+ if (!strcmp(argv[0], "-version")) {
+ puts(PACKAGE_STRING);
+ exit(0);
+ }
+ fprintf (stderr, "%s: unrecognized argument %s\n\n",
+ program_name, argv[0]);
+ usage(NULL);
}
- if ((remove_props != NULL || set_props != NULL) && argc > 0)
- usage();
+ if ((remove_props != NULL || set_props != NULL) && argc > 0) {
+ fprintf (stderr, "%s: unrecognized argument %s\n\n",
+ program_name, argv[0]);
+ usage(NULL);
+ }
if (target_win == None)
target_win = Select_Window(dpy, !frame_only);