aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit62dcabc9f407fb96cb3f2517d3f6d5f39dd756b1 (patch)
tree8dd095b164f85aca376058175d8e6700071600be /mandocdb.c
parent3c042f1c04abf0fec8866a305452f7fd2ac8639c (diff)
downloadmandoc-62dcabc9f407fb96cb3f2517d3f6d5f39dd756b1.tar.gz
mandoc-62dcabc9f407fb96cb3f2517d3f6d5f39dd756b1.tar.zst
mandoc-62dcabc9f407fb96cb3f2517d3f6d5f39dd756b1.zip
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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 3bdc793e..7ad55a50 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.159 2014/08/23 18:13:47 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.160 2014/09/01 23:47:59 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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]);
}
/*