From ed87b2a8e96af89d3a3b9c08e891054f52cfa71b Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 4 Dec 2014 18:31:20 +0000 Subject: in the SYNOPSIS, add .Fo and first .Fn arguments to the names table --- mandocdb.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index 986c6a50..e303e6f2 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.172 2014/12/04 17:36:00 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.173 2014/12/04 18:31:20 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze @@ -165,6 +165,8 @@ static int parse_mdoc_Fd(struct mpage *, const struct mdoc_meta *, const struct mdoc_node *); static int parse_mdoc_Fn(struct mpage *, const struct mdoc_meta *, const struct mdoc_node *); +static int parse_mdoc_Fo(struct mpage *, const struct mdoc_meta *, + const struct mdoc_node *); static int parse_mdoc_Nd(struct mpage *, const struct mdoc_meta *, const struct mdoc_node *); static int parse_mdoc_Nm(struct mpage *, const struct mdoc_meta *, @@ -300,7 +302,7 @@ static const struct mdoc_handler mdocs[MDOC_MAX] = { { NULL, 0 }, /* Ux */ { NULL, 0 }, /* Xc */ { NULL, 0 }, /* Xo */ - { parse_mdoc_head, 0 }, /* Fo */ + { parse_mdoc_Fo, 0 }, /* Fo */ { NULL, 0 }, /* Fc */ { NULL, 0 }, /* Oo */ { NULL, 0 }, /* Oc */ @@ -1651,6 +1653,8 @@ parse_mdoc_Fn(struct mpage *mpage, const struct mdoc_meta *meta, cp++; putkey(mpage, cp, TYPE_Fn); + if (n->sec == SEC_SYNOPSIS) + putkey(mpage, cp, NAME_SYN); if (n->string < cp) putkeys(mpage, n->string, cp - n->string, TYPE_Ft); @@ -1662,6 +1666,17 @@ parse_mdoc_Fn(struct mpage *mpage, const struct mdoc_meta *meta, return(0); } +static int +parse_mdoc_Fo(struct mpage *mpage, const struct mdoc_meta *meta, + const struct mdoc_node *n) +{ + + putmdockey(mpage, n->child, TYPE_Fn); + if (n->sec == SEC_SYNOPSIS) + putmdockey(mpage, n->child, NAME_SYN); + return(0); +} + static int parse_mdoc_Xr(struct mpage *mpage, const struct mdoc_meta *meta, const struct mdoc_node *n) -- cgit v1.2.3