tags 271402 fixed-upstream
thanks
On Sun, Sep 12, 2004 at 09:01:34PM -0400, Albert Cahalan wrote:
> For apropos+whatis generation, *roff commands should be skipped.
> Actually, anything past the first line should be ignored, since
> it isn't legal anyway and it messes up apropos+whatis output.
Thanks for your report. I wouldn't go quite so far as to say that
anything past the first line should be ignored; I try to strike a
balance between what I think is correct and parsing an acceptable number
of extant manual pages, and there are a *lot* of manual pages out there
that spread their description over multiple lines. In fact I don't think
this is particularly unreasonable, and there's precious little in the
way of standards documentation to tell me I'm wrong, so I have no qualms
about parsing that kind of thing.
You're right that the excessive parsing of *roff requests is
problematic, though, and it's been something I've wanted to rework for
quite a while. (As a workaround, of course, simply put your preamble at
the start of the next section or something rather than within .SH NAME.
Indeed, pod2man puts its preamble before .TH.) I've finally got round to
fixing this for the upcoming man-db 2.5.4, including some changes that
were needed to continue parsing certain BSD-derived pages following this
change:
Sat Dec 6 22:57:14 GMT 2008 Colin Watson <[EMAIL PROTECTED]>
Reorganise lexgrog to stop on any unrecognised roff request, rather
than continuing and often littering the database with garbage
(Debian bug #271402). This also involved extending lexgrog to
recognise some additional requests.
* src/lexgrog.l (word): New definition.
(typeface): Add .SB and .SM.
(MAN_PRENAME): Go straight to MAN_REST on encountering a section
request or EOF. Go to MAN_NAME on encountering roff requests that
would ordinarily be processed and removed. Skip over any other
roff requests, including spacing and comments.
(MAN_NAME): Process .Tn and .Nm by handling their arguments as
text. Process .At, .Bsx, .Bx, .Fx, .Nx, .Ox, and .Ux by inserting
the appropriate text (introducing several new mini-scanners).
Process .Dq by surrounding its arguments by double quotes. Go to
MAN_REST on encountering any unrecognised roff request.
(add_wordn_to_whatis, add_word_to_whatis, mdoc_text): New
functions to support scanning of .At and friends.
--
Colin Watson [EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]