summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-04 18:31:20 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-04 18:31:20 +0000
commit39bbe0933c7be7712ead5be032ed2f35757c79f6 (patch)
treecb35197e90f749d9ce0c3a5f5ee872d2829a6aca /mandocdb.c
parentf0dc503a02157f27d976f25b0144e2077524c5d9 (diff)
downloadmandoc-39bbe0933c7be7712ead5be032ed2f35757c79f6.tar.gz
in the SYNOPSIS, add .Fo and first .Fn arguments to the names table
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/mandocdb.c b/mandocdb.c
index c1356822..2eb3e524 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -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);
@@ -1663,6 +1667,17 @@ parse_mdoc_Fn(struct mpage *mpage, const struct mdoc_meta *meta,
}
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)
{