bug-groff
[Top][All Lists]
Advanced

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

[bug #55302] 'grog' emits confusing warnings for some man pages


From: Bjarni Ingi Gislason
Subject: [bug #55302] 'grog' emits confusing warnings for some man pages
Date: Fri, 4 Dec 2020 12:20:28 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

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

Subject: [PATCH] grog/subs.pl: Suggestion for a (minimal) fix for the bug
#55302.

  Original message is:

ms requests found, but file name extension was: man

  Add more information and words to the message to make it more
understandable.

  After patch message is:

ms requests found, but the file name extension (1) was of type: man
groff -T ps -ms /tmp/gdb.1

  The cause of the failure of "grog" is that some manuals are
produced by "Pod::Man" (a perl module or podlator),
that puts its "Standard preamble" _before_ the ".TH" macro instead of
after it.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 src/roff/grog/subs.pl | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index cc50ea3d..65108e38 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -164,6 +164,7 @@ my %preprocs_tmacs =
 my @filespec;
 
 my $tmac_ext = '';
+my $ext = '';
 
 
 ########################################################################
@@ -328,7 +329,8 @@ sub handle_file_ext {
 
 ##### handle_file_ext()
     # get extension
-    my $ext = $file;
+#    my $ext = $file;
+    $ext = $file;
     $ext =~ s/^
              .*
              \.
@@ -1012,8 +1014,8 @@ sub make_groff_tmac_man_ms {
     push(@m, '-man');
 
     $tmac_ext = 'man' unless ( $tmac_ext );
-    &err('man requests found, but file name extension ' .
-        'was: ' . $tmac_ext) unless ( $tmac_ext eq 'man' );
+    &err('man requests found, but the file name extension (' . $ext .
+        ') was of type: ' . $tmac_ext) unless ( $tmac_ext eq 'man' );
     $tmac_ext = 'man';
     return 1;  # true
   }
@@ -1032,8 +1034,8 @@ sub make_groff_tmac_man_ms {
     push(@m, '-ms');
 
     $tmac_ext = 'ms' unless ( $tmac_ext );
-    &err('ms requests found, but file name extension ' .
-        'was: ' . $tmac_ext) unless ( $tmac_ext eq 'ms' );
+    &err('ms requests found, but the file name extension (' . $ext .
+        ') was of type: ' . $tmac_ext) unless ( $tmac_ext eq 'ms' );
     $tmac_ext = 'ms';
     return 1;  # true
   }
-- 
2.29.2



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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