summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-09-01 23:47:59 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-09-01 23:47:59 +0000
commit3d35e7c87bf69138c20259187b52c26c01ab6cda (patch)
treedb3e953ca3f95a04baa7e64476f775fb4b878469 /mandocdb.c
parent34f785b90475baa4a0b2012afc259927b0484605 (diff)
downloadmandoc-3d35e7c87bf69138c20259187b52c26c01ab6cda.tar.gz
When makewhatis(8) finds an .so link after the manual being pointed to
has already been processed, add the file names to the names table, too, not just to the mlinks table. This fixes a bug where apropos(1) and the new man(1) wouldn't find some of the Xenocara manuals via some of their .so links. After rebuilding, run "makewhatis /usr/X11R6/man" or just wait for weekly(8).
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 7d63ae60..718d5420 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1984,6 +1984,13 @@ dbadd_mlink(const struct mlink *mlink)
SQL_BIND_INT64(stmts[STMT_INSERT_LINK], i, mlink->mpage->pageid);
SQL_STEP(stmts[STMT_INSERT_LINK]);
sqlite3_reset(stmts[STMT_INSERT_LINK]);
+
+ i = 1;
+ SQL_BIND_INT64(stmts[STMT_INSERT_NAME], i, NAME_FILE);
+ SQL_BIND_TEXT(stmts[STMT_INSERT_NAME], i, mlink->name);
+ SQL_BIND_INT64(stmts[STMT_INSERT_NAME], i, mlink->mpage->pageid);
+ SQL_STEP(stmts[STMT_INSERT_NAME]);
+ sqlite3_reset(stmts[STMT_INSERT_NAME]);
}
/*