groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/02: Revert "Make pdfmom more versatile."


From: G. Branden Robinson
Subject: [groff] 01/02: Revert "Make pdfmom more versatile."
Date: Mon, 20 Mar 2023 04:21:29 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit f4ff4da245d9ae269636fc2225caf632414da4c3
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Mar 14 18:39:44 2023 -0500

    Revert "Make pdfmom more versatile."
    
    This reverts commit 0290924f05f823039c546f5b14422af7eef70644.
    
    This has been separately committed on the post-1.23.0 branch so that it
    is easier for Bertrand to decide where to place a tag for 1.23.0.rc4 in
    this branch, or which commits to cherry-pick from that branch before
    doing so.  (It is not yet decided what commits since 1.23.0.rc3 from
    this branch of post-1.23.0 will comprise 1.23.0.rc4--possibly all.)
---
 ChangeLog                       |  8 --------
 src/devices/gropdf/pdfmom.1.man | 16 ----------------
 src/devices/gropdf/pdfmom.pl    | 34 +++++-----------------------------
 3 files changed, 5 insertions(+), 53 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d2f91425b..36c7200a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,3 @@
-2023-02-11  Deri James  <deri@chuzzlewit.myzen.co.uk>
-
-        Make pdfmom more versatile.
-
-        * src/devices/gropdf/pdfmom.pl: Add flag -roff which severs
-        hardcoded link to the mom macros.
-        * src/devices/gropdf/pdfmom.pl: Document changes.
-
 2023-03-06  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        Use a better type for symbol hashes.
diff --git a/src/devices/gropdf/pdfmom.1.man b/src/devices/gropdf/pdfmom.1.man
index 64176cd03..1b3dc014a 100644
--- a/src/devices/gropdf/pdfmom.1.man
+++ b/src/devices/gropdf/pdfmom.1.man
@@ -54,7 +54,6 @@ macro package for
 .
 .SY pdfmom
 .RB [ \-Tpdf ]
-.RB [ \-roff ]
 .RI [ groff-options ]
 .RI [ file\~ .\|.\|.]
 .YS
@@ -90,21 +89,6 @@ macros.
 .
 .
 .P
-If the
-.B \-roff
-option is used the link to
-.I mom
-is severed and the wrapper can be used with other macro sets.
-This is also true if the wrapper is renamed or linked as a
-pseudonym, so creating a link called
-.I pdfms
-which targets pdfmom will create a wrapper for creating pdfs
-with the
-.I ms
-macro.
-.
-.
-.P
 .I pdfmom
 prints to the standard output,
 so output must usually be redirected to a destination file.
diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl
index 3a410d8ad..89977d496 100644
--- a/src/devices/gropdf/pdfmom.pl
+++ b/src/devices/gropdf/pdfmom.pl
@@ -1,6 +1,6 @@
 #!@PERL@
 #
-#      pdfmom          : Frontend to run groff to produce PDFs
+#      pdfmom          : Frontend to run groff -mom to produce PDFs
 #      Deri James      : Friday 16 Mar 2012
 #
 
@@ -29,19 +29,6 @@ my @cmd;
 my $dev='pdf';
 my $preconv='';
 my $readstdin=1;
-my $mom='-mom';
-if ($0=~m/pdf(\w+)$/)
-{
-    my $m=$1;
-    if ($m=~m/^(mom|mm|ms|me|man|mandoc)$/)
-    {
-        $mom="-".$m;
-    }
-    else
-    {
-        $mom='';
-    }
-}
 my $RT_SEP='@RT_SEP@';
 
 $ENV{PATH}=$ENV{GROFF_BIN_PATH}.$RT_SEP.$ENV{PATH} if 
exists($ENV{GROFF_BIN_PATH});
@@ -86,10 +73,6 @@ while (my $c=shift)
        $dev=$c;
        next;
     }
-    elsif ($c eq '-roff' or $c eq '--roff')
-    {
-        $mom='';
-    }
     elsif ($c eq '-v' or $c eq '--version')
     {
        print "GNU pdfmom (groff) version @VERSION@\n";
@@ -140,26 +123,19 @@ if ($readstdin)
 
 if ($dev eq 'pdf')
 {
-    if ($mom)
-    {
-        system("groff -Tpdf -dLABEL.REFS=1 $mom -z $cmdstring 2>&1 | LC_ALL=C 
grep '^\\. *ds' | groff -Tpdf -dPDF.EXPORT=1 -dLABEL.REFS=1 $mom -z - 
$cmdstring 2>&1 | LC_ALL=C grep '^\\. *ds' | groff -Tpdf $mom $preconv - 
$cmdstring");
-    }
-    else
-    {
-        system("groff -Tpdf -dPDF.EXPORT=1 -z $cmdstring 2>&1 | LC_ALL=C grep 
'^\\. *ds' | groff -Tpdf $preconv - $cmdstring");
-    }
+    system("groff -Tpdf -dLABEL.REFS=1 -mom -z $cmdstring 2>&1 | LC_ALL=C grep 
'^\\. *ds' | groff -Tpdf -dPDF.EXPORT=1 -dLABEL.REFS=1 -mom -z - $cmdstring 
2>&1 | LC_ALL=C grep '^\\. *ds' | groff -Tpdf -mom $preconv - $cmdstring");
 }
 elsif ($dev eq 'ps')
 {
-    system("groff -Tpdf -dLABEL.REFS=1 $mom -z $cmdstring 2>&1 | LC_ALL=C grep 
'^\\. *ds' | pdfroff -mpdfmark $mom --no-toc - $preconv $cmdstring");
+    system("groff -Tpdf -dLABEL.REFS=1 -mom -z $cmdstring 2>&1 | LC_ALL=C grep 
'^\\. *ds' | pdfroff -mpdfmark -mom --no-toc - $preconv $cmdstring");
 }
 elsif ($dev eq '-z') # pseudo dev - just compile for warnings
 {
-    system("groff -Tpdf $mom -z $cmdstring");
+    system("groff -Tpdf -mom -z $cmdstring");
 }
 elsif ($dev eq '-Z') # pseudo dev - produce troff output
 {
-    system("groff -Tpdf $mom -Z $cmdstring");
+    system("groff -Tpdf -mom -Z $cmdstring");
 }
 else
 {



reply via email to

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