summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-12-05 15:16:26 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-12-05 15:16:26 +0000
commit7a578d6d316a6e71be68a75a579eeb1435831c6a (patch)
tree67bca2f6b6732660986305fed9ac8b29411eb39b /usr.bin/mandoc/mandocdb.c
parentf64c65a08348f663e04d860d516e86f6ce9561e6 (diff)
Do not misinterpret function arguments as function names;
improves semantic analysis of more than 300 manuals.
Diffstat (limited to 'usr.bin/mandoc/mandocdb.c')
-rw-r--r--usr.bin/mandoc/mandocdb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index 7770550d1aa..84de236abf2 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mandocdb.c,v 1.131 2014/12/05 14:26:23 schwarze Exp $ */
+/* $OpenBSD: mandocdb.c,v 1.132 2014/12/05 15:16:25 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -1671,6 +1671,9 @@ parse_mdoc_Fo(struct mpage *mpage, const struct mdoc_meta *meta,
const struct mdoc_node *n)
{
+ if (n->type != MDOC_HEAD)
+ return(1);
+
putmdockey(mpage, n->child, TYPE_Fn);
if (n->sec == SEC_SYNOPSIS)
putmdockey(mpage, n->child, NAME_SYN);