diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-12-04 18:31:05 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-12-04 18:31:05 +0000 |
commit | c287c57fa80ff88fa9e747909a47591c6ad1262d (patch) | |
tree | c73b22fc96d5a1e448fca6f701e33197315fca02 | |
parent | c8fb32e70f8272676331d1b350b4448109da8442 (diff) |
in the SYNOPSIS, add .Fo and first .Fn arguments to the names table
-rw-r--r-- | usr.bin/mandoc/mandocdb.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c index a1af01b621e..2536649790c 100644 --- a/usr.bin/mandoc/mandocdb.c +++ b/usr.bin/mandoc/mandocdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mandocdb.c,v 1.127 2014/12/04 17:35:42 schwarze Exp $ */ +/* $OpenBSD: mandocdb.c,v 1.128 2014/12/04 18:31:04 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -155,6 +155,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 *, @@ -290,7 +292,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 */ @@ -1641,6 +1643,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); @@ -1653,6 +1657,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) { |