Update to xwd 1.0.7

This commit is contained in:
matthieu 2018-05-21 18:37:29 +00:00
parent 3a44be172c
commit 4781b8e95b
9 changed files with 227 additions and 73 deletions

View File

@ -1,3 +1,86 @@
commit e325d626acca54aa2b845aa0c0fb328659bd1b80
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Mar 9 20:37:36 2018 -0800
xwd 1.0.7
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit a0c52a3b6e9e2c3dc3378014ad2a3ea2d13d71bc
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 fdf611e573574e6848ed60df04bca08800f53d93
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 eda611de20761755b12c0c261a485f20abfe4cd5
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 9dca35dc742461f787c89bc32086bb3f2dcff68f
Author: James Cloos <cloos@jhcloos.com>
Date: Sun Nov 23 13:11:57 2014 -0500
Fix a vs an typo in the man page.
Reported-by: Jens Schweikhardt <schweikh@schweikhardt.net>
Signed-off-by: James Cloos <cloos@jhcloos.com>
commit 6f6b4928f0b7de02cb67e5151199976b6c01a8be
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Jun 3 23:48:55 2014 -0700
Add -version option to print program version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 5ee8bcb7134d049abf50a34fcfd7a9d5e99ba323
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Jun 3 23:46:14 2014 -0700
Print which option was in error along with usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 00d3b27549902d2d2156888d7fcbabbf01e87c90
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Jun 3 23:37:31 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 74e40e6c76efae504e5016f86238ca52cce03507
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Jun 3 23:37:31 2014 -0700
configure: Drop AM_MAINTAINER_MODE
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit b71cda30549b7259e337bd05d499c5921ed34f19
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Aug 8 21:12:15 2013 -0700

64
app/xwd/aclocal.m4 vendored
View File

@ -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

View File

@ -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

104
app/xwd/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for xwd 1.0.6.
# Generated by GNU Autoconf 2.69 for xwd 1.0.7.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@ -581,8 +581,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xwd'
PACKAGE_TARNAME='xwd'
PACKAGE_VERSION='1.0.6'
PACKAGE_STRING='xwd 1.0.6'
PACKAGE_VERSION='1.0.7'
PACKAGE_STRING='xwd 1.0.7'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@ -1312,7 +1312,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 xwd 1.0.6 to adapt to many kinds of systems.
\`configure' configures xwd 1.0.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1382,7 +1382,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of xwd 1.0.6:";;
short | recursive ) echo "Configuration of xwd 1.0.7:";;
esac
cat <<\_ACEOF
@ -1495,7 +1495,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
xwd configure 1.0.6
xwd configure 1.0.7
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -1752,7 +1752,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 xwd $as_me 1.0.6, which was
It was created by xwd $as_me 1.0.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -2581,7 +2581,7 @@ fi
# Define the identity of the package.
PACKAGE='xwd'
VERSION='1.0.6'
VERSION='1.0.7'
cat >>confdefs.h <<_ACEOF
@ -10248,10 +10248,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))"
@ -10259,14 +10260,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
@ -10282,9 +10314,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
@ -10292,9 +10324,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
@ -10302,9 +10334,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
@ -10312,9 +10344,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
@ -10420,12 +10452,12 @@ if test -n "$XWD_CFLAGS"; then
pkg_cv_XWD_CFLAGS="$XWD_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 \${XKBMODULE}\""; } >&5
($PKG_CONFIG --exists --print-errors "x11 xproto >= 7.0.17 ${XKBMODULE}") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xproto >= 7.0.25 \${XKBMODULE}\""; } >&5
($PKG_CONFIG --exists --print-errors "x11 xproto >= 7.0.25 ${XKBMODULE}") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_XWD_CFLAGS=`$PKG_CONFIG --cflags "x11 xproto >= 7.0.17 ${XKBMODULE}" 2>/dev/null`
pkg_cv_XWD_CFLAGS=`$PKG_CONFIG --cflags "x11 xproto >= 7.0.25 ${XKBMODULE}" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@ -10437,12 +10469,12 @@ if test -n "$XWD_LIBS"; then
pkg_cv_XWD_LIBS="$XWD_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 \${XKBMODULE}\""; } >&5
($PKG_CONFIG --exists --print-errors "x11 xproto >= 7.0.17 ${XKBMODULE}") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xproto >= 7.0.25 \${XKBMODULE}\""; } >&5
($PKG_CONFIG --exists --print-errors "x11 xproto >= 7.0.25 ${XKBMODULE}") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_XWD_LIBS=`$PKG_CONFIG --libs "x11 xproto >= 7.0.17 ${XKBMODULE}" 2>/dev/null`
pkg_cv_XWD_LIBS=`$PKG_CONFIG --libs "x11 xproto >= 7.0.25 ${XKBMODULE}" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@ -10463,14 +10495,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
XWD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11 xproto >= 7.0.17 ${XKBMODULE}" 2>&1`
XWD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11 xproto >= 7.0.25 ${XKBMODULE}" 2>&1`
else
XWD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11 xproto >= 7.0.17 ${XKBMODULE}" 2>&1`
XWD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11 xproto >= 7.0.25 ${XKBMODULE}" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$XWD_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (x11 xproto >= 7.0.17 ${XKBMODULE}) were not met:
as_fn_error $? "Package requirements (x11 xproto >= 7.0.25 ${XKBMODULE}) were not met:
$XWD_PKG_ERRORS
@ -11043,7 +11075,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 xwd $as_me 1.0.6, which was
This file was extended by xwd $as_me 1.0.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -11109,7 +11141,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="\\
xwd config.status 1.0.6
xwd config.status 1.0.7
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@ -23,7 +23,7 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xwd], [1.0.6],
AC_INIT([xwd], [1.0.7],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xwd])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
@ -49,7 +49,7 @@ if test x$use_xkb != xno ; then
fi
# Checks for pkg-config packages
PKG_CHECK_MODULES(XWD, [x11 xproto >= 7.0.17 ${XKBMODULE}])
PKG_CHECK_MODULES(XWD, [x11 xproto >= 7.0.25 ${XKBMODULE}])
AC_CONFIG_FILES([
Makefile

View File

@ -76,7 +76,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;
@ -180,7 +180,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) {
@ -195,7 +195,7 @@ Window Select_Window_Args(
continue;
}
if (!strcmp(OPTION, "-name")) {
NXTOPT;
NXTOPT("-name");
w = Window_With_Name(dpy, RootWindow(dpy, screen),
OPTION);
if (!w)
@ -203,7 +203,7 @@ Window Select_Window_Args(
continue;
}
if (!strcmp(OPTION, "-id")) {
NXTOPT;
NXTOPT("-id");
w=0;
sscanf(OPTION, "0x%lx", &w);
if (!w)

View File

@ -61,7 +61,7 @@ Display *Open_Display(const char *);
void Setup_Display_And_Screen(int *, char **);
void Close_Display(void);
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 */
@ -76,5 +76,5 @@ void usage(void) _X_NORETURN;
Window Select_Window(Display *, int);
Window Window_With_Name(Display *, Window, const char *);
void Fatal_Error(const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1, 2);
void Fatal_Error(const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1, 2) _X_COLD;
void outl(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2);

View File

@ -29,7 +29,7 @@ xwd - dump an image of an X window
.B "xwd"
[-debug] [-help] [-nobdrs] [-out \fIfile\fP] [-xy] [-frame] [-add \fIvalue\fP]
[-root | -id \fIid\fP | -name \fIname\fP ] [-icmap] [-screen] [-silent]
[-display \fIdisplay\fP]
[-display \fIdisplay\fP] [-version]
.SH DESCRIPTION
.PP
.I Xwd
@ -70,7 +70,7 @@ instead of the default `Z' format.
.PP
.TP 8
.B "-add \fIvalue\fP"
This option specifies an signed value to be added to every pixel.
This option specifies a signed value to be added to every pixel.
.PP
.TP 8
.B "-frame"
@ -112,6 +112,12 @@ popups that are independent windows but appear over the specified window.
.B "-silent"
Operate silently, i.e. don't ring any bells before and after dumping
the window.
.PP
.TP 8
.B "-version"
This option indicates that
.I xwd
should print its version information and exit.
.SH ENVIRONMENT
.PP
.TP 8

View File

@ -163,9 +163,9 @@ main(int argc, char **argv)
continue;
}
if (!strcmp(argv[i], "-help"))
usage();
usage(NULL);
if (!strcmp(argv[i], "-out")) {
if (++i >= argc) usage();
if (++i >= argc) usage("-out requires an argument");
if (!(out_file = fopen(argv[i], "wb")))
Fatal_Error("Can't open output file as specified.");
standard_out = False;
@ -184,7 +184,7 @@ main(int argc, char **argv)
continue;
}
if (!strcmp(argv[i], "-add")) {
if (++i >= argc) usage();
if (++i >= argc) usage("-add requires an argument");
add_pixel_value = parse_long (argv[i]);
continue;
}
@ -196,7 +196,13 @@ main(int argc, char **argv)
silent = True;
continue;
}
usage();
if (!strcmp(argv[i], "-version")) {
puts(PACKAGE_STRING);
exit(0);
}
fprintf (stderr, "%s: unrecognized argument '%s'\n",
program_name, argv[i]);
usage(NULL);
}
#ifdef WIN32
if (standard_out)
@ -518,12 +524,15 @@ Window_Dump(Window window, FILE *out)
* Report the syntax for calling xwd.
*/
void
usage(void)
usage(const char *errmsg)
{
if (errmsg != NULL)
fprintf (stderr, "%s: %s\n", program_name, errmsg);
fprintf (stderr,
"usage: %s [-display host:dpy] [-debug] [-help] %s [-nobdrs] [-out <file>]",
program_name, "[{-root|-id <id>|-name <name>}]");
fprintf (stderr, " [-xy] [-add value] [-frame]\n");
fprintf (stderr, " [-xy] [-add value] [-frame] [-version]\n");
exit(1);
}