groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff/contrib/pdfmark ChangeLog pdfroff.sh


From: Werner LEMBERG
Subject: [Groff-commit] groff/contrib/pdfmark ChangeLog pdfroff.sh
Date: Thu, 23 Jun 2005 16:59:35 -0400

CVSROOT:        /cvsroot/groff
Module name:    groff
Branch:         
Changes by:     Werner LEMBERG <address@hidden> 05/06/23 20:59:35

Modified files:
        contrib/pdfmark: ChangeLog pdfroff.sh 

Log message:
        pdfroff.sh portability enhancement.
        
        * 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.
        (CS_FILTER): Simplify quoting; it used to confuse some shells.
        (Source): CVS keyword removed; replaced by...
        (RCSfile, Revision): these.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/contrib/pdfmark/ChangeLog.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/contrib/pdfmark/pdfroff.sh.diff?tr1=1.6&tr2=1.7&r1=text&r2=text

Patches:
Index: groff/contrib/pdfmark/ChangeLog
diff -u groff/contrib/pdfmark/ChangeLog:1.12 
groff/contrib/pdfmark/ChangeLog:1.13
--- groff/contrib/pdfmark/ChangeLog:1.12        Fri Jun 17 07:11:37 2005
+++ groff/contrib/pdfmark/ChangeLog     Thu Jun 23 20:59:34 2005
@@ -1,3 +1,15 @@
+2005-06-22  Keith Marshall  <address@hidden>
+
+       pdfroff.sh portability enhancement.
+
+       * 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.
+       (CS_FILTER): Simplify quoting; it used to confuse some shells.
+       (Source): CVS keyword removed; replaced by...
+       (RCSfile, Revision): these.
+
 2005-06-17  Keith Marshall  <address@hidden>
 
        * pdfroff.sh: (MATCH): Correct quoting.
@@ -8,7 +20,7 @@
        * Makefile.sub: (RM): Define as `rm -f', for `make' programs
        which don't predefine it.
 
-2005-06-16  Bernd Warken  <address@hidden>
+2005-06-16  Bernd Warken
 
        * pdfroff.sh: (NULLDEV): Correct misspelled instance of NULDEV.
 
Index: groff/contrib/pdfmark/pdfroff.sh
diff -u groff/contrib/pdfmark/pdfroff.sh:1.6 
groff/contrib/pdfmark/pdfroff.sh:1.7
--- groff/contrib/pdfmark/pdfroff.sh:1.6        Fri Jun 17 07:11:37 2005
+++ groff/contrib/pdfmark/pdfroff.sh    Thu Jun 23 20:59:34 2005
@@ -152,7 +152,7 @@
 # to be passed on to 'groff', enforcing the '-Tps' option.
 #
   DIFF="" STREAM="" INPUT_FILES=""
-  SHOW_VERSION="" ARGLIST="-Tps" GROFF_STYLE="$GROFF -Tps"
+  SHOW_VERSION="" GROFF_STYLE="$GROFF -Tps"
   while test $# -gt 0
   do
     case "$1" in
@@ -236,7 +236,7 @@
                ;;
 
              --version)
-              ARGLIST="$ARGLIST \"$1\""
+              GROFF_STYLE="$GROFF_STYLE \"$1\""
                SHOW_VERSION="GNU pdfroff (groff) version @VERSION@"
                ;;
 
@@ -291,7 +291,8 @@
 #
       - | -i*)
           STREAM="$CAT ${GROFF_TMPDIR}/pdf$$.in |"
-          ARGLIST="$ARGLIST $1" INPUT_FILES="$INPUT_FILES $1"
+          test "$1" = "-" && INPUT_FILES="$INPUT_FILES $1" \
+            || GROFF_STYLE="$GROFF_STYLE $1" 
           ;;
 #
 #     Those standard options which expect an argument, but are specified with
@@ -325,14 +326,13 @@
 #     All other standard options are simply passed through to 'groff',
 #     with no validation beforehand.
 #
-      -*)  ARGLIST="$ARGLIST \"$1\"" GROFF_STYLE="$GROFF_STYLE \"$1\""
+      -*)  GROFF_STYLE="$GROFF_STYLE \"$1\""
            ;;
 #
 #     All non-option arguments are considered as possible input file names,
 #     and are passed on to 'groff', unaltered.
 #
-      *)   ARGLIST="$ARGLIST \"$1\""
-           test -f "$1" && INPUT_FILES="$INPUT_FILES \"$1\""
+      *)   INPUT_FILES="$INPUT_FILES \"$1\""
            ;;
     esac
     shift
@@ -345,7 +345,7 @@
   if test -n "$SHOW_VERSION"
   then
     echo >&2 "$SHOW_VERSION"
-    echo >&2; eval $GROFF $ARGLIST
+    echo >&2; eval $GROFF_STYLE $INPUT_FILES
     exit $?
   fi
 #
@@ -460,7 +460,7 @@
 #   filtering them into the reference dictionary; discard incomplete 'groff' 
output
 #   at this stage.
 #
-    eval $STREAM $GROFF -Z 1>$NULLDEV 2>$WRKFILE $REFCOPY $ARGLIST
+    eval $STREAM $GROFF_STYLE -Z 1>$NULLDEV 2>$WRKFILE $REFCOPY $INPUT_FILES
     $AWK '/^gropdf-info:href/ {$1 = ".pdfhref D -N"; print}' $WRKFILE > 
$REFFILE
   done
   $SAY >&2 " done"
@@ -522,8 +522,9 @@
   if test -n "$STYLESHEET"
   then
     DOT='^\.[  ]*'
+    CS_MACRO=${CS_MACRO-"CS"} CE_MACRO=${CE_MACRO-"CE"}
     $SAY >&2 $n "Formatting document ... front cover section ..$c"
-    CS_FILTER="$STREAM $SED -n 
'/$DOT${CS_MACRO-"CS"}/,/$DOT${CE_MACRO-"CE"}/p'"
+    CS_FILTER="$STREAM $SED -n '/${DOT}${CS_MACRO}/,/${DOT}${CE_MACRO}/p'"
     eval $CS_FILTER $INPUT_FILES | eval $GROFF_STYLE $STYLESHEET - > $CS_DATA
     $SAY >&2 ". done"
   fi
@@ -534,14 +535,14 @@
   if test -n "$TC_DATA"
   then
     $SAY >&2 $n "Formatting document ... table of contents ..$c"
-    eval $STREAM $GROFF $TOC_FORMAT $REFCOPY $ARGLIST > $TC_DATA
+    eval $STREAM $GROFF_STYLE $TOC_FORMAT $REFCOPY $INPUT_FILES > $TC_DATA
     $SAY >&2 ". done"
   fi
 #
 # In all cases, a final 'groff' pass is required, to format the document body.
 #
   $SAY >&2 $n "Formatting document ... body section ..$c"
-  eval $STREAM $GROFF $BODY_FORMAT $REFCOPY $ARGLIST > $BD_DATA
+  eval $STREAM $GROFF_STYLE $BODY_FORMAT $REFCOPY $INPUT_FILES > $BD_DATA
   $SAY >&2 ". done"
 #
 # Finally ...
@@ -568,4 +569,4 @@
   $SAY >&2 ". done"
 #
 # 
------------------------------------------------------------------------------
-# $Source: /cvsroot/groff/groff/contrib/pdfmark/pdfroff.sh,v $: end of file
+# $RCSfile: pdfroff.sh,v $ $Revision: 1.7 $: end of file




reply via email to

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