Follow-up Comment #1, bug #55301 (project groff):

>From 2918493dc289b3c11bad210ed372aba65d5fe3a9 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <[email protected]>
Date: Fri, 25 Dec 2020 16:39:17 +0000
Subject: [PATCH] grog/subs.pl: Use GROFF_TYPESETTER if defined and no '-T'
 option

src/roff/grog/subs.pl: Use GROFF_TYPESETTER if defined and no '-T'
option

  Use the value of the environmental variable GROFF_TYPESETTER,
if there is no '-T' option on the command line.

Signed-off-by: Bjarni Ingi Gislason <[email protected]>
---
 src/roff/grog/subs.pl | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 82550ed5..e40450d5 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -917,7 +917,15 @@ sub make_groff_device {
 
   # default device is 'ps' when without '-T'
   my $device;
-  push @devices, 'ps' unless ( @devices );
+
+  if ( ! @devices ) {
+    if ( defined $ENV{'GROFF_TYPESETTER'} ) {
+      push @devices, $ENV{'GROFF_TYPESETTER'};
+      }
+    else {
+      push @devices, 'ps';
+    }
+  }
 
 ###### make_groff_device()
   for my $d ( @devices ) {
-- 
2.29.2



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55301>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply via email to