summaryrefslogtreecommitdiff
path: root/Build/source/utils/xpdfopen
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-05-19 07:58:35 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-05-19 07:58:35 +0000
commitf1ebed340f3b269e00fb1a3fb6f06aaa0c7fe163 (patch)
tree027bb17326082b9e5fade6ec2d671a56e6042935 /Build/source/utils/xpdfopen
parentb43e1679b9890672ea10b668b0c740cf5544e2c8 (diff)
xpdfopen 0.81
git-svn-id: svn://tug.org/texlive/trunk@22533 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/xpdfopen')
-rw-r--r--Build/source/utils/xpdfopen/ChangeLog11
-rw-r--r--Build/source/utils/xpdfopen/Makefile.am19
-rw-r--r--Build/source/utils/xpdfopen/Makefile.in163
-rw-r--r--Build/source/utils/xpdfopen/README22
-rwxr-xr-xBuild/source/utils/xpdfopen/configure23
-rw-r--r--Build/source/utils/xpdfopen/configure.ac4
-rw-r--r--Build/source/utils/xpdfopen/configure.ac.orig2
-rw-r--r--Build/source/utils/xpdfopen/pdfclose.c8
-rw-r--r--Build/source/utils/xpdfopen/pdfopen.153
-rw-r--r--Build/source/utils/xpdfopen/pdfopen.c35
-rw-r--r--Build/source/utils/xpdfopen/xpdfopen.h3
11 files changed, 273 insertions, 70 deletions
diff --git a/Build/source/utils/xpdfopen/ChangeLog b/Build/source/utils/xpdfopen/ChangeLog
index f320dcfe95c..a81cf7c58cc 100644
--- a/Build/source/utils/xpdfopen/ChangeLog
+++ b/Build/source/utils/xpdfopen/ChangeLog
@@ -1,3 +1,14 @@
+2011-05-17 Jim Diamond <jim.diamond@acadiau.ca>
+ * pdfopen.c: add -h and --help options.
+ Reformat usage information.
+ Add support for evince.
+ Replace '-openInNewWindow' with '-openInNewInstance'
+ since AR9 claims the former is deprecated.
+ * xpdfopen.h: add support for evince.
+ * pdfclose.c: add support for evince.
+ * configure.ac: update for V 0.81.
+
+
2010-05-03 Jim Diamond <jim.diamond@acadiau.ca>
* pdfclose.c: make it work with all of AR{5,7,8,9} and xpdf.
diff --git a/Build/source/utils/xpdfopen/Makefile.am b/Build/source/utils/xpdfopen/Makefile.am
index 643e7795a6e..b71783b2706 100644
--- a/Build/source/utils/xpdfopen/Makefile.am
+++ b/Build/source/utils/xpdfopen/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am for the TeX Live subdirectory utils/xpdfopen/
##
-## Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2009-2011 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
ACLOCAL_AMFLAGS = -I ../../m4
@@ -12,9 +12,22 @@ LDADD = $(X_LIBS) -lX11 -lXmu $(X_EXTRA_LIBS)
bin_PROGRAMS = pdfopen pdfclose
-pdfopen_SOURCES = pdfopen.c sendx.c utils.c sendx.h xpdfopen.h utils.h
+common_sources = sendx.c sendx.h utils.c utils.h xpdfopen.h
-pdfclose_SOURCES = pdfclose.c sendx.c utils.c sendx.h xpdfopen.h utils.h
+pdfopen_SOURCES = pdfopen.c $(common_sources)
+
+pdfclose_SOURCES = pdfclose.c $(common_sources)
+
+dist_man1_MANS = pdfopen.1
+
+# Symlinks within $(man1dir): FILE:LINK indicates LINK.1->FILE.1
+man1_links = pdfopen:pdfclose
+
+include $(top_srcdir)/../../texk/am/man1_links.am
+
+install-data-hook: install-man1-links
+
+uninstall-hook: uninstall-man1-links
EXTRA_DIST = xpdfopen.pdf xpdfopen.tex
diff --git a/Build/source/utils/xpdfopen/Makefile.in b/Build/source/utils/xpdfopen/Makefile.in
index 9e3316fd4c4..a66b92d42c2 100644
--- a/Build/source/utils/xpdfopen/Makefile.in
+++ b/Build/source/utils/xpdfopen/Makefile.in
@@ -33,16 +33,18 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = pdfopen$(EXEEXT) pdfclose$(EXEEXT)
-subdir = .
-DIST_COMMON = README $(am__configure_deps) \
+DIST_COMMON = README $(am__configure_deps) $(dist_man1_MANS) \
$(srcdir)/../../build-aux/depcomp \
$(srcdir)/../../build-aux/install-sh \
$(srcdir)/../../build-aux/missing $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(top_srcdir)/configure \
- ../../build-aux/config.guess ../../build-aux/config.sub \
- ../../build-aux/depcomp ../../build-aux/install-sh \
- ../../build-aux/ltmain.sh ../../build-aux/missing \
- ../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog
+ $(srcdir)/Makefile.in \
+ $(top_srcdir)/../../texk/am/man1_links.am \
+ $(top_srcdir)/configure ../../build-aux/config.guess \
+ ../../build-aux/config.sub ../../build-aux/depcomp \
+ ../../build-aux/install-sh ../../build-aux/ltmain.sh \
+ ../../build-aux/missing ../../build-aux/texinfo.tex \
+ ../../build-aux/ylwrap ChangeLog
+subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \
$(top_srcdir)/configure.ac
@@ -53,15 +55,15 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
-am_pdfclose_OBJECTS = pdfclose.$(OBJEXT) sendx.$(OBJEXT) \
- utils.$(OBJEXT)
+am__objects_1 = sendx.$(OBJEXT) utils.$(OBJEXT)
+am_pdfclose_OBJECTS = pdfclose.$(OBJEXT) $(am__objects_1)
pdfclose_OBJECTS = $(am_pdfclose_OBJECTS)
pdfclose_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
pdfclose_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am_pdfopen_OBJECTS = pdfopen.$(OBJEXT) sendx.$(OBJEXT) utils.$(OBJEXT)
+am_pdfopen_OBJECTS = pdfopen.$(OBJEXT) $(am__objects_1)
pdfopen_OBJECTS = $(am_pdfopen_OBJECTS)
pdfopen_LDADD = $(LDADD)
pdfopen_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@@ -75,6 +77,30 @@ CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(pdfclose_SOURCES) $(pdfopen_SOURCES)
DIST_SOURCES = $(pdfclose_SOURCES) $(pdfopen_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(dist_man1_MANS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -183,8 +209,13 @@ ACLOCAL_AMFLAGS = -I ../../m4
AM_CFLAGS = $(WARNING_CFLAGS)
INCLUDES = $(X_CFLAGS)
LDADD = $(X_LIBS) -lX11 -lXmu $(X_EXTRA_LIBS)
-pdfopen_SOURCES = pdfopen.c sendx.c utils.c sendx.h xpdfopen.h utils.h
-pdfclose_SOURCES = pdfclose.c sendx.c utils.c sendx.h xpdfopen.h utils.h
+common_sources = sendx.c sendx.h utils.c utils.h xpdfopen.h
+pdfopen_SOURCES = pdfopen.c $(common_sources)
+pdfclose_SOURCES = pdfclose.c $(common_sources)
+dist_man1_MANS = pdfopen.1
+
+# Symlinks within $(man1dir): FILE:LINK indicates LINK.1->FILE.1
+man1_links = pdfopen:pdfclose
EXTRA_DIST = xpdfopen.pdf xpdfopen.tex Makefile.am.orig \
configure.ac.orig
all: all-am
@@ -193,7 +224,7 @@ all: all-am
.SUFFIXES: .c .o .obj
am--refresh:
@:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../../texk/am/man1_links.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -293,6 +324,40 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-man1: $(dist_man1_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -347,6 +412,19 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -495,9 +573,9 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-am
-all-am: Makefile $(PROGRAMS)
+all-am: Makefile $(PROGRAMS) $(MANS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -548,8 +626,9 @@ info: info-am
info-am:
-install-data-am:
-
+install-data-am: install-man
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-dvi-am:
@@ -564,7 +643,7 @@ install-info: install-info-am
install-info-am:
-install-man:
+install-man: install-man1
install-pdf: install-pdf-am
@@ -595,9 +674,12 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+uninstall-man: uninstall-man1
-.MAKE: install-am install-strip
+.MAKE: install-am install-data-am install-strip uninstall-am
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
@@ -605,15 +687,38 @@ uninstall-am: uninstall-binPROGRAMS
distcheck distclean distclean-compile distclean-generic \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-binPROGRAMS
+ install-binPROGRAMS install-data install-data-am \
+ install-data-hook install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-man1 install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-hook \
+ uninstall-man uninstall-man1
+
+.PHONY: install-man1-links uninstall-man1-links
+
+install-man1-links:
+ @cd $(DESTDIR)$(man1dir) && \
+ for s in $(man1_links); do \
+ link=`echo $$s | sed 's,.*:,,'`; \
+ file=`echo $$s | sed 's,:.*,,'`; \
+ rm -f $$link.1; \
+ echo "creating link '$$link.1' -> '$$file.1'"; \
+ echo ".so man1/$$file.1" >$$link.1; \
+ done
+
+uninstall-man1-links:
+ @for s in $(man1_links); do \
+ link=`echo $$s | sed 's,.*:,,'`; \
+ rm -f $(DESTDIR)$(man1dir)/$$link.1; \
+ done
+
+install-data-hook: install-man1-links
+uninstall-hook: uninstall-man1-links
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/Build/source/utils/xpdfopen/README b/Build/source/utils/xpdfopen/README
index 51b532c7bcc..30742f7822c 100644
--- a/Build/source/utils/xpdfopen/README
+++ b/Build/source/utils/xpdfopen/README
@@ -1,9 +1,9 @@
-------------------------------------------------------------------
-Pdfopen 0.80 - Send open/close commands to Acrobat Reader and xpdf
-------------------------------------------------------------------
+---------------------------------------------------------------------------
+xpdfopen 0.81 - Send open/close commands to Acrobat Reader, xpdf and evince
+---------------------------------------------------------------------------
This is a Linux (X11) implementation of Fabrice Popineau's pdfclose/
-pdfopen commands to control Acrobat Reader and xpdf.
+pdfopen commands to control Acrobat Reader, xpdf and evince.
The libX code was borrowed from Reinhard Fobbe's Sendx library for
Tcl/Tk, and the programs use the same license, copied below.
@@ -26,25 +26,27 @@ even though it is impossible to restore the viewport.
Version 0.80 adds an implementation for AR 9 and xpdf.
+Version 0.81 adds an implementation for evince.
+
The AR command lines do not behave precisely the same as under Windows,
because the Linux Reader behaves somewhat differently: it is not
scriptable, but it is possible to 'fake' keypresses.
pdfopen has the following call sequence:
- pdfopen [-viewer <ar9|ar9-tab|ar8|ar7|ar5|xpdf>] <pdf file name>
-The 'ar9' version uses the '-openInNewWindow' option, the 'ar9-tab'
+ pdfopen [-viewer <ar9|ar9-tab|ar8|ar7|ar5|xpdf|evince>] <pdf file name>
+The 'ar9' version uses the '-openInNewInstance' option, the 'ar9-tab'
version does not (so if there is already an AR9 window open, a new tab
will be opened in that window).
pdfclose has the following call sequence:
pdfclose <pdf file name>
-This program closes an existing AR5, AR7, AR8, AR9 or xpdf window
+This program closes an existing AR5, AR7, AR8, AR9, xpdf or evince window
displaying the given PDF file.
-Version 0.80 compiles on Linux (Slackware64 13.0, anyway) with
+Version 0.81 compiles on Linux (Slackware64 13.1, anyway) with
the following command:
gcc -Wall pdfopen.c sendx.c utils.c -o pdfopen -lX11 -s
should you not want to go through the process of creating and running
@@ -54,8 +56,8 @@ a configure program.
Taco Hoekwater <taco@metatex.org> (Version(s) up to 0.61)
Dordrecht, The Netherlands, December 2008.
-Jim Diamond <jim.diamond@acadiau.ca> (Version 0.80)
-Acadia University, Wolfville, Nova Scotia, Canada; April 2010.
+Jim Diamond <jim.diamond@acadiau.ca> (Version 0.80 and 0.81)
+Acadia University, Wolfville, Nova Scotia, Canada; May 2011.
diff --git a/Build/source/utils/xpdfopen/configure b/Build/source/utils/xpdfopen/configure
index 05821a2f6c2..20df50e899b 100755
--- a/Build/source/utils/xpdfopen/configure
+++ b/Build/source/utils/xpdfopen/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for xpdfopen for TeX Live 0.80.
+# Generated by GNU Autoconf 2.68 for xpdfopen for TeX Live 0.81.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -559,8 +559,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xpdfopen for TeX Live'
PACKAGE_TARNAME='xpdfopen-for-tex-live'
-PACKAGE_VERSION='0.80'
-PACKAGE_STRING='xpdfopen for TeX Live 0.80'
+PACKAGE_VERSION='0.81'
+PACKAGE_STRING='xpdfopen for TeX Live 0.81'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -673,8 +673,7 @@ LDFLAGS
LIBS
CPPFLAGS
XMKMF
-CPP
-CPPFLAGS'
+CPP'
# Initialize some variables set by options.
@@ -1217,7 +1216,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 xpdfopen for TeX Live 0.80 to adapt to many kinds of systems.
+\`configure' configures xpdfopen for TeX Live 0.81 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1288,7 +1287,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xpdfopen for TeX Live 0.80:";;
+ short | recursive ) echo "Configuration of xpdfopen for TeX Live 0.81:";;
esac
cat <<\_ACEOF
@@ -1386,7 +1385,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xpdfopen for TeX Live configure 0.80
+xpdfopen for TeX Live configure 0.81
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1591,7 +1590,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 xpdfopen for TeX Live $as_me 0.80, which was
+It was created by xpdfopen for TeX Live $as_me 0.81, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2410,7 +2409,7 @@ fi
# Define the identity of the package.
PACKAGE='xpdfopen-for-tex-live'
- VERSION='0.80'
+ VERSION='0.81'
cat >>confdefs.h <<_ACEOF
@@ -4921,7 +4920,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 xpdfopen for TeX Live $as_me 0.80, which was
+This file was extended by xpdfopen for TeX Live $as_me 0.81, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4978,7 +4977,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="\\
-xpdfopen for TeX Live config.status 0.80
+xpdfopen for TeX Live config.status 0.81
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/utils/xpdfopen/configure.ac b/Build/source/utils/xpdfopen/configure.ac
index 715745e1388..5ff8f0870ac 100644
--- a/Build/source/utils/xpdfopen/configure.ac
+++ b/Build/source/utils/xpdfopen/configure.ac
@@ -1,12 +1,12 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-dnl Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org>
+dnl Copyright (C) 2009-2011 Peter Breitenlohner <tex-live@tug.org>
dnl
dnl This file is free software; the copyright holder
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
-AC_INIT([xpdfopen for TeX Live], [0.80], [tex-k@tug.org])
+AC_INIT([xpdfopen for TeX Live], [0.81], [tex-k@tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([pdfopen.c])
AC_CONFIG_AUX_DIR([../../build-aux])
diff --git a/Build/source/utils/xpdfopen/configure.ac.orig b/Build/source/utils/xpdfopen/configure.ac.orig
index 88c475350a8..e065fd418bf 100644
--- a/Build/source/utils/xpdfopen/configure.ac.orig
+++ b/Build/source/utils/xpdfopen/configure.ac.orig
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
dnl this is for autoconf 2.5x
-AC_INIT(pdfopen, 0.80, jim.diamond@acadiau.ca)
+AC_INIT(pdfopen, 0.81, jim.diamond@acadiau.ca)
AC_CONFIG_AUX_DIR(config)
diff --git a/Build/source/utils/xpdfopen/pdfclose.c b/Build/source/utils/xpdfopen/pdfclose.c
index 121a42762f9..2688d21a94a 100644
--- a/Build/source/utils/xpdfopen/pdfclose.c
+++ b/Build/source/utils/xpdfopen/pdfclose.c
@@ -1,13 +1,14 @@
/*
* pdfclose.c
*
- * Modified by Jim Diamond (jim.diamond@acadiau.ca) 2010/04/21
+ * Modified by Jim Diamond (jim.diamond@acadiau.ca) 2010/04/21 (V 0.80)
+ * and again 2011/05/17 (V 0.81)
* and Peter Breitenlohner <tex-live@tug.org> (2009).
*
* This program does not take a viewer argument, and just tries to close
* any known viewer displaying the given file.
*
- * V 0.80
+ * V 0.81
*/
#include <stdio.h>
@@ -65,7 +66,8 @@ main (int argc, char * argv[])
if (try_name(argv[1], XPDF_WIN_NAME_FMT))
if (try_name(argv[1], AR7_WIN_NAME_FMT))
if (try_name(argv[1], AR5_WIN_NAME_FMT))
- return EXIT_FAILURE;
+ if (try_name(argv[1], EVINCE_WIN_NAME_FMT))
+ return EXIT_FAILURE;
return EXIT_SUCCESS;
}
diff --git a/Build/source/utils/xpdfopen/pdfopen.1 b/Build/source/utils/xpdfopen/pdfopen.1
new file mode 100644
index 00000000000..a98a623a95b
--- /dev/null
+++ b/Build/source/utils/xpdfopen/pdfopen.1
@@ -0,0 +1,53 @@
+.\" This manpage is licensed under the GNU Public License
+.TH PDFOPEN 1 2011-05-17 "pdfopen version 0.81" ""
+
+.SH NAME
+pdfopen \- open or close a PDF file viewer
+
+.SH SYNOPSIS
+pdfopen
+[
+.IR option
+]
+<file.pdf>
+.br
+pdfclose <file.pdf>
+
+.SH OPTIONS
+.TP 8
+.B -h
+output help
+.TP
+.B --help
+output help
+.TP
+.B -viewer <ar9|ar9tab|ar8|ar7|ar5|xpdf|evince>
+use (respectively) Adobe Reader 9 (in a new window), Adobe Reader 9
+(in a new tab of a running AR9, if any),
+Adobe Reader 8, Adobe Reader 7, Adobe Reader 5, xpdf or evince as the
+PDF viewer program.
+Adobe Reader (in a new window) is the default.
+
+.SH DESCRIPTION
+.B pdfopen
+displays the specified PDF file using the given (or default) viewer.
+If there is already an instance of the given viewer displaying the
+given file, the viewer is instructed to reload the file.
+
+.B pdfclose
+searches for one of the above PDF viewers displaying the given file
+and instructs the viewer to close the window.
+
+.SH NOTES
+If the file argument to
+.B pdfclose
+is shown in a tab-capable viewer (such as Adobe Reader 9), the tab
+displaying the file is closed, but the window itself is not closed.
+
+These programs are designed for X11-based systems. If you somehow
+find compiled versions of these programs on a system using another
+window system, they are very unlikely to be of any use to you.
+
+
+.SH AUTHOR
+This manual page was written by Jim Diamond <Jim.Diamond@acadiau.ca>.
diff --git a/Build/source/utils/xpdfopen/pdfopen.c b/Build/source/utils/xpdfopen/pdfopen.c
index abee956964a..c94460ccd8e 100644
--- a/Build/source/utils/xpdfopen/pdfopen.c
+++ b/Build/source/utils/xpdfopen/pdfopen.c
@@ -23,7 +23,7 @@
* please send it to me for inclusion.
*/
-#define VERSION "0.80"
+#define VERSION "0.81"
#include <stdio.h>
#include <stdlib.h>
@@ -100,7 +100,7 @@ pdf_viewer_t pdf_viewers[] =
{
{"ar9", "acroread", USE_SENDX,
AR9_WIN_NAME, AR9_WIN_NAME_FMT,
- {"-openInNewWindow", NULL},
+ {"-openInNewInstance", NULL},
{NULL},
{"Ctrl-R", NULL}},
{"ar9-tab", "acroread", USE_SENDX,
@@ -134,6 +134,11 @@ pdf_viewer_t pdf_viewers[] =
{"-remote", "tex-server", NULL},
{NULL},
{"r", NULL}},
+ {"evince", "evince", USE_SENDX,
+ EVINCE_WIN_NAME, EVINCE_WIN_NAME_FMT,
+ {NULL},
+ {NULL},
+ {"Ctrl-R", NULL}},
#ifdef TRY_OCULAR
{"okular", "okular", USE_SENDX,
OKULAR_WIN_NAME, OKULAR_WIN_NAME_FMT,
@@ -155,16 +160,20 @@ usage(void)
int i;
int viewers = sizeof(pdf_viewers) / sizeof(pdf_viewers[0]);
- fprintf(stderr, "Usage: %s [-viewer <prog>] <file.pdf>\n", progname);
- fprintf(stderr, "\tIf the PDF viewer <prog> is displaying <file.pdf>, "
+ fprintf(stderr, "This is version %s of %s.\n", VERSION, progname);
+ fprintf(stderr, "Usage:\n %s [-h|--help]\n", progname);
+ fprintf(stderr, " Show this help.\n");
+ fprintf(stderr, " %s [-viewer <prog>] <file.pdf>\n", progname);
+ fprintf(stderr, " If the PDF viewer <prog> is displaying <file.pdf>, "
"reload that file.\n");
- fprintf(stderr, "\tOtherwise call <prog> to display <file.pdf>.\n");
- fprintf(stderr, "\tThe default viewer program is %s.\n", DEFAULT_VIEWER);
- fprintf(stderr, "\tImplemented viewers are");
+ fprintf(stderr, " Otherwise call <prog> to display <file.pdf>.\n");
+ fprintf(stderr, " The default viewer program is %s.\n", DEFAULT_VIEWER);
+ fprintf(stderr, " Implemented viewers:");
for (i = 0; i < viewers - 1; i++)
fprintf(stderr, " '%s'", pdf_viewers[i].short_name);
fprintf(stderr, " and '%s'.\n", pdf_viewers[viewers - 1].short_name);
- fprintf(stderr, "\tThis is version %s of %s\n", VERSION, progname);
+ fprintf(stderr, " Note: ar9 uses acroread's -openInNewInstance argument,"
+ " ar9-tab does not.\n");
}
@@ -222,8 +231,8 @@ send_command(const char * window_name, const char * reload_cmd)
/*
- * Try to reload the file, then if not successful to start up a new
- * instance of the viewer program.
+ * Try to reload the file.
+ * If not successful, try to start up a new instance of the viewer program.
* Return 0 on success, non-0 otherwise.
*/
@@ -337,6 +346,12 @@ main(int argc, char * argv[])
if (env_viewer != NULL)
viewer = env_viewer;
+ if (argc < 2 || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help"))
+ {
+ usage();
+ return argc < 2 ? EXIT_FAILURE : EXIT_SUCCESS;
+ }
+
if (argc == 4 && !strcmp(argv[1], "-viewer"))
{
viewer = argv[2];
diff --git a/Build/source/utils/xpdfopen/xpdfopen.h b/Build/source/utils/xpdfopen/xpdfopen.h
index 7430edc4229..51adecb0dcd 100644
--- a/Build/source/utils/xpdfopen/xpdfopen.h
+++ b/Build/source/utils/xpdfopen/xpdfopen.h
@@ -30,6 +30,9 @@
#define XPDF_WIN_NAME "Xpdf"
#define XPDF_WIN_NAME_FMT XPDF_WIN_NAME ": %s"
+#define EVINCE_WIN_NAME "evince"
+#define EVINCE_WIN_NAME_FMT "%s"
+
#define OKULAR_WIN_NAME "Okular"
#define OKULAR_WIN_NAME_FMT "%s - " OKULAR_WIN_NAME