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, $_;
}
_______________________________________________
bug-groff mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-groff