Skip to content

Commit

Permalink
Make mandb path configurable. makemandb (and related tools) use
Browse files Browse the repository at this point in the history
the path from the _mandb variable from man.conf now.

Set _mandb in man.conf to same value as was used before.

Patch by me, committed by wiz. (Diff imported from NetBSD CVS repo.)
  • Loading branch information
abhinav-upadhyay committed Dec 23, 2012
1 parent 8e1a092 commit 69fc2a1
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions init_db.3
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" $NetBSD: init_db.3,v 1.1 2012/02/07 19:13:32 joerg Exp $
.\" $NetBSD: init_db.3,v 1.2 2012/10/06 15:33:59 wiz Exp $
.\"
.\" Copyright (c) 2011 Abhinav Upadhyay <[email protected]>
.\" All rights reserved.
Expand Down Expand Up @@ -29,7 +29,7 @@
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd August 17, 2011
.Dd October 5, 2011
.Dt INIT_DB 3
.Os
.Sh NAME
Expand All @@ -38,7 +38,7 @@
.Sh SYNOPSIS
.In apropos-utils.h
.Ft sqlite3 *
.Fn init_db "int db_flag"
.Fn init_db "int db_flag" "char *manconf"
.Sh DESCRIPTION
The
.Fn init_db
Expand All @@ -63,24 +63,34 @@ This will open the database in read/write mode.
This will open the database in read/write mode, and will also create
the database schema if it does not exist already.
.El
.Pp
The second argument
.Fa manconf
specifies the location of the man.conf configuration file.
By default it is stored at
.Pa /etc/man.conf .
The location of the man.db database is configured in the configuration file
using the
.Cd _mandb
tag.
.Sh RETURN VALUES
On successful execution the
.Fn init_db
function will return a pointer to a sqlite3 structure which represents
a connection to the database.
.Pp
In case the file
.Pa /var/db/man.db
does not exist and
In case the man.db file does not exist and
.Dv DB_CREATE
is not used as a value of
.Fa db_flag ,
.Dv NULL
will be returned.
.Sh FILES
.Bl -hang -width /var/db/man.db -compact
.It Pa /var/db/man.db
The Sqlite FTS database which contains an index of the manual pages.
.Bl -hang -width /etc/man.conf -compact
.It Pa /etc/man.conf
The location of the Sqlite FTS database can be configured using the
.Cd _mandb
tag.
.El
.Sh SEE ALSO
.Xr apropos-utils 3 ,
Expand Down

0 comments on commit 69fc2a1

Please sign in to comment.