diff options
-rw-r--r-- | Build/source/utils/pdfopen/Makefile.am | 1 | ||||
-rw-r--r-- | Build/source/utils/pdfopen/Makefile.in | 6 | ||||
-rw-r--r-- | Build/source/utils/pdfopen/README | 7 | ||||
-rw-r--r-- | Build/source/utils/pdfopen/aclocal.m4 | 386 | ||||
-rwxr-xr-x | Build/source/utils/pdfopen/configure | 20 | ||||
-rw-r--r-- | Build/source/utils/pdfopen/configure.ac | 4 | ||||
-rw-r--r-- | Build/source/utils/pdfopen/pdfclose.c | 2 | ||||
-rw-r--r-- | Build/source/utils/pdfopen/pdfopen.c | 50 | ||||
-rw-r--r-- | Build/source/utils/pdfopen/sendx.c | 3 | ||||
-rw-r--r-- | Build/source/utils/pdfopen/xpdfopen.pdf | bin | 0 -> 86995 bytes | |||
-rw-r--r-- | Build/source/utils/pdfopen/xpdfopen.tex | 111 |
11 files changed, 447 insertions, 143 deletions
diff --git a/Build/source/utils/pdfopen/Makefile.am b/Build/source/utils/pdfopen/Makefile.am index 6fbec89acd9..7aab0fdef8a 100644 --- a/Build/source/utils/pdfopen/Makefile.am +++ b/Build/source/utils/pdfopen/Makefile.am @@ -9,3 +9,4 @@ pdfopen_SOURCES = pdfopen.c sendx.c pdfclose_SOURCES = pdfclose.c sendx.c + diff --git a/Build/source/utils/pdfopen/Makefile.in b/Build/source/utils/pdfopen/Makefile.in index 3ee8225b80f..a4a3ef5a2c0 100644 --- a/Build/source/utils/pdfopen/Makefile.in +++ b/Build/source/utils/pdfopen/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.9.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,6 +14,8 @@ @SET_MAKE@ +SOURCES = $(pdfclose_SOURCES) $(pdfopen_SOURCES) + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ diff --git a/Build/source/utils/pdfopen/README b/Build/source/utils/pdfopen/README index 9f571a9b3b6..0e3e13b1dc2 100644 --- a/Build/source/utils/pdfopen/README +++ b/Build/source/utils/pdfopen/README @@ -1,6 +1,6 @@ -------------------------------------------------------- -Pdfopen 0.4 - Send open/close commands to Acrobat Reader +Pdfopen 0.5 - Send open/close commands to Acrobat Reader -------------------------------------------------------- This is a Linux (X11) implementation of Fabrice Popineau's pdfclose/ @@ -14,6 +14,11 @@ Version 0.3 adds support for Adobe Reader 7.0 for Linux. Version 0.4 uses autoconf +Version 0.5 fixes an incorrect autoconf variable, supports +building under X11R5, handles pathnames on the command-line, +and fixes a bug where pdfopen did not exit correctly after +(automatically) starting acroread. + The command lines do not behave precisely the same as under Windows, because the Linux Reader behaves somewhat different: it is not scriptable, but it is possible to 'fake' keypresses. diff --git a/Build/source/utils/pdfopen/aclocal.m4 b/Build/source/utils/pdfopen/aclocal.m4 index aef181a6ddb..7b25188cbf9 100644 --- a/Build/source/utils/pdfopen/aclocal.m4 +++ b/Build/source/utils/pdfopen/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.9.4 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,11 +11,23 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# -*- Autoconf -*- +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Generated from amversion.in; do not edit by hand. + +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- @@ -28,15 +40,26 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) + [AM_AUTOMAKE_VERSION([1.9.4])]) -# AM_AUX_DIR_EXPAND -*- Autoconf -*- +# AM_AUX_DIR_EXPAND -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to @@ -83,16 +106,26 @@ AC_PREREQ([2.50])dnl am_aux_dir=`cd $ac_aux_dir && pwd` ]) -# AM_CONDITIONAL -*- Autoconf -*- +# AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. + +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. -# serial 7 +# serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -116,15 +149,26 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) +# serial 7 -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 8 +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -133,6 +177,7 @@ fi])]) # CC etc. in the Makefile, will ask for an AC_PROG_CC use... + # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. @@ -272,16 +317,27 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- +# Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. + +# 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. -#serial 3 +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +#serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ @@ -340,19 +396,30 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Do all the work for Automake. -*- Autoconf -*- +# Do all the work for Automake. -*- Autoconf -*- + +# This macro actually does too much some checks are only needed if +# your package does certain things. But this isn't really a big deal. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 12 +# 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 macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) @@ -454,27 +521,51 @@ for _am_header in $config_headers :; do done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# -*- Autoconf -*- +# Copyright (C) 2003 Free Software Foundation, Inc. -# serial 2 +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. @@ -489,15 +580,26 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Check to see how 'make' treats includes. -*- Autoconf -*- +# Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -# serial 3 +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 # AM_MAKE_INCLUDE() # ----------------- @@ -541,16 +643,27 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- +# -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 4 +# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -576,16 +689,27 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# + +# Copyright (C) 2003, 2004 Free Software Foundation, Inc. + +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). @@ -639,15 +763,26 @@ else fi AC_SUBST([mkdir_p])]) -# Helper functions for option handling. -*- Autoconf -*- +# Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -# serial 3 +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -672,16 +807,28 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. # -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Check to make sure that the build environment is sane. +# -# serial 4 +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 # AM_SANITY_CHECK # --------------- @@ -724,14 +871,25 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - # AM_PROG_INSTALL_STRIP -# --------------------- + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip @@ -754,13 +912,25 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2004 Free Software Foundation, Inc. + +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 -# serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- diff --git a/Build/source/utils/pdfopen/configure b/Build/source/utils/pdfopen/configure index 324448995c9..19c4e244e56 100755 --- a/Build/source/utils/pdfopen/configure +++ b/Build/source/utils/pdfopen/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for pdfopen 0.4. +# Generated by GNU Autoconf 2.59 for pdfopen 0.5. # # Report bugs to <taco@metatex.org>. # @@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='pdfopen' PACKAGE_TARNAME='pdfopen' -PACKAGE_VERSION='0.4' -PACKAGE_STRING='pdfopen 0.4' +PACKAGE_VERSION='0.5' +PACKAGE_STRING='pdfopen 0.5' PACKAGE_BUGREPORT='taco@metatex.org' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LIBOBJS LTLIBOBJS' @@ -742,7 +742,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 pdfopen 0.4 to adapt to many kinds of systems. +\`configure' configures pdfopen 0.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -808,7 +808,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pdfopen 0.4:";; + short | recursive ) echo "Configuration of pdfopen 0.5:";; esac cat <<\_ACEOF @@ -931,7 +931,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -pdfopen configure 0.4 +pdfopen configure 0.5 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -945,7 +945,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pdfopen $as_me 0.4, which was +It was created by pdfopen $as_me 0.5, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1590,7 +1590,7 @@ fi # Define the identity of the package. PACKAGE=pdfopen - VERSION=0.4 + VERSION=0.5 cat >>confdefs.h <<_ACEOF @@ -4865,7 +4865,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by pdfopen $as_me 0.4, which was +This file was extended by pdfopen $as_me 0.5, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4923,7 +4923,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -pdfopen config.status 0.4 +pdfopen config.status 0.5 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/Build/source/utils/pdfopen/configure.ac b/Build/source/utils/pdfopen/configure.ac index a739682e0bc..882aa35bd14 100644 --- a/Build/source/utils/pdfopen/configure.ac +++ b/Build/source/utils/pdfopen/configure.ac @@ -1,11 +1,11 @@ dnl Process this file with autoconf to produce a configure script. dnl this is for autoconf 2.5x -AC_INIT(pdfopen, 0.4, taco@metatex.org) +AC_INIT(pdfopen, 0.5, taco@metatex.org) AC_CONFIG_AUX_DIR(config) -AM_INIT_AUTOMAKE(pdfopen, 0.4) +AM_INIT_AUTOMAKE(pdfopen, 0.5) AC_CONFIG_FILES(Makefile) diff --git a/Build/source/utils/pdfopen/pdfclose.c b/Build/source/utils/pdfopen/pdfclose.c index 9664a819282..faf5866355a 100644 --- a/Build/source/utils/pdfopen/pdfclose.c +++ b/Build/source/utils/pdfopen/pdfclose.c @@ -11,7 +11,7 @@ extern int sendx_control_token(char *,char *); #define SUCCESS(a) (!a) void usage (void) { - puts ("pdfclose 0.4: you are mistaking me for an actual program.\n"); + puts ("pdfclose 0.5: you are mistaking me for an actual program.\n"); puts (" pdfclose --file filename.pdf"); puts ("\n"); } diff --git a/Build/source/utils/pdfopen/pdfopen.c b/Build/source/utils/pdfopen/pdfopen.c index 8ede853bae0..f4eba4b3cfb 100644 --- a/Build/source/utils/pdfopen/pdfopen.c +++ b/Build/source/utils/pdfopen/pdfopen.c @@ -3,13 +3,15 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/types.h> +#include <sys/wait.h> /* returns 1 on failure */ extern int sendx_control_token(char *,char *); extern int sendx_alt_token(char *,char *); void usage (void) { - puts ("pdfopen 0.4: you are mistaking me for an actual program.\n"); + puts ("pdfopen 0.5: you are mistaking me for an actual program.\n"); puts(" pdfopen [--file filename.pdf]"); puts ("\nusing no arguments tells the Reader to 'go back'.\n"); } @@ -23,7 +25,8 @@ int main (int argc, char **argv){ char *newargv[3]; char *winname; char *filename; - int test = 1; + char *basefile; + pid_t reader; if (argc == 5 && (strcmp(argv[3],"--page") == 0 && strcmp(argv[1],"--file") == 0 )) { @@ -31,39 +34,54 @@ int main (int argc, char **argv){ } if (argc == 3 && strcmp(argv[1],"--file") == 0) { filename = malloc(strlen(argv[2])+1); - if (filename == NULL) { + basefile = malloc(strlen(argv[2])+1); + if (filename == NULL || basefile == NULL) { puts ("out of memory\n"); exit(EXIT_FAILURE); } strcpy(filename,argv[2]); + strcpy(basefile,filename); + if (rindex(basefile,'/')) + basefile = rindex(basefile,'/')+1; + winname = malloc(strlen(argv[2])+1+strlen(READERWINPREFIX)); - if (winname == NULL) { + if (winname == NULL ) { puts ("out of memory\n"); exit(EXIT_FAILURE); } strcpy (winname,READERWINPREFIX); - strcpy ((winname+strlen(READERWINPREFIX)), filename); + strcpy ((winname+strlen(READERWINPREFIX)), basefile); if (SUCCESS(sendx_control_token("W",winname))) { sendx_alt_token("Left",READERNAME); /* that's seven */ + sendx_control_token("Left",READERNAME); + /* that's seven, with artificial five keymaps */ } else if (SUCCESS(sendx_control_token("W",filename))) { sendx_control_token("Left",READERFIVE); /* that's five */ + } else if (SUCCESS(sendx_control_token("W",basefile))) { + sendx_control_token("Left",READERFIVE); /* that's five */ } else { - newargv[0] = "acroread"; - newargv[1] = filename; - newargv[2] = NULL; - if(!fork()) { - execvp("acroread",newargv); - /* this trick makes sure that there *is* a back option - in Acrobat Reader */ - while(test) { - test = sendx_control_token("+",filename); - } - } + if((reader = fork()) >= 0) { + if (reader) { + waitpid(reader,NULL,WNOHANG); + } else { + newargv[0] = "acroread"; + newargv[1] = filename; + newargv[2] = NULL; + if(execvp("acroread",newargv)) { + puts ("acroread startup failed\n"); + exit(EXIT_FAILURE); + } + } + } else { + puts ("fork failed\n"); + exit(EXIT_FAILURE); + } } } else if (argc != 1) { usage(); } else { sendx_alt_token("Left",READERNAME); + sendx_control_token("Left",READERNAME); /* that's seven */ sendx_control_token("Left",READERFIVE); } exit(EXIT_SUCCESS); diff --git a/Build/source/utils/pdfopen/sendx.c b/Build/source/utils/pdfopen/sendx.c index 238f97f7f82..88065dbc0bb 100644 --- a/Build/source/utils/pdfopen/sendx.c +++ b/Build/source/utils/pdfopen/sendx.c @@ -196,9 +196,6 @@ sendx_channel (KeySym ks, int km) case 0x14: ks = XK_Scroll_Lock; break; - case 0x15: - ks = XK_Sys_Req; - break; case 0x1B: ks = XK_Escape; break; diff --git a/Build/source/utils/pdfopen/xpdfopen.pdf b/Build/source/utils/pdfopen/xpdfopen.pdf Binary files differnew file mode 100644 index 00000000000..fe41c8352ae --- /dev/null +++ b/Build/source/utils/pdfopen/xpdfopen.pdf diff --git a/Build/source/utils/pdfopen/xpdfopen.tex b/Build/source/utils/pdfopen/xpdfopen.tex new file mode 100644 index 00000000000..d0348f622da --- /dev/null +++ b/Build/source/utils/pdfopen/xpdfopen.tex @@ -0,0 +1,111 @@ + +\setupoutput[pdftex] + +\starttext + + +\chapter{Controlling Acrobat Reader under X11} + + +\centerline{Taco Hoekwater, taco(at)aanhet.net} + +\blank[3*line] + +Most people who use the Acrobat Reader to preview PDF files +generated from \TeX\ documents will know that it is a hassle to +deal with documents that need to be compiled while being viewed. + +The Linux version of Adobe's program simply does not notice that the +PDF file has changed, and the Microsoft Windows version is even worse: +it opens the PDF file using mandatory locking, making it absolutely +impossible to recompile the document while it is still open in the +Reader. + +Common practice using Acrobat Reader for viewing PDF's generated from +pdf\TeX{} is therefore to cycle through these actions, either from +the command line or from a script: + +\startitemize[n] +\item edit the \TeX{} source +\item compile to PDF +\item view with Acrobat Reader +\item close Acrobat Reader +\stopitemize +It follows that the Reader has to make a complete restart for each +cycle, which is a slow operation. The alternative would be to run the +Reader in the background and ask users to, after steps 1.~and 2., +manually close and reopen the document. That is not user-friendly, of +course, and that's where \type{pdfopen} and \type{pdfclose}, described +in this article, will be useful. + +Because the problem was much more severe under Windows, a few years ago +Fabrice Popineau has written two small programs that use DDE calls to +control the Reader from an external script or batchfile: +\startitemize +\item \type{pdfclose} to make the Reader close the file before the +compilation starts +\item \type{pdfopen} to re-open the file afterwards. +\stopitemize +The Linux X11 versions are command||line compatible with Fabrice's +originals, but they do not function completely identically. + +\starttyping +pdfclose --file <pdf file> +\stoptyping +This will close an X window with the name \type{<pdf file>} (for +Acrobat Reader~5) or the name \type{Adobe Reader - <pdf file>} +(for Adobe Reader~7). + +\starttyping +pdfclose --all +\stoptyping +The Linux \type{pdfclose} command ignores the \type{-}\type{-all} +command||line switch. The Windows version will close {\it only\/} the +files that were opened through \type{pdfopen} when \type{-}\type{-all} is +given, and this cannot easily be done under X. Ignoring the options +seems wiser than unconditionally closing all open PDF documents. + +\starttyping +pdfopen +\stoptyping +This command||line sends a ``go to previous document'' to an already +existing, but empty, Adobe Reader window. There are perhaps some +situations where this possibility might come in handy. + + +\starttyping +pdfopen --file <pdf file> [--page <pagenumber>] +\stoptyping +The Linux version silently ignores a given +\type{-}\type{-page} option, because its behaviour would be near||impossible to +predict. The program also reacts a bit differently to the +\type{-}\type{-file} option: if the file is already open in the +Reader, it will close and re||open the document. + +Normally, this is the command you want to use under Linux, because it +immediately re||opesn the PDF file you have given as an argument in +the Reader, using the same page \& view settings. The result is {\it +almost\/} as if there was a refresh command in the Reader. {\it +Almost\/}, because it only works if just this document is open for +viewing, not if there are more files opened. + +\blank +I've tested my programs with Acrobat Reader 5.0.10 under Mandrake +Linux 10.1 using X.org 6.8.2, but the code is reasonably generic and +should work out of the box using most X11R6 implementations. +Version 0.5 compiles under X11R5 as well. + +Adobe Reader 7.0 is OK as long as you keep your PDF files maximized +within the main Adobe Reader window (the PDF document's name has to +appear in the window title). Also, you probably want to set the +preference {\it Reopen documents to last viewed page\/} to ``All +files''. You can find this setting in the {\it Startup\/} page of the +preferences screen. + +\medskip +\noindent +Source and binaries of the programs can be downloaded from +\hyphenatedurl{CTAN://support/xpdfopen/} or : +\hyphenatedurl{http://tex.aanhet.net/pdfopen} + +\stoptext |