groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff-commit] groff/contrib/pdfmark ChangeLog Makefile.sub pd...


From: Keith Marshall
Subject: [Groff-commit] groff/contrib/pdfmark ChangeLog Makefile.sub pd...
Date: Thu, 09 Mar 2006 00:40:11 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Branch:         
Changes by:     Keith Marshall <address@hidden> 06/03/09 00:40:11

Modified files:
        contrib/pdfmark: ChangeLog Makefile.sub pdfroff.man pdfroff.sh 

Log message:
        Incorporate portability recommendations by Ralf Wildenhues
        <address@hidden>
        
        * pdfroff.sh: Avoid unsafe quoting in variable substitutions of
        the form "${VAR+"set"}"; remove outer quotes everywhere; prefix
        with `x' on each side of comparisons.
        ($NULLCMD): Define when `$ZSH_VERSION' is set, i.e. when host
        has `/bin/sh -> zsh'; also...
        (emulate sh): Invoke, for this case.
        
        Enhancement/bug fix requested by Werner LEMBERG <address@hidden>
        
        * pdfroff.sh (--help): Direct output to `stdout', not `stderr'.
        (--keep-temporary-files): New option; implement it.
        
        * pdfroff.man (OPTIONS): Document `--keep-temporary-files' option.
        (FILES): Note names and purpose of files it affects.
        
        * Makefile.sub (PDFROFF): Add `--keep-temporary-files' option;
        retain them in `GROFF_TMPDIR=.'.
        (CLEANADD): Include temporary files matching `pdf[0-9]*'.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/pdfmark/ChangeLog.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/pdfmark/Makefile.sub.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/pdfmark/pdfroff.man.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/groff/groff/contrib/pdfmark/pdfroff.sh.diff?tr1=1.8&tr2=1.9&r1=text&r2=text

Patches:
Index: groff/contrib/pdfmark/ChangeLog
diff -u groff/contrib/pdfmark/ChangeLog:1.14 
groff/contrib/pdfmark/ChangeLog:1.15
--- groff/contrib/pdfmark/ChangeLog:1.14        Sun Feb 26 14:02:58 2006
+++ groff/contrib/pdfmark/ChangeLog     Thu Mar  9 00:40:11 2006
@@ -1,3 +1,27 @@
+2006-03-09  Keith Marshall  <address@hidden>
+
+       Incorporate portability recommendations by Ralf Wildenhues
+       <address@hidden>
+
+       * pdfroff.sh: Avoid unsafe quoting in variable substitutions of
+       the form "${VAR+"set"}"; remove outer quotes everywhere; prefix
+       with `x' on each side of comparisons.
+       ($NULLCMD): Define when `$ZSH_VERSION' is set, i.e. when host
+       has `/bin/sh -> zsh'; also...
+       (emulate sh): Invoke, for this case.
+
+       Enhancement/bug fix requested by Werner LEMBERG <address@hidden>
+
+       * pdfroff.sh (--help): Direct output to `stdout', not `stderr'.
+       (--keep-temporary-files): New option; implement it.
+
+       * pdfroff.man (OPTIONS): Document `--keep-temporary-files' option.
+       (FILES): Note names and purpose of files it affects.
+
+       * Makefile.sub (PDFROFF): Add `--keep-temporary-files' option;
+       retain them in `GROFF_TMPDIR=.'.
+       (CLEANADD): Include temporary files matching `pdf[0-9]*'.
+
 2006-02-26  Claudio Fontana  <address@hidden>
 
        * Makefile.sub: Add DESTDIR to install and uninstall targets
@@ -7,7 +31,7 @@
 
        pdfroff.sh portability enhancement.
 
-       * pdfroff.sh: (ARGLIST): Variable removed.
+       * pdfroff.sh (ARGLIST): Variable removed.
        (GROFF_STYLE): Use it for all groff invocations.
        (INPUT_FILES): Pass to all groff invocations, instead of ARGLIST.
        (CS_MACRO, CE_MACRO): Initialize independently.
@@ -17,7 +41,7 @@
 
 2005-06-17  Keith Marshall  <address@hidden>
 
-       * pdfroff.sh: (MATCH): Correct quoting.
+       * pdfroff.sh (MATCH): Correct quoting.
        (Source): Add terminating `$' on CVS keyword.
 
 2005-06-17  Zvezdan Petkovic  <address@hidden>
@@ -27,7 +51,7 @@
 
 2005-06-16  Bernd Warken
 
-       * pdfroff.sh: (NULLDEV): Correct misspelled instance of NULDEV.
+       * pdfroff.sh (NULLDEV): Correct misspelled instance of NULDEV.
 
 2005-05-28  Werner LEMBERG  <address@hidden>
 
@@ -45,7 +69,7 @@
        * pdfroff.man: Document influence of `OSTYPE' and `PATH_SEPARATOR'
        environment variables.
 
-       * Makefile.sub: (pdfroff): Make it depend on SH_DEPS_SED_SCRIPT,
+       * Makefile.sub (pdfroff): Make it depend on SH_DEPS_SED_SCRIPT,
        from arch/misc/shdeps.sh; use it to customize PATH_SEPARATOR
        initialization code for `searchpath' function in pdfroff.sh.
 
@@ -53,7 +77,7 @@
 
        Interim documentation update.
 
-       * pdfmark.ms: (GROFF-WEBSITE): New string; use it in references and
+       * pdfmark.ms (GROFF-WEBSITE): New string; use it in references and
        examples.
        (Section 2.5): Add definitions of D and Z operators, for use with
        pdfhref macro.
@@ -69,7 +93,7 @@
 
        Handle parsing anomalies in Cygwin's `ash', and similar, shells.
 
-       * pdfroff.sh: ($CAT, $GREP, $SED, $GROFF, $DIFF): Avoid interpreting
+       * pdfroff.sh ($CAT, $GREP, $SED, $GROFF, $DIFF): Avoid interpreting
        misdirected error messages, which `type' sends to `stdout' in some
        shells, as a successful program file match.
 
Index: groff/contrib/pdfmark/Makefile.sub
diff -u groff/contrib/pdfmark/Makefile.sub:1.8 
groff/contrib/pdfmark/Makefile.sub:1.9
--- groff/contrib/pdfmark/Makefile.sub:1.8      Sun Feb 26 14:02:58 2006
+++ groff/contrib/pdfmark/Makefile.sub  Thu Mar  9 00:40:11 2006
@@ -33,7 +33,8 @@
 CLEANADD=\
   gnu.eps \
   $(PDFDOCFILES) \
-  $(CMDFILES)
+  $(CMDFILES) \
+  pdf[0-9]*
 
 # Some `makes' don't predefine RM...
 RM=rm -f
@@ -50,10 +51,11 @@
 PFLAG=-dpaper=$(PAGE) -P-p$(PAGE)
 
 PDFROFF=\
+  export GROFF_TMPDIR; GROFF_TMPDIR='.'; \
   export GROFF_COMMAND_PREFIX; GROFF_COMMAND_PREFIX=''; \
   export GROFF_BIN_DIR; GROFF_BIN_DIR=$(GROFF_BIN_DIR); \
   export GROFF_BIN_PATH; GROFF_BIN_PATH=$(GROFF_BIN_PATH); \
-  ./pdfroff $(FFLAG) $(MFLAG) $(PFLAG)
+  ./pdfroff --keep-temporary-files $(FFLAG) $(MFLAG) $(PFLAG)
 
 .SUFFIXES: .ms .pdf
 .ms.pdf:
Index: groff/contrib/pdfmark/pdfroff.man
diff -u groff/contrib/pdfmark/pdfroff.man:1.3 
groff/contrib/pdfmark/pdfroff.man:1.4
--- groff/contrib/pdfmark/pdfroff.man:1.3       Wed May 18 07:03:07 2005
+++ groff/contrib/pdfmark/pdfroff.man   Thu Mar  9 00:40:11 2006
@@ -101,6 +101,7 @@
 .optx -pdf-output name
 .optx -reference-dictionary name
 .opt  -report-progress
+.opt  -keep-temporary-files
 .B file
 .I ...
 .ll
@@ -285,6 +286,19 @@
 to display a summary of the its usage syntax, and supported options,
 and then exit.
 .TP
+.B \-\-keep\-temporary\-files
+Suppresses the deletion of temporary files,
+which normally occurs after
+.B pdfroff
+has completed PDF document formatting;
+this may be useful,
+when debugging formatting problems.
+.IP
+See section
+.BR FILES ,
+for a description of the temporary files used by
+.BR pdfroff .
+.TP
 .B \-\-no\-pdf\-output
 May be used with the
 .BI \-\-reference\-dictionary= name
@@ -481,9 +495,90 @@
 .B pdfroff
 process itself, and
 .I *
-represents any of a number of extensions used by
+represents any of the extensions used by
 .B pdfroff
-for temporary and intermediate files.
+to identify the following temporary and intermediate files:\(em
+.RS
+.TP
+.BI pdf $$ .tmp
+A scratch pad file,
+used to capture reference data emitted by
+.BR groff ,
+during the
+.I reference dictionary
+compilation phase.
+.TP
+.BI pdf $$ .ref
+The
+.IR "reference dictionary" ,
+as compiled in the last but one pass of the
+.I reference dictionary
+compilation phase;
+(at the start of the first pass,
+this file is created empty;
+in successive passes,
+it contains the
+.I reference dictionary
+entries,
+as collected in the preceding pass).
+.IP
+If the
+.BR \-\-reference\-dictionary =\c
+.I name
+option is specified,
+this intermediate file becomes permanent,
+and is named
+.IR name ,
+rather than
+.BI pdf $$ .ref\c
+\&.
+.TP
+.BI pdf $$ .cmp
+Used to collect
+.I reference dictionary
+entries during the active pass of the
+.I reference dictionary
+compilation phase.
+At the end of any pass,
+when the content of
+.BI pdf $$ .cmp
+compares as identical to
+.BI pdf $$ .ref\c
+\&,
+(or the corresponding file named by the
+.BR \-\-reference\-dictionary =\c
+.I name
+option),
+then
+.I reference dictionary
+compilation is terminated,
+and the
+.I document reference map
+is appended to this intermediate file,
+for inclusion in the final formatting passes.
+.TP
+.BI pdf $$ .tc
+An intermediate
+.I PostScript
+file,
+in which \*(lqTable of Contents\*(rq entries are collected,
+to facilitate relocation before the body text,
+on ultimate output to the
+.I GhostScript
+postprocessor.
+.TP
+.BI pdf $$ .ps
+An intermediate
+.I PostScript
+file,
+in which the body text is collected prior to ultimate output to the
+.I GhostScript
+postprocessor,
+in the proper sequence,
+.I after
+.BI pdf $$ .tc\c
+\&.
+.RE
 .
 .\" --------------------------------------------------------------------
 .
Index: groff/contrib/pdfmark/pdfroff.sh
diff -u groff/contrib/pdfmark/pdfroff.sh:1.8 
groff/contrib/pdfmark/pdfroff.sh:1.9
--- groff/contrib/pdfmark/pdfroff.sh:1.8        Fri Feb 24 08:08:42 2006
+++ groff/contrib/pdfmark/pdfroff.sh    Thu Mar  9 00:40:11 2006
@@ -45,7 +45,7 @@
   #
   # Usage:  searchpath progname path
   #
-    IFS="${PATH_SEPARATOR-":"}" prog=':'
+    IFS=${PATH_SEPARATOR-":"} prog=':'
     for dir in $2
     do
       for ext in '' '.exe'
@@ -63,6 +63,12 @@
   }
 # @PATH_SEARCH_SETUP@
 #
+# If the system maps '/bin/sh' to some 'zsh' implementation,
+# then we may need this hack, adapted from autoconf code.
+#
+  test x${ZSH_VERSION+"set"} = x"set" && NULLCMD=":" \
+    && (emulate sh) >$NULLDEV 2>&1 && emulate sh
+#
 # We need both 'grep' and 'sed' programs, to parse script options,
 # and we also need 'cat', to display help and some error messages,
 # so ensure they are all installed, before we continue.
@@ -142,7 +148,7 @@
   TOC_FORMAT="-rPHASE=1"
   BODY_FORMAT="-rPHASE=2"
 #
-  LONGOPTS="
+  LONGOPTS="   keep-temporary-files
     help       reference-dictionary    no-reference-dictionary
     stylesheet pdf-output              no-pdf-output
     version    report-progress         no-toc-relocation
@@ -179,7 +185,7 @@
            case "$MATCH" in
 
              --help)
-               $CAT >&2 <<-ETX
+               $CAT <<-ETX
                Usage: $CMD [-option ...] [--long-option ...] [file ...]
 
                Options:
@@ -231,6 +237,10 @@
                        normally required to position the table of contents at 
the
                        start of a PDF document.
 
+                 --keep-temporary-files
+                       Suppress the normal clean up of temporary files, which 
is
+                       scheduled when 'pdfroff' completes.
+
                ETX
                exit 0
                ;;
@@ -244,6 +254,10 @@
                SHOW_PROGRESS=echo
                ;;
 
+             --keep-temporary-files)
+               trap "" 0
+               ;;
+
              --pdf-output)
               PDF_OUTPUT="$OPTARG"
               ;;
@@ -374,7 +388,7 @@
   then
     >> $REFFILE
     echo kickstart > $REFCOPY
-    test "${SHOW_PROGRESS+"set"}" = "set" && SAY=echo
+    test x${SHOW_PROGRESS+"set"} = x"set" && SAY=echo
 #
 #   In order to correctly resolve 'pdfmark' references,
 #   we need to have both the 'awk' and 'diff' programs available.
@@ -514,7 +528,7 @@
 # (Missing 'awk' or 'diff' may have disabled it, to avoid display
 #  of spurious messages associated with reference resolution).
 #
-  test "${SHOW_PROGRESS+"set"}" = "set" && SAY=echo
+  test x${SHOW_PROGRESS+"set"} = x"set" && SAY=echo
 #
 # If a document cover style sheet is specified ...
 # then we run a special formatting pass, to create a cover section file.
@@ -569,4 +583,4 @@
   $SAY >&2 ". done"
 #
 # 
------------------------------------------------------------------------------
-# $RCSfile: pdfroff.sh,v $ $Revision: 1.8 $: end of file
+# $RCSfile: pdfroff.sh,v $ $Revision: 1.9 $: end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]