diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-03-07 17:37:18 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-03-07 17:37:18 +0000 |
commit | 5cd021f9087efafb3e7c02e9c0f52f8c734e83c1 (patch) | |
tree | d5bf8a9b98c2aa06714c36ab1c7fd93a0852c591 /Build/source/texk/dvipdfmx | |
parent | d2ccbc405f5e3e2b19679e4729617b0ef427ac28 (diff) |
dvipdfmx 20110305: add missing file, more compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@21627 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfmx')
3 files changed, 116 insertions, 2 deletions
diff --git a/Build/source/texk/dvipdfmx/dvipdfmx-20110305-PATCHES/patch-01-dpxfile b/Build/source/texk/dvipdfmx/dvipdfmx-20110305-PATCHES/patch-01-dpxfile index 73fd1846ef9..e72bd2025b9 100644 --- a/Build/source/texk/dvipdfmx/dvipdfmx-20110305-PATCHES/patch-01-dpxfile +++ b/Build/source/texk/dvipdfmx/dvipdfmx-20110305-PATCHES/patch-01-dpxfile @@ -1,6 +1,6 @@ diff -ur dvipdfmx-20110305.orig/src/dpxfile.c dvipdfmx-20110305/src/dpxfile.c --- dvipdfmx-20110305.orig/src/dpxfile.c 2011-03-06 04:06:59.000000000 +0100 -+++ dvipdfmx-20110305/src/dpxfile.c 2011-03-07 17:34:53.000000000 +0100 ++++ dvipdfmx-20110305/src/dpxfile.c 2011-03-07 18:31:04.000000000 +0100 @@ -36,7 +36,6 @@ #include "dpxfile.h" @@ -21,6 +21,15 @@ diff -ur dvipdfmx-20110305.orig/src/dpxfile.c dvipdfmx-20110305/src/dpxfile.c #endif } else { *qv = concat (buf, ""); +@@ -223,7 +222,7 @@ + } + *qv = NULL; + #ifdef WIN32 +- ret = spawnvp (_P_WAIT, *cmdv, cmdv); ++ ret = spawnvp (_P_WAIT, *cmdv, (const char* const*) cmdv); + #else + i = fork (); + if (i < 0) @@ -765,14 +764,14 @@ # define __TMPDIR "/tmp" # define TEMPLATE "/dvipdfmx.XXXXXX" diff --git a/Build/source/texk/dvipdfmx/dvipdfmx-20110305/src/dpxfile.c b/Build/source/texk/dvipdfmx/dvipdfmx-20110305/src/dpxfile.c index 134932b96da..67155401510 100644 --- a/Build/source/texk/dvipdfmx/dvipdfmx-20110305/src/dpxfile.c +++ b/Build/source/texk/dvipdfmx/dvipdfmx-20110305/src/dpxfile.c @@ -222,7 +222,7 @@ static int exec_spawn (char *cmd) } *qv = NULL; #ifdef WIN32 - ret = spawnvp (_P_WAIT, *cmdv, cmdv); + ret = spawnvp (_P_WAIT, *cmdv, (const char* const*) cmdv); #else i = fork (); if (i < 0) diff --git a/Build/source/texk/dvipdfmx/src/dvipdft b/Build/source/texk/dvipdfmx/src/dvipdft new file mode 100755 index 00000000000..3bcd0027db1 --- /dev/null +++ b/Build/source/texk/dvipdfmx/src/dvipdft @@ -0,0 +1,105 @@ +#!/bin/sh +# dvipdft, completely rewritten by Thomas Esser for teTeX after an +# original script by Mark A. Wicks +# +# Thomas Esser. Public Domain. +# +# Modified by Matthias Franz for dvipdfmx (when running as dvipdfm) and +# TeX Live. + +# This script makes a first (fast) run with dvipdfm, then calls gs on +# the resulting pdf file to get the thumbnails and finally calls dvipdfm. + +progname=dvipdft +version=20090604.0046 + +# set trap for error +trap ' + echo "$progname: fatal error." >&2 + exit 1 +' 1 + +test -f /bin/sh5 && test -z "$RUNNING_SH5" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \ + && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; } +unset RUNNING_SH5 + +test -f /bin/bsh && test -z "$RUNNING_BSH" \ + && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \ + && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; } +unset RUNNING_BSH + +# hack around a bug in zsh: +test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' + +help="Usage: $progname [options] dvifile + $progname --help + $progname --version" + +quoteit() +{ + echo "x$1" | sed "s@.@@; s@'@'\\\\''@; s@^@'@; s@\$@'@" +} + +# process args 1 to (n-1) and scan for a -o argument keep a properly +# quoted backup of the options, so that they can be restored later +unset s outfile +while test $# -gt 1; do + case $1 in + -o) outfile=$2;; + esac + s="$s${s+ }"`quoteit "$1"` + shift +done + +# check for last argument +case $1 in + --help) + echo "$help" + exit 0 + ;; + --version) + echo "$progname version $version by Thomas Esser and others" + exit 0 + ;; + "") + echo "$help" + exit 1 + ;; +esac + +# args 1 to (n-1) are gone, last one must be the dvifile +dvifile="$1" + +# outfile comes from -o argument, else it is derived from the input file +test -n "$outfile" \ + || outfile=`echo "$dvifile" | sed 's@.*/@@; s@\.dvi$@@; s@$@.pdf@'` + +# outBase is part of the thumbname files just as dvipdfm expects them: +outBase=`echo "$outfile" | sed 's@\.pdf$@@'` + +ls "$outBase".[1-9]* >/dev/null 2>&1 && { + echo "$progname: Please move the following files out of the way:" >&2 + ls "$outBase".[1-9]* >&2 + exit 1 +} + +# restore args 1 to (n-1): +eval set x "$s"; shift + +# set trap for cleanup +trap ' + rm -f "$outBase".[1-9]* +' 0 + +# Run dvipdfm with the fastest options for the first pass +echo "$progname: running dvipdfm $@ -z0 $dvifile" >&2 +dvipdfm ${1+"$@"} -z0 "$dvifile" + +# run gs +echo "$progname: running gs" >&2 +gs -r10 -dNOPAUSE -dBATCH -sDEVICE=png256 -sOutputFile="$outBase.%d" "$outfile" + +# run dvipdfm with the users specified options for the last pass +echo "$progname: running dvipdfm -t $@ $dvifile" >&2 +dvipdfm ${1+"$@"} -t "$dvifile" |