summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mandocdb.c38
1 files changed, 5 insertions, 33 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 80971027..237cb8c4 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -154,11 +154,9 @@ static int parse_mdoc_body(struct mpage *, const struct mdoc_node *);
static int parse_mdoc_head(struct mpage *, const struct mdoc_node *);
static int parse_mdoc_Fd(struct mpage *, const struct mdoc_node *);
static int parse_mdoc_Fn(struct mpage *, const struct mdoc_node *);
-static int parse_mdoc_In(struct mpage *, const struct mdoc_node *);
static int parse_mdoc_Nd(struct mpage *, const struct mdoc_node *);
static int parse_mdoc_Nm(struct mpage *, const struct mdoc_node *);
static int parse_mdoc_Sh(struct mpage *, const struct mdoc_node *);
-static int parse_mdoc_St(struct mpage *, const struct mdoc_node *);
static int parse_mdoc_Xr(struct mpage *, const struct mdoc_node *);
static void putkey(const struct mpage *,
const char *, uint64_t);
@@ -216,7 +214,7 @@ static const struct mdoc_handler mdocs[MDOC_MAX] = {
{ parse_mdoc_Fn, 0 }, /* Fn */
{ NULL, TYPE_Ft }, /* Ft */
{ NULL, TYPE_Ic }, /* Ic */
- { parse_mdoc_In, TYPE_In }, /* In */
+ { NULL, TYPE_In }, /* In */
{ NULL, TYPE_Li }, /* Li */
{ parse_mdoc_Nd, TYPE_Nd }, /* Nd */
{ parse_mdoc_Nm, TYPE_Nm }, /* Nm */
@@ -224,7 +222,7 @@ static const struct mdoc_handler mdocs[MDOC_MAX] = {
{ NULL, 0 }, /* Ot */
{ NULL, TYPE_Pa }, /* Pa */
{ NULL, 0 }, /* Rv */
- { parse_mdoc_St, 0 }, /* St */
+ { NULL, TYPE_St }, /* St */
{ NULL, TYPE_Va }, /* Va */
{ parse_mdoc_body, TYPE_Va }, /* Vt */
{ parse_mdoc_Xr, 0 }, /* Xr */
@@ -1441,18 +1439,7 @@ parse_mdoc_Fd(struct mpage *mpage, const struct mdoc_node *n)
if (end > start)
putkeys(mpage, start, end - start + 1, TYPE_In);
- return(1);
-}
-
-static int
-parse_mdoc_In(struct mpage *mpage, const struct mdoc_node *n)
-{
-
- if (NULL != n->child && MDOC_TEXT == n->child->type)
- return(0);
-
- putkey(mpage, n->child->string, TYPE_In);
- return(1);
+ return(0);
}
static int
@@ -1489,17 +1476,6 @@ parse_mdoc_Fn(struct mpage *mpage, const struct mdoc_node *n)
}
static int
-parse_mdoc_St(struct mpage *mpage, const struct mdoc_node *n)
-{
-
- if (NULL == n->child || MDOC_TEXT != n->child->type)
- return(0);
-
- putkey(mpage, n->child->string, TYPE_St);
- return(1);
-}
-
-static int
parse_mdoc_Xr(struct mpage *mpage, const struct mdoc_node *n)
{
char *cp;
@@ -1556,12 +1532,8 @@ static int
parse_mdoc_Nm(struct mpage *mpage, const struct mdoc_node *n)
{
- if (SEC_NAME == n->sec)
- return(1);
- else if (SEC_SYNOPSIS != n->sec || MDOC_HEAD != n->type)
- return(0);
-
- return(1);
+ return(SEC_NAME == n->sec ||
+ (SEC_SYNOPSIS == n->sec && MDOC_HEAD == n->type));
}
static int