2011-06-27 14:59:56 +02:00
|
|
|
---
|
|
|
|
contrib/pdfmark/pdfroff.sh | 22 ++++++++++++----------
|
|
|
|
1 file changed, 12 insertions(+), 10 deletions(-)
|
|
|
|
|
|
|
|
Index: groff-1.21/contrib/pdfmark/pdfroff.sh
|
2011-06-09 11:45:17 +02:00
|
|
|
===================================================================
|
2011-06-27 14:59:56 +02:00
|
|
|
--- groff-1.21.orig/contrib/pdfmark/pdfroff.sh 2010-12-31 08:33:09.000000000 +0100
|
|
|
|
+++ groff-1.21/contrib/pdfmark/pdfroff.sh 2011-06-27 13:13:32.807924590 +0200
|
|
|
|
@@ -157,7 +157,7 @@
|
|
|
|
# as default), and schedule removal of only the temporary files.
|
|
|
|
#
|
|
|
|
GROFF_TMPDIR=${TMPDIR}
|
|
|
|
- trap "rm -f ${GROFF_TMPDIR}/pdf$$.*" 0
|
|
|
|
+ trap "rm -f ${GROFF_TMPDIR}/*" 0
|
|
|
|
fi
|
|
|
|
#
|
|
|
|
# In the case of abnormal termination events, we force an exit
|
|
|
|
@@ -168,14 +168,16 @@
|
|
|
|
#
|
|
|
|
trap "exit 1" 1 2 3 13 15
|
|
|
|
#
|
2011-06-09 11:45:17 +02:00
|
|
|
- WRKFILE=${GROFF_TMPDIR}/pdf$$.tmp
|
|
|
|
+ WRKFILE=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.tmp`
|
|
|
|
#
|
|
|
|
- REFCOPY=${GROFF_TMPDIR}/pdf$$.cmp
|
|
|
|
- REFFILE=${GROFF_TMPDIR}/pdf$$.ref
|
|
|
|
+ REFCOPY=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.cmp`
|
|
|
|
+ REFFILE=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.ref`
|
|
|
|
#
|
|
|
|
CS_DATA=""
|
|
|
|
- TC_DATA=${GROFF_TMPDIR}/pdf$$.tc
|
|
|
|
- BD_DATA=${GROFF_TMPDIR}/pdf$$.ps
|
|
|
|
+ TC_DATA=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.tc`
|
|
|
|
+ BD_DATA=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.ps`
|
|
|
|
+
|
|
|
|
+ STREAMFILE=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.in`
|
|
|
|
#
|
|
|
|
# Initialise 'groff' format control settings,
|
|
|
|
# to discriminate table of contents and document body formatting passes.
|
2011-06-27 14:59:56 +02:00
|
|
|
@@ -328,7 +330,7 @@
|
2011-06-09 11:45:17 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
--stylesheet)
|
|
|
|
- STYLESHEET="$OPTARG" CS_DATA=${GROFF_TMPDIR}/pdf$$.cs
|
|
|
|
+ STYLESHEET="$OPTARG" CS_DATA=`mktemp --tmpdir="${GROFF_TMPDIR}" pdfXXXXXXXXXX.cs`
|
|
|
|
;;
|
|
|
|
|
|
|
|
--no-toc-relocation)
|
2011-06-27 14:59:56 +02:00
|
|
|
@@ -361,7 +363,7 @@
|
2011-06-09 11:45:17 +02:00
|
|
|
# so set up a mechanism to achieve this, for ALL 'groff' passes.
|
|
|
|
#
|
|
|
|
- | -i*)
|
|
|
|
- STREAM="$CAT ${GROFF_TMPDIR}/pdf$$.in |"
|
|
|
|
+ STREAM="$CAT ${STREAMFILE} |"
|
|
|
|
test "$1" = "-" && INPUT_FILES="$INPUT_FILES $1" \
|
|
|
|
|| GROFF_STYLE="$GROFF_STYLE $1"
|
|
|
|
;;
|
2011-06-27 14:59:56 +02:00
|
|
|
@@ -433,8 +435,8 @@
|
2011-06-09 11:45:17 +02:00
|
|
|
# or if no input files are specified, then we need to capture STDIN,
|
|
|
|
# so we can replay it into each 'groff' processing pass.
|
|
|
|
#
|
|
|
|
- test -z "$INPUT_FILES" && STREAM="$CAT ${GROFF_TMPDIR}/pdf$$.in |"
|
|
|
|
- test -n "$STREAM" && $CAT > ${GROFF_TMPDIR}/pdf$$.in
|
|
|
|
+ test -z "$INPUT_FILES" && STREAM="$CAT ${STREAMFILE} |"
|
|
|
|
+ test -n "$STREAM" && $CAT > ${STREAMFILE}
|
|
|
|
#
|
|
|
|
# Unless reference resolution is explicitly suppressed,
|
|
|
|
# we initiate it by touching the cross reference dictionary file,
|