bug-groff
[Top][All Lists]
Advanced

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

groffer doesn't work properly when used to view manpages (patches attach


From: James Budiono
Subject: groffer doesn't work properly when used to view manpages (patches attached)
Date: Sun, 23 Jan 2011 10:32:54 +1100

GROFF VERSION:
1.20. But the bug still exist in 1.21 (I checked the source).

MACHINE:
Generic x86-64 machine.

OS:
Linux 2.6.35.7 (distribution Fatdog64)

COMPILER:
gcc 4.4.3

INPUT FILES:
none - this is behavioural problem

COMMAND LINE:
groffer man:djvu
groffer --tty man:djvu
(Note: djvu can be replaced with any man page)

DESCRIPTION OF INCORRECT BEHAVIOUR:
The first invocation (without --tty) just hangs on the terminal.

The second invocation (with --tty) produces an error of not being able to find
pager, when pager program (less) is obviously available.

main_display(): no pager program found for tty mode; at /usr/bin/groffer line 1943.
cannot remove path when cwd is /tmp/groffer_1684_xarx for /tmp/groffer_1684_xarx:  at /usr/lib64/perl5/5.10.1/File/Temp.pm line 902

SUGGESTED FIX [optional]:
Patches attached for contrib/groffer.pl and contrib/man.pl

--- groffer.pl.old    2011-01-23 10:11:11.000000000 +1100
+++ groffer.pl    2011-01-23 10:12:12.000000000 +1100
@@ -1323,8 +1323,8 @@ sub _get_first_prog {
     if (%prog) {
       $Display{'PROG'} = $prog{'fullname'};
       $Display{'ARGS'} = $prog{'args'};
+      return 1;  # james bug fix
     }
-    return 1;
   }
   return 0;
 } # _get_first_prog() of main_set_mode()

--- man.pl.old    2011-01-23 10:11:48.000000000 +1100
+++ man.pl    2011-01-23 10:13:01.000000000 +1100
@@ -522,7 +522,8 @@ sub manpath_set_from_path {
   my @path =
     qw( /usr/local /usr /usr/X11R6 /usr/openwin /opt /opt/gnome /opt/kde );
   # get a basic man path from $ENV{PATH}
-  foreach (@main::Path) {
+  my @path2 = @main::Path; # james bug fix
+  foreach (@path2) { # james bug fix
     s#bin/*$##;
     push @path, $_;
   }


reply via email to

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