Update to xpr 1.0.5

This commit is contained in:
matthieu 2018-05-21 18:08:21 +00:00
parent 8c04f8bbd4
commit cf2d414a08
16 changed files with 822 additions and 345 deletions

View File

@ -1,3 +1,148 @@
commit 0b852ef27abda922ae18b8042acd18104b25d596
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Mar 9 18:17:12 2018 -0800
xpr 1.0.5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit db63d2a499ad1e4a9cc650d3ffb6795dea7d290e
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 8aa5668fb698ee43fccf1d71efab88895001d669
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 ef05b01918be35e5837f620d337e69a9279c2a13
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 31d433e78ea47f308119ab38f3e514303f239ab9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Dec 5 16:36:37 2015 -0800
Fix man page references to X(1) to use __miscmansuffix__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit a4680cc6ffde72504b1cea750c164eb0f9852c4d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Oct 24 16:46:04 2014 -0700
More constification
Shrinks .data from 1320 bytes to 72 bytes
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit eae93f9edbbcf5494500fcc6527eccabe4e29553
Author: Matthieu Herrb <matthieu@herrb.eu>
Date: Fri Aug 8 16:23:46 2014 +0200
Use strcmp() to compare strings and simplify options parser.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 5f369174777783fb9544b81cfdfab255d7e990a8
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jun 1 21:00:47 2014 -0700
Add -version option to print program version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 007a72af45ea48e3ed5e750b4b39e034b102d2c0
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jun 1 20:54:22 2014 -0700
Print which option was in error along with usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit e31a646861007e4014d38d6a53a672d63e4f11fa
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jun 1 19:40:53 2014 -0700
Fix "missmatch" typo in error message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 45922f222d8d91a6faff778f5ceaa34ec8728501
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jun 1 19:37:27 2014 -0700
Combine strings in usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit f85404c8f41a14c907d707933ee5643876bdde4d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jun 1 19:21:51 2014 -0700
Remove old CVS id tags
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 6ac064621493c27c6e31b15e3faf8192638262fa
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jun 1 00:30:48 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 756f9df2639ef9a58cba414d8c98394173bfbed9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jun 1 00:30:48 2014 -0700
configure: Drop AM_MAINTAINER_MODE
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 7045be285a72316388814350d3b6bcf7675a2dbd
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jun 1 00:30:41 2014 -0700
This is not a GNU project, so declare it foreign.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 235b6b1ac77b6f01a3cad60fe7e1b3cbc259879f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Nov 15 23:04:10 2013 -0800
Remove unneeded uses of <math.h> & -lm
Can't see why they were ever needed.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
commit 699aa034b8368a4052aa0318d4bca74dd688a7c2 commit 699aa034b8368a4052aa0318d4bca74dd688a7c2
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Mar 31 16:57:47 2012 -0700 Date: Sat Mar 31 16:57:47 2012 -0700

View File

@ -22,7 +22,7 @@
bin_PROGRAMS = xpr bin_PROGRAMS = xpr
AM_CFLAGS = $(CWARNFLAGS) $(XPR_CFLAGS) -DNOINLINE AM_CFLAGS = $(CWARNFLAGS) $(XPR_CFLAGS) -DNOINLINE
xpr_LDADD = $(XPR_LIBS) -lm xpr_LDADD = $(XPR_LIBS)
xpr_SOURCES = \ xpr_SOURCES = \
lncmd.h \ lncmd.h \

View File

@ -78,7 +78,7 @@ subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
config.guess config.sub depcomp install-sh missing compile config.guess config.sub depcomp install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@ -303,7 +303,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
AM_CFLAGS = $(CWARNFLAGS) $(XPR_CFLAGS) -DNOINLINE AM_CFLAGS = $(CWARNFLAGS) $(XPR_CFLAGS) -DNOINLINE
xpr_LDADD = $(XPR_LIBS) -lm xpr_LDADD = $(XPR_LIBS)
xpr_SOURCES = \ xpr_SOURCES = \
lncmd.h \ lncmd.h \
pmp.h \ pmp.h \
@ -334,15 +334,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \ @for dep in $?; do \
case '$(am__configure_deps)' in \ case '$(am__configure_deps)' in \
*$$dep*) \ *$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \ && exit 0; \
exit 1;; \ exit 1;; \
esac; \ esac; \
done; \ done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile $(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile .PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \

56
app/xpr/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 xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl 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
dnl Permission is hereby granted, free of charge, to any person obtaining a dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"), 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 # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
m4_defun([XORG_MACROS_VERSION],[ 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_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,, 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_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_SED]) 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 if test x$APP_MAN_SUFFIX = x ; then
APP_MAN_SUFFIX=1 APP_MAN_SUFFIX=1
fi fi
@ -1372,8 +1383,8 @@ if test x$LIB_MAN_DIR = x ; then
fi fi
if test x$FILE_MAN_SUFFIX = x ; then if test x$FILE_MAN_SUFFIX = x ; then
case $host_os in case $SYSV_MAN_SECTIONS in
solaris*) FILE_MAN_SUFFIX=4 ;; true) FILE_MAN_SUFFIX=4 ;;
*) FILE_MAN_SUFFIX=5 ;; *) FILE_MAN_SUFFIX=5 ;;
esac esac
fi fi
@ -1382,8 +1393,8 @@ if test x$FILE_MAN_DIR = x ; then
fi fi
if test x$MISC_MAN_SUFFIX = x ; then if test x$MISC_MAN_SUFFIX = x ; then
case $host_os in case $SYSV_MAN_SECTIONS in
solaris*) MISC_MAN_SUFFIX=5 ;; true) MISC_MAN_SUFFIX=5 ;;
*) MISC_MAN_SUFFIX=7 ;; *) MISC_MAN_SUFFIX=7 ;;
esac esac
fi fi
@ -1392,8 +1403,8 @@ if test x$MISC_MAN_DIR = x ; then
fi fi
if test x$DRIVER_MAN_SUFFIX = x ; then if test x$DRIVER_MAN_SUFFIX = x ; then
case $host_os in case $SYSV_MAN_SECTIONS in
solaris*) DRIVER_MAN_SUFFIX=7 ;; true) DRIVER_MAN_SUFFIX=7 ;;
*) DRIVER_MAN_SUFFIX=4 ;; *) DRIVER_MAN_SUFFIX=4 ;;
esac esac
fi fi
@ -1402,8 +1413,8 @@ if test x$DRIVER_MAN_DIR = x ; then
fi fi
if test x$ADMIN_MAN_SUFFIX = x ; then if test x$ADMIN_MAN_SUFFIX = x ; then
case $host_os in case $SYSV_MAN_SECTIONS in
solaris*) ADMIN_MAN_SUFFIX=1m ;; true) ADMIN_MAN_SUFFIX=1m ;;
*) ADMIN_MAN_SUFFIX=8 ;; *) ADMIN_MAN_SUFFIX=8 ;;
esac esac
fi fi
@ -1665,13 +1676,24 @@ m4_ifval([$1],
fi]) fi])
# Test for the ability of xmlto to generate a text target # 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 have_xmlto_text=no
cat > conftest.xml << "EOF" cat > conftest.xml << "EOF"
EOF EOF
AS_IF([test "$have_xmlto" = yes], AS_IF([test "$have_xmlto" = yes],
[AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
[have_xmlto_text=yes], [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 rm -f conftest.xml
AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = 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` macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ || (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" touch \$(top_srcdir)/INSTALL; \
echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
AC_SUBST([INSTALL_CMD]) AC_SUBST([INSTALL_CMD])
]) # XORG_INSTALL ]) # XORG_INSTALL
dnl Copyright 2005 Red Hat, Inc dnl Copyright 2005 Red Hat, Inc
@ -3129,10 +3152,11 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
# #
# #
AC_DEFUN([XORG_CHANGELOG], [ 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) \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ || (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
echo 'git directory not found: installing possibly empty changelog.' >&2)" touch \$(top_srcdir)/ChangeLog; \
echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
AC_SUBST([CHANGELOG_CMD]) AC_SUBST([CHANGELOG_CMD])
]) # XORG_CHANGELOG ]) # XORG_CHANGELOG

View File

@ -1,13 +1,17 @@
#! /bin/sh #! /bin/sh
srcdir=`dirname $0` srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=. test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd` ORIGDIR=`pwd`
cd $srcdir cd "$srcdir"
autoreconf -v --install || exit 1 autoreconf -v --install || exit 1
cd $ORIGDIR || exit $? cd "$ORIGDIR" || exit $?
$srcdir/configure --enable-maintainer-mode "$@" git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
git config --local format.subjectPrefix "PATCH app/xpr"
if test -z "$NOCONFIGURE"; then
exec "$srcdir"/configure "$@"
fi

347
app/xpr/compile Normal file
View File

@ -0,0 +1,347 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# 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
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

96
app/xpr/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for xpr 1.0.4. # Generated by GNU Autoconf 2.69 for xpr 1.0.5.
# #
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
# #
@ -581,8 +581,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='xpr' PACKAGE_NAME='xpr'
PACKAGE_TARNAME='xpr' PACKAGE_TARNAME='xpr'
PACKAGE_VERSION='1.0.4' PACKAGE_VERSION='1.0.5'
PACKAGE_STRING='xpr 1.0.4' PACKAGE_STRING='xpr 1.0.5'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL='' PACKAGE_URL=''
@ -1311,7 +1311,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # 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. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures xpr 1.0.4 to adapt to many kinds of systems. \`configure' configures xpr 1.0.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1381,7 +1381,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of xpr 1.0.4:";; short | recursive ) echo "Configuration of xpr 1.0.5:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1488,7 +1488,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
xpr configure 1.0.4 xpr configure 1.0.5
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
@ -1745,7 +1745,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by xpr $as_me 1.0.4, which was It was created by xpr $as_me 1.0.5, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
@ -2574,7 +2574,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='xpr' PACKAGE='xpr'
VERSION='1.0.4' VERSION='1.0.5'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -10241,10 +10241,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) \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ || (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
echo 'git directory not found: installing possibly empty changelog.' >&2)" touch \$(top_srcdir)/ChangeLog; \
echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
@ -10252,14 +10253,45 @@ echo 'git directory not found: installing possibly empty changelog.' >&2)"
macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ || (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 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 if test x$APP_MAN_SUFFIX = x ; then
APP_MAN_SUFFIX=1 APP_MAN_SUFFIX=1
fi fi
@ -10275,8 +10307,8 @@ if test x$LIB_MAN_DIR = x ; then
fi fi
if test x$FILE_MAN_SUFFIX = x ; then if test x$FILE_MAN_SUFFIX = x ; then
case $host_os in case $SYSV_MAN_SECTIONS in
solaris*) FILE_MAN_SUFFIX=4 ;; true) FILE_MAN_SUFFIX=4 ;;
*) FILE_MAN_SUFFIX=5 ;; *) FILE_MAN_SUFFIX=5 ;;
esac esac
fi fi
@ -10285,8 +10317,8 @@ if test x$FILE_MAN_DIR = x ; then
fi fi
if test x$MISC_MAN_SUFFIX = x ; then if test x$MISC_MAN_SUFFIX = x ; then
case $host_os in case $SYSV_MAN_SECTIONS in
solaris*) MISC_MAN_SUFFIX=5 ;; true) MISC_MAN_SUFFIX=5 ;;
*) MISC_MAN_SUFFIX=7 ;; *) MISC_MAN_SUFFIX=7 ;;
esac esac
fi fi
@ -10295,8 +10327,8 @@ if test x$MISC_MAN_DIR = x ; then
fi fi
if test x$DRIVER_MAN_SUFFIX = x ; then if test x$DRIVER_MAN_SUFFIX = x ; then
case $host_os in case $SYSV_MAN_SECTIONS in
solaris*) DRIVER_MAN_SUFFIX=7 ;; true) DRIVER_MAN_SUFFIX=7 ;;
*) DRIVER_MAN_SUFFIX=4 ;; *) DRIVER_MAN_SUFFIX=4 ;;
esac esac
fi fi
@ -10305,8 +10337,8 @@ if test x$DRIVER_MAN_DIR = x ; then
fi fi
if test x$ADMIN_MAN_SUFFIX = x ; then if test x$ADMIN_MAN_SUFFIX = x ; then
case $host_os in case $SYSV_MAN_SECTIONS in
solaris*) ADMIN_MAN_SUFFIX=1m ;; true) ADMIN_MAN_SUFFIX=1m ;;
*) ADMIN_MAN_SUFFIX=8 ;; *) ADMIN_MAN_SUFFIX=8 ;;
esac esac
fi fi
@ -10397,12 +10429,12 @@ if test -n "$XPR_CFLAGS"; then
pkg_cv_XPR_CFLAGS="$XPR_CFLAGS" pkg_cv_XPR_CFLAGS="$XPR_CFLAGS"
elif test -n "$PKG_CONFIG"; then elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \ if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu x11 xproto >= 7.0.17\""; } >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu x11 xproto >= 7.0.25\""; } >&5
($PKG_CONFIG --exists --print-errors "xmuu x11 xproto >= 7.0.17") 2>&5 ($PKG_CONFIG --exists --print-errors "xmuu x11 xproto >= 7.0.25") 2>&5
ac_status=$? ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then test $ac_status = 0; }; then
pkg_cv_XPR_CFLAGS=`$PKG_CONFIG --cflags "xmuu x11 xproto >= 7.0.17" 2>/dev/null` pkg_cv_XPR_CFLAGS=`$PKG_CONFIG --cflags "xmuu x11 xproto >= 7.0.25" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes test "x$?" != "x0" && pkg_failed=yes
else else
pkg_failed=yes pkg_failed=yes
@ -10414,12 +10446,12 @@ if test -n "$XPR_LIBS"; then
pkg_cv_XPR_LIBS="$XPR_LIBS" pkg_cv_XPR_LIBS="$XPR_LIBS"
elif test -n "$PKG_CONFIG"; then elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \ if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu x11 xproto >= 7.0.17\""; } >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmuu x11 xproto >= 7.0.25\""; } >&5
($PKG_CONFIG --exists --print-errors "xmuu x11 xproto >= 7.0.17") 2>&5 ($PKG_CONFIG --exists --print-errors "xmuu x11 xproto >= 7.0.25") 2>&5
ac_status=$? ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then test $ac_status = 0; }; then
pkg_cv_XPR_LIBS=`$PKG_CONFIG --libs "xmuu x11 xproto >= 7.0.17" 2>/dev/null` pkg_cv_XPR_LIBS=`$PKG_CONFIG --libs "xmuu x11 xproto >= 7.0.25" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes test "x$?" != "x0" && pkg_failed=yes
else else
pkg_failed=yes pkg_failed=yes
@ -10440,14 +10472,14 @@ else
_pkg_short_errors_supported=no _pkg_short_errors_supported=no
fi fi
if test $_pkg_short_errors_supported = yes; then if test $_pkg_short_errors_supported = yes; then
XPR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xmuu x11 xproto >= 7.0.17" 2>&1` XPR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xmuu x11 xproto >= 7.0.25" 2>&1`
else else
XPR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xmuu x11 xproto >= 7.0.17" 2>&1` XPR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xmuu x11 xproto >= 7.0.25" 2>&1`
fi fi
# Put the nasty error message in config.log where it belongs # Put the nasty error message in config.log where it belongs
echo "$XPR_PKG_ERRORS" >&5 echo "$XPR_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (xmuu x11 xproto >= 7.0.17) were not met: as_fn_error $? "Package requirements (xmuu x11 xproto >= 7.0.25) were not met:
$XPR_PKG_ERRORS $XPR_PKG_ERRORS
@ -11020,7 +11052,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by xpr $as_me 1.0.4, which was This file was extended by xpr $as_me 1.0.5, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -11086,7 +11118,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
xpr config.status 1.0.4 xpr config.status 1.0.5
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View File

@ -23,13 +23,13 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT([xpr], [1.0.4], AC_INIT([xpr], [1.0.5],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xpr]) [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xpr])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
# Initialize Automake # Initialize Automake
AM_INIT_AUTOMAKE([dist-bzip2]) AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
@ -39,7 +39,7 @@ XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS XORG_DEFAULT_OPTIONS
# Checks for pkg-config packages # Checks for pkg-config packages
PKG_CHECK_MODULES(XPR, [xmuu x11 xproto >= 7.0.17]) PKG_CHECK_MODULES(XPR, [xmuu x11 xproto >= 7.0.25])
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_OUTPUT AC_OUTPUT

View File

@ -1,4 +1,3 @@
/* $XConsortium: lncmd.h,v 10.8 94/04/17 20:44:03 rws Exp $ */
/* /*
Copyright (c) 1985 X Consortium Copyright (c) 1985 X Consortium

View File

@ -1,7 +1,3 @@
/*
* $XConsortium: pmp.h,v 1.5 91/02/19 22:13:33 converse Exp $
*/
/* Written by Jose' J. Capo' */ /* Written by Jose' J. Capo' */
/* (jjc@comet.lcs.mit.edu), June 1987 */ /* (jjc@comet.lcs.mit.edu), June 1987 */

View File

@ -1,5 +1,3 @@
/* $XConsortium: x2jet.c,v 1.6 94/04/17 20:44:03 rws Exp $ */
/* -*-C-*- /* -*-C-*-
******************************************************************************** ********************************************************************************
* *

View File

@ -1,12 +1,7 @@
/*
* $XConsortium: x2pmp.c,v 1.13 91/07/25 17:56:32 rws Exp $
*/
/* x2pmp.c: Translate xwd window dump format into PMP format for the /* x2pmp.c: Translate xwd window dump format into PMP format for the
* IBM 3812 PagePrinter. * IBM 3812 PagePrinter.
*/ */
#include <stdio.h> #include <stdio.h>
#include <math.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/XWDFile.h> #include <X11/XWDFile.h>
#include <X11/Xfuncs.h> #include <X11/Xfuncs.h>

View File

@ -1,4 +1,3 @@
.\" $XConsortium: xdpr.man,v 1.15 94/04/17 20:44:04 gildea Exp $
.TH XDPR 1 "Release 6" "X Version 11" .TH XDPR 1 "Release 6" "X Version 11"
.SH NAME .SH NAME
xdpr \- dump an X window directly to a printer xdpr \- dump an X window directly to a printer
@ -116,7 +115,7 @@ commands as appropriate for each.
.IR lpr (1), .IR lpr (1),
.IR lp (1), .IR lp (1),
.IR xwud (1), .IR xwud (1),
.IR X (1) .IR X (__miscmansuffix__)
.SH ENVIRONMENT .SH ENVIRONMENT
.TP 10 .TP 10
DISPLAY DISPLAY
@ -127,7 +126,7 @@ which printer to use by default.
.SH COPYRIGHT .SH COPYRIGHT
Copyright X Consortium Copyright X Consortium
.br .br
See \fIX(1)\fP for a full statement of rights and permissions. See \fIX(__miscmansuffix__)\fP for a full statement of rights and permissions.
.SH AUTHORS .SH AUTHORS
Paul Boutin, MIT Project Athena Paul Boutin, MIT Project Athena
.br .br

View File

@ -1,6 +1,5 @@
#! /bin/sh #! /bin/sh
# Copyright 1985,1988 Massacusetts Institute of Technology. # Copyright 1985,1988 Massacusetts Institute of Technology.
# $XConsortium: xdpr.script /main/10 1995/12/08 11:10:59 swick $
# origin: William Kucharski, Solbourne Computer, Inc. 3/24/90 # origin: William Kucharski, Solbourne Computer, Inc. 3/24/90
# translated from csh script xdpr.script "paul 4/12/88" # translated from csh script xdpr.script "paul 4/12/88"

View File

@ -1,4 +1,3 @@
/* $XConsortium: xpr.c,v 1.59 94/10/14 21:22:08 kaleb Exp $ */
/* /*
Copyright (c) 1985 X Consortium Copyright (c) 1985 X Consortium
@ -72,6 +71,10 @@ from the X Consortium.
* *
*/ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <X11/Xos.h> #include <X11/Xos.h>
#include <X11/Xfuncs.h> #include <X11/Xfuncs.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
@ -135,17 +138,18 @@ int debug = 0;
static const char *infilename = NULL; static const char *infilename = NULL;
const char *progname = NULL; const char *progname = NULL;
typedef struct _grayRec { struct _grayRec {
int level; int level;
int sizeX, sizeY; /* 2x2, 3x3, 4x4 */ int sizeX, sizeY; /* 2x2, 3x3, 4x4 */
unsigned long *grayscales; /* pointer to the encoded pixels */ const unsigned long *grayscales; /* pointer to the encoded pixels */
} GrayRec, *GrayPtr; };
typedef const struct _grayRec GrayRec, *GrayPtr;
static unsigned long grayscale2x2[] = static const unsigned long grayscale2x2[] =
{0, 1, 9, 11, 15}; {0, 1, 9, 11, 15};
static unsigned long grayscale3x3[] = static const unsigned long grayscale3x3[] =
{0, 16, 68, 81, 325, 341, 349, 381, 383, 511}; {0, 16, 68, 81, 325, 341, 349, 381, 383, 511};
static unsigned long grayscale4x4[] = static const unsigned long grayscale4x4[] =
{0, 64, 4160, 4161, 20545, 21057, 23105, {0, 64, 4160, 4161, 20545, 21057, 23105,
23113, 23145, 24169, 24171, 56939, 55275, 55279, 23113, 23145, 24169, 24171, 56939, 55275, 55279,
57327, 65519, 65535}; 57327, 65519, 65535};
@ -360,7 +364,7 @@ int main(int argc, char **argv)
_swaplong((char *) &win, (long)sizeof(win)); _swaplong((char *) &win, (long)sizeof(win));
if (win.file_version != XWD_FILE_VERSION) { if (win.file_version != XWD_FILE_VERSION) {
fprintf(stderr,"xpr: file format version missmatch.\n"); fprintf(stderr,"xpr: file format version mismatch.\n");
exit(1); exit(1);
} }
if (win.header_size < sizeof(win)) { if (win.header_size < sizeof(win)) {
@ -466,30 +470,54 @@ int main(int argc, char **argv)
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
static static void _X_NORETURN _X_COLD
void usage(void) invalid_arg_value(const char *arg, const char *value)
{ {
fprintf(stderr, "usage: %s [options] [file]\n", progname); fprintf (stderr, "%s: %s is not a valid value for %s\n\n",
fprintf(stderr, " -append <file> -noff -output <file>\n"); progname, value, arg);
fprintf(stderr, " -compact\n"); usage();
fprintf(stderr, " -device {ln03 | la100 | ps | lw | pp | ljet | pjet | pjetxl}\n"); }
fprintf(stderr, " -dump\n");
fprintf(stderr, " -gamma <correction>\n"); static void _X_NORETURN _X_COLD
fprintf(stderr, " -gray {2 | 3 | 4}\n"); missing_arg(const char *arg)
fprintf(stderr, " -height <inches> -width <inches>\n"); {
fprintf(stderr, " -header <string> -trailer <string>\n"); fprintf (stderr, "%s: %s requires an argument\n\n", progname, arg);
fprintf(stderr, " -landscape -portrait\n"); usage();
fprintf(stderr, " -left <inches> -top <inches>\n"); }
fprintf(stderr, " -noposition\n");
fprintf(stderr, " -nosixopt\n"); static void _X_NORETURN _X_COLD
fprintf(stderr, " -plane <n>\n"); unknown_arg(const char *arg)
fprintf(stderr, " -psfig\n"); {
fprintf(stderr, " -render <type>\n"); fprintf (stderr, "%s: unrecognized argument %s\n\n", progname, arg);
fprintf(stderr, " -report\n"); usage();
fprintf(stderr, " -rv\n"); }
fprintf(stderr, " -scale <scale>\n");
fprintf(stderr, " -slide\n"); static void _X_NORETURN _X_COLD
fprintf(stderr, " -split <n-pages>\n"); usage(void)
{
fprintf(stderr, "usage: %s [options] [file]\n%s", progname,
" -append <file> -noff -output <file>\n"
" -compact\n"
" -device {ln03 | la100 | ps | lw | pp | ljet | pjet | pjetxl}\n"
" -dump\n"
" -gamma <correction>\n"
" -gray {2 | 3 | 4}\n"
" -height <inches> -width <inches>\n"
" -header <string> -trailer <string>\n"
" -landscape -portrait\n"
" -left <inches> -top <inches>\n"
" -noposition\n"
" -nosixopt\n"
" -plane <n>\n"
" -psfig\n"
" -render <type>\n"
" -report\n"
" -rv\n"
" -scale <scale>\n"
" -slide\n"
" -split <n-pages>\n"
" -version\n"
);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@ -516,7 +544,6 @@ void parse_args(
{ {
register char *output_filename; register char *output_filename;
register int f; register int f;
register int len;
register int pos; register int pos;
output_filename = NULL; output_filename = NULL;
@ -538,85 +565,57 @@ void parse_args(
*render = 0; *render = 0;
for (argc--, argv++; argc > 0; argc--, argv++) { for (argc--, argv++; argc > 0; argc--, argv++) {
const char *arg = argv[0];
if (argv[0][0] != '-') { if (argv[0][0] != '-') {
infilename = *argv; infilename = *argv;
continue; continue;
} }
len = strlen(*argv); if (!strcmp(*argv, "-append")) {
switch (argv[0][1]) {
case 'a': /* -append <filename> */
if (!bcmp(*argv, "-append", len)) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
output_filename = *argv; output_filename = *argv;
*flags |= F_APPEND; *flags |= F_APPEND;
} else } else if (!strcmp(*argv, "-compact")) {
usage();
break;
case 'c': /* -compact | -cutoff <intensity> */
if (len <= 2 )
usage();
if (!bcmp(*argv, "-compact", len)) {
*flags |= F_COMPACT; *flags |= F_COMPACT;
} else if (!bcmp(*argv, "-cutoff", len)) { } else if (!strcmp(*argv, "-cutoff")) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*cutoff = min((atof(*argv) / 100.0 * 0xFFFF), 0xFFFF); *cutoff = min((atof(*argv) / 100.0 * 0xFFFF), 0xFFFF);
} else } else if (!strcmp(*argv, "-dump")) {
usage();
break;
case 'd': /* -density <num> | -device <dev> | -dump */
if (len <= 2)
usage();
if (!bcmp(*argv, "-dump", len)) {
*flags |= F_DUMP; *flags |= F_DUMP;
} else if (len <= 3) { } else if (!strcmp(*argv, "-density")) {
usage();
} else if (!bcmp(*argv, "-density", len)) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*density = atoi(*argv); *density = atoi(*argv);
} else if (!bcmp(*argv, "-device", len)) { } else if (!strcmp(*argv, "-device")) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
len = strlen(*argv); if (!strcmp(*argv, "ln03")) {
if (len < 2)
usage();
if (!bcmp(*argv, "ln03", len)) {
*device = LN03; *device = LN03;
} else if (!bcmp(*argv, "la100", len)) { } else if (!strcmp(*argv, "la100")) {
*device = LA100; *device = LA100;
} else if (!bcmp(*argv, "ps", len)) { } else if (!strcmp(*argv, "ps")) {
*device = PS; *device = PS;
} else if (!bcmp(*argv, "lw", len)) { } else if (!strcmp(*argv, "lw")) {
*device = PS; *device = PS;
} else if (!bcmp(*argv, "pp", len)) { } else if (!strcmp(*argv, "pp")) {
*device = PP; *device = PP;
} else if (!bcmp(*argv, "ljet", len)) { } else if (!strcmp(*argv, "ljet")) {
*device = LJET; *device = LJET;
} else if (!bcmp(*argv, "pjet", len)) { } else if (!strcmp(*argv, "pjet")) {
*device = PJET; *device = PJET;
} else if (!bcmp(*argv, "pjetxl", len)) { } else if (!strcmp(*argv, "pjetxl")) {
*device = PJETXL; *device = PJETXL;
} else } else
usage(); invalid_arg_value(arg, argv[0]);
} else } else if (!strcmp(*argv, "-gamma")) {
usage();
break;
case 'g': /* -gamma <float> | -gray <num> */
if (len <= 2)
usage();
if (!bcmp(*argv, "-gamma", len)) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*gamma = atof(*argv); *gamma = atof(*argv);
} else if (!bcmp(*argv, "-gray", len) || } else if (!strcmp(*argv, "-gray") ||
!bcmp(*argv, "-grey", len)) { !strcmp(*argv, "-grey")) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
switch (atoi(*argv)) { switch (atoi(*argv)) {
case 2: case 2:
*gray = &gray2x2; *gray = &gray2x2;
@ -628,140 +627,76 @@ void parse_args(
*gray = &gray4x4; *gray = &gray4x4;
break; break;
default: default:
usage(); invalid_arg_value(arg, argv[0]);
} }
*flags |= F_GRAY; *flags |= F_GRAY;
} else } else if (!strcmp(*argv, "-height")) {
usage();
break;
case 'h': /* -height <inches> | -header <string> */
if (len <= 3)
usage();
if (!bcmp(*argv, "-height", len)) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*height = (int)(300.0 * atof(*argv)); *height = (int)(300.0 * atof(*argv));
} else if (!bcmp(*argv, "-header", len)) { } else if (!strcmp(*argv, "-header")) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*header = *argv; *header = *argv;
} else } else if (!strcmp(*argv, "-landscape")) {
usage();
break;
case 'l': /* -landscape | -left <inches> */
if (len <= 2)
usage();
if (!bcmp(*argv, "-landscape", len)) {
*flags |= F_LANDSCAPE; *flags |= F_LANDSCAPE;
} else if (!bcmp(*argv, "-left", len)) { } else if (!strcmp(*argv, "-left")) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*left = (int)(300.0 * atof(*argv)); *left = (int)(300.0 * atof(*argv));
} else } else if (!strcmp(*argv, "-nosixopt")) {
usage();
break;
case 'n': /* -nosixopt | -noff | -noposition */
if (len <= 3)
usage();
if (!bcmp(*argv, "-nosixopt", len)) {
*flags |= F_NOSIXOPT; *flags |= F_NOSIXOPT;
} else if (!bcmp(*argv, "-noff", len)) { } else if (!strcmp(*argv, "-noff")) {
*flags |= F_NOFF; *flags |= F_NOFF;
} else if (!bcmp(*argv, "-noposition", len)) { } else if (!strcmp(*argv, "-noposition")) {
*flags |= F_NPOSITION; *flags |= F_NPOSITION;
} else } else if (!strcmp(*argv, "-output")) {
usage();
break;
case 'o': /* -output <filename> */
if (!bcmp(*argv, "-output", len)) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
output_filename = *argv; output_filename = *argv;
} else } else if (!strcmp(*argv, "-portrait")) {
usage();
break;
case 'p': /* -portrait | -plane <n> */
if (len <= 2)
usage();
if (!bcmp(*argv, "-portrait", len)) {
*flags |= F_PORTRAIT; *flags |= F_PORTRAIT;
} else if (!bcmp(*argv, "-plane", len)) { } else if (!strcmp(*argv, "-plane")) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*plane = atoi(*argv); *plane = atoi(*argv);
} else if (!bcmp(*argv, "-psfig", len)) { } else if (!strcmp(*argv, "-psfig")) {
*flags |= F_NPOSITION; *flags |= F_NPOSITION;
} else } else if (!strcmp(*argv, "-rv")) {
usage();
break;
case 'r': /* -render <type> | -report | -rv */
if (len <= 2)
usage();
if (!bcmp(*argv, "-rv", len)) {
*flags |= F_INVERT; *flags |= F_INVERT;
} else if (len <= 3) { } else if (!strcmp(*argv, "-render")) {
usage();
} else if (!bcmp(*argv, "-render", len)) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*render = atoi(*argv); *render = atoi(*argv);
} else if (!bcmp(*argv, "-report", len)) { } else if (!strcmp(*argv, "-report")) {
*flags |= F_REPORT; *flags |= F_REPORT;
} else } else if (!strcmp(*argv, "-scale")) {
usage();
break;
case 's': /* -scale <scale> | -slide | -split <n-pages> */
if (len <= 2)
usage();
if (!bcmp(*argv, "-scale", len)) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*scale = atoi(*argv); *scale = atoi(*argv);
} else if (!bcmp(*argv, "-slide", len)) { } else if (!strcmp(*argv, "-slide")) {
*flags |= F_SLIDE; *flags |= F_SLIDE;
} else if (!bcmp(*argv, "-split", len)) { } else if (!strcmp(*argv, "-split")) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*split = atoi(*argv); *split = atoi(*argv);
} else } else if (!strcmp(*argv, "-top")) {
usage();
break;
case 't': /* -top <inches> | -trailer <string> */
if (len <= 2)
usage();
if (!bcmp(*argv, "-top", len)) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*top = (int)(300.0 * atof(*argv)); *top = (int)(300.0 * atof(*argv));
} else if (!bcmp(*argv, "-trailer", len)) { } else if (!strcmp(*argv, "-trailer")) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*trailer = *argv; *trailer = *argv;
} else } else if (strcmp(*argv, "-version") == 0) {
usage(); puts(PACKAGE_STRING);
break; exit(0);
} else if (!strcmp(*argv, "-width")) {
case 'w': /* -width <inches> */
if (!bcmp(*argv, "-width", len)) {
argc--; argv++; argc--; argv++;
if (argc == 0) usage(); if (argc == 0) missing_arg(arg);
*width = (int)(300.0 * atof(*argv)); *width = (int)(300.0 * atof(*argv));
} else } else
usage(); unknown_arg(arg);
break;
default:
usage();
break;
}
} }
if (infilename) { if (infilename) {
@ -1276,7 +1211,7 @@ void dump_prolog(int flags)
/* postscript "programs" to unpack and print the bitmaps being sent */ /* postscript "programs" to unpack and print the bitmaps being sent */
static const static const
char *ps_prolog_compact[] = { char * const ps_prolog_compact[] = {
"%%Pages: 1", "%%Pages: 1",
"%%EndProlog", "%%EndProlog",
"%%Page: 1 1", "%%Page: 1 1",
@ -1350,7 +1285,7 @@ char *ps_prolog_compact[] = {
}; };
static const static const
char *ps_prolog[] = { char * const ps_prolog[] = {
"%%Pages: 1", "%%Pages: 1",
"%%EndProlog", "%%EndProlog",
"%%Page: 1 1", "%%Page: 1 1",
@ -1383,7 +1318,8 @@ char *ps_prolog[] = {
static static
void dump_prolog(int flags) { void dump_prolog(int flags) {
const char **p = (flags & F_COMPACT) ? ps_prolog_compact : ps_prolog; const char * const *p =
(flags & F_COMPACT) ? ps_prolog_compact : ps_prolog;
while (*p) while (*p)
printf("%s\n", *p++); printf("%s\n", *p++);
} }
@ -1536,7 +1472,7 @@ void ps_setup(
} }
static const static const
char *ps_epilog[] = { char * const ps_epilog[] = {
"", "",
"showpage", "showpage",
"%%Trailer", "%%Trailer",
@ -1546,7 +1482,7 @@ char *ps_epilog[] = {
static static
void ps_finish(void) void ps_finish(void)
{ {
char **p = (char **)ps_epilog; const char * const *p = ps_epilog;
while (*p) printf("%s\n",*p++); while (*p) printf("%s\n",*p++);
} }

View File

@ -1,4 +1,3 @@
.\" $XConsortium: xpr.man,v 1.22 94/04/17 20:44:06 gildea Exp $
.TH XPR 1 "Release 6" "X Version 11" .TH XPR 1 "Release 6" "X Version 11"
.SH NAME .SH NAME
xpr \- print an X window dump xpr \- print an X window dump
@ -71,6 +70,8 @@ xpr \- print an X window dump
] [ ] [
.B \-slide .B \-slide
] [ ] [
.B \-version
] [
.I filename .I filename
] ]
.SH DESCRIPTION .SH DESCRIPTION
@ -208,9 +209,11 @@ are available.
.IP "\fB\-slide\fP" .IP "\fB\-slide\fP"
This option allows overhead transparencies to be printed This option allows overhead transparencies to be printed
using the PaintJet and PaintJet XL printers. using the PaintJet and PaintJet XL printers.
.IP "\fB\-version\fP"
This option prints the program version information and exits.
.SH SEE ALSO .SH SEE ALSO
xwd(1), xwud(1), X(1) xwd(1), xwud(1), X(__miscmansuffix__)
.SH LIMITATIONS .SH LIMITATIONS
The current version of \fIxpr\fP can generally print out on the LN03 The current version of \fIxpr\fP can generally print out on the LN03
@ -329,7 +332,7 @@ Copyright 1986, Marvin Solomon and the University of Wisconsin.
.br .br
Copyright 1988, Hewlett Packard Company. Copyright 1988, Hewlett Packard Company.
.br .br
See \fIX(1)\fP for a full statement of rights and permissions. See \fIX(__miscmansuffix__)\fP for a full statement of rights and permissions.
.SH AUTHORS .SH AUTHORS
Michael R. Gretzinger, MIT Project Athena, Michael R. Gretzinger, MIT Project Athena,
Jose Capo, MIT Project Athena (PP3812 support), Jose Capo, MIT Project Athena (PP3812 support),