Bug#847972: man: Eliminate warnings from '*roff' about the undefined register 'F'
Bjarni Ingi Gislason
bjarniig at rhi.hi.is
Tue Dec 13 23:17:18 UTC 2016
On Mon, Dec 12, 2016 at 06:40:21PM -0800, Russ Allbery wrote:
> Bjarni Ingi Gislason <bjarniig at rhi.hi.is> writes:
>
> > 1) The comment is wrong, because the code was changed from what it
> > originally was (in my patch in the original bug report; see the last
> > line of my input in the first e-mail of this thread).
>
> Well, the comment is correct in that this is what is being attempted. :)
> Apparently it isn't working again.
>
> Your original patch caused problems on HP-UX, which is why it was changed
> upstream. See:
>
> https://rt.cpan.org/Public/Bug/Display.html?id=92979
>
I found my patch to be too complicated. A simpler and correct solution is
worded at the end of this e-mail.
> However, I think all those changes may have not been necessary and only
> the missing backslashes were necessary and your original patch was
> otherwise fine once those backslashes are added (and possibly more correct
> in avoiding warnings). I'll give that a try.
>
There is no need for any changes (from the original). My patch was at the
wrong place.
> Apologies for the regression; this is the confluence of two things that
> basically no one ever does (enable nroff warnings, and use this obscure
> indexing code), so it's essentially never tested.
>
> > 1) 'F' is not a random register in manual pages.
>
> It is, though. It's a completely random register picked by Tom
> Christiansen years and years ago to hang this feature off of because it
> wasn't used for anything else. From the nroff and man-db perspective,
> it's just some random user-defined register, not anything special.
>
I have a different conception of "random". The variable 'F' is in all
manual pages, that "pod2man" creates. Besides that, it is an "input
variable"(!) for "*roff".
> Honestly, there's part of me that just wants to drop this entire feature
> from Pod::Man, since I'm dubious that anyone actually runs roffitall more
> than once every five years or so, or that it's worth maintaining all this
> rather opaque code to support. But I try to be intensely backward
> compatible about Pod::Man.
>
There is no need to change anything.
While thinking about my suggestion of adding '-rF=0' to the code of "man"
(hard-coded addition), I realized that it was a bad idea. Better to add it
as an option to "man", but option "-r" is already used by it. So an
environmental variable should be better. It could then contain all options
that "*roff" accepts. A name like "ROFFOPTIONS" occurred to me.
(Not sure if the following is really correct, as my memory is not so
reliable.)
While reading the code of "man", I saw the name "MANROFFOPT" (was
searching for "ROFFOPT" (short for "ROFFOPTIONS"). Checking the manual page
of "man", this was exactly the environmental variable I was interested in.
So there are only two small changes needed to "man.c":
1) The default value of "roff_opt" is "-rF0" and not an empty value. Plus a
comment about the reason.
2) Adding an explanation to the manual, saying what the default value is and
why.
In the meantime an user can define "MANROFFOPT='-rF0'" or even
"MANROFFOPT='-rF1'" to get the list according to the "IX" macro.
My statement ("indeed it can't") in an earlier e-mail of mine about:
And "man" is not used to get these index entries, indeed it can't.
is thus wrong.
> --
> Russ Allbery (rra at debian.org) <http://www.eyrie.org/~eagle/>
--
Bjarni I. Gislason
More information about the Perl-maintainers
mailing list