diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2023-03-14 18:39:44 -0500 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2023-03-20 03:21:02 -0500 |
commit | f4ff4da245d9ae269636fc2225caf632414da4c3 (patch) | |
tree | 5f7c5b1c8ae31f8d4b53bd8ef79cbe285d19b162 /src | |
parent | 0290924f05f823039c546f5b14422af7eef70644 (diff) | |
download | groff-git-f4ff4da245d9ae269636fc2225caf632414da4c3.tar.gz |
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.)
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/gropdf/pdfmom.1.man | 16 | ||||
-rw-r--r-- | src/devices/gropdf/pdfmom.pl | 34 |
2 files changed, 5 insertions, 45 deletions
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 { |