On Wed, Dec 30, 2015 at 12:12:16PM -0500, Ted Unangst wrote:
> My understanding is that "apropos Vt=short" should find the stdarg.3 man page.
> "apropos Va=va_list" does find the page, so I think I have a working index.
> 

I decided to take a crack at this since there hasn't been a response
yet. It looks like .Vt wasn't getting processed into mandoc.db at all;
the following patch should fix this and let you search for .Vt anywhere
(just like .Va), not just in the mdoc body. Also, remove parse_mdoc_body
as it is now unused.

Index: mandocdb.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/mandocdb.c,v
retrieving revision 1.163
diff -u -p -r1.163 mandocdb.c
--- mandocdb.c  15 Dec 2015 17:36:19 -0000      1.163
+++ mandocdb.c  3 Jan 2016 18:25:13 -0000
@@ -148,8 +148,6 @@ static      void     parse_man(struct mpage *, c
                        const struct roff_node *);
 static void     parse_mdoc(struct mpage *, const struct roff_meta *,
                        const struct roff_node *);
-static int      parse_mdoc_body(struct mpage *, const struct roff_meta *,
-                       const struct roff_node *);
 static int      parse_mdoc_head(struct mpage *, const struct roff_meta *,
                        const struct roff_node *);
 static int      parse_mdoc_Fd(struct mpage *, const struct roff_meta *,
@@ -235,7 +233,7 @@ static      const struct mdoc_handler mdocs[M
        { NULL, 0 },  /* Rv */
        { NULL, TYPE_St },  /* St */
        { NULL, TYPE_Va },  /* Va */
-       { parse_mdoc_body, TYPE_Va },  /* Vt */
+       { NULL, TYPE_Vt },  /* Vt */
        { parse_mdoc_Xr, 0 },  /* Xr */
        { NULL, 0 },  /* %A */
        { NULL, 0 },  /* %B */
@@ -1732,14 +1730,6 @@ parse_mdoc_head(struct mpage *mpage, con
 {
 
        return n->type == ROFFT_HEAD;
-}
-
-static int
-parse_mdoc_body(struct mpage *mpage, const struct roff_meta *meta,
-       const struct roff_node *n)
-{
-
-       return n->type == ROFFT_BODY;
 }
 
 /*

Reply via email to