xref: /dragonfly/contrib/mdocml/mandoc.db.5 (revision 9348a738)
1.\"	$Id: mandoc.db.5,v 1.1 2014/04/15 20:18:26 schwarze Exp $
2.\"
3.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: April 15 2014 $
18.Dt MANDOC.DB 5
19.Os
20.Sh NAME
21.Nm mandoc.db
22.Nd manual page database
23.Sh DESCRIPTION
24The
25.Nm
26SQLite3 file format is used to store information about installed manual
27pages to facilitate semantic searching for manuals.
28Each manual page tree contains its own
29.Nm
30file; see
31.Sx FILES
32for examples.
33.Pp
34Such database files are generated by
35.Xr makewhatis 8
36and used by
37.Xr apropos 1
38and
39.Xr whatis 1 .
40.Pp
41One line in the following tables describes:
42.Bl -tag -width Ds
43.It Sy mpages
44One physical manual page file, no matter how many times and under which
45names it may appear in the file system.
46.It Sy mlinks
47One entry in the file system, no matter which content it points to.
48.It Sy names
49One manual page name, no matter whether it appears in a page header,
50in a NAME or SYNOPSIS section, or as a file name.
51.It Sy keys
52One chunk of text from some macro invocation.
53.El
54.Pp
55Each record in the latter three tables uses its
56.Va pageid
57column to point to a record in the
58.Sy mpages
59table.
60.Pp
61The other columns are as follows; unless stated otherwise, they are
62of type
63.Vt TEXT .
64.Bl -tag -width mpages.desc
65.It Sy mpages.desc
66The description line
67.Pq Sq \&Nd
68of the page.
69.It Sy mpages.form
70The
71.Vt INTEGER
721 if the page is unformatted, i.e. in
73.Xr mdoc 7
74or
75.Xr man 7
76format, and 2 if it is formatted, i.e. a
77.Sq cat
78page.
79.It Sy mlinks.sec
80The manual section as found in the subdirectory name.
81.It Sy mlinks.arch
82The manual architecture as found in the subdirectory name, or
83.Qq any .
84.It Sy mlinks.name
85The manual name as found in the file name.
86.It Sy names.bits
87An
88.Vt INTEGER
89bit mask telling whether the name came from a header line, from the
90NAME or SYNOPSIS section, or from a file name.
91Bits are defined in
92.In mansearch.h .
93.It Sy names.name
94The name itself.
95.It Sy keys.bits
96An
97.Vt INTEGER
98bit mask telling which semantic contexts the key was found in;
99defined in
100.In mansearch.h ,
101documented in
102.Xr apropos 1 .
103.It Sy keys.key
104The string found in those contexts.
105.El
106.Sh FILES
107.Bl -tag -width /usr/share/mandoc.db -compact
108.It Pa /usr/share/mandoc.db
109The manual page database for the base system.
110.It Pa /usr/X11R6/mandoc.db
111The same for the
112.Xr X 7
113Window System.
114.It Pa /usr/local/mandoc.db
115The same for
116.Xr packages 7 .
117.El
118.Sh SEE ALSO
119.Xr apropos 1 ,
120.Xr man 1 ,
121.Xr sqlite3 1 ,
122.Xr whatis 1 ,
123.Xr mansearch 3 ,
124.Xr makewhatis 8
125.Sh HISTORY
126A manual page database
127.Pa /usr/lib/whatis
128first appeared in
129.Bx 2 .
130The present format first appeared in
131.Ox 5.6 .
132.Sh AUTHORS
133.An -nosplit
134The original version of
135.Xr makewhatis 8
136was written by
137.An Bill Joy
138in 1979.
139An SQLite3 version was first implemented by
140.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
141in 2012.
142The present database format was designed by
143.An Ingo Schwarze Aq Mt schwarze@openbsd.org
144in 2014.
145