1 .\" $Vendor-Id: mandocdb.8,v 1.17 2011/12/25 21:00:23 schwarze Exp $
3 .\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
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.
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.
22 .Nd index UNIX manuals
43 utility extracts keywords from
45 manuals and indexes them in a
59 creates databases in each
63 .Sy man Ar section Li /
69 .Sy cat Ar section Li /
74 existing databases are truncated.
79 uses the default paths stipulated by
82 The arguments are as follows:
83 .Bl -tag -width "-C file"
85 Use all directories and files found below
88 Specify an alternative configuration
94 Merge (remove and re-add)
98 without truncating it.
102 for potential problems.
103 No databases are modified.
108 All diagnostic messages are printed to the standard output;
109 the standard error output is not used.
115 without truncating it.
117 Display all files added or removed to the index.
119 Print warnings about potential problems with manual pages
120 to the standard error output.
123 If fatal parse errors are encountered while parsing, the offending file
124 is printed to stderr, omitted from the index, and the parse continues
125 with the next input file.
131 database with record values consisting of
140 to indicate the file type
144 and post-formatted, respectively
147 the filename relative to the databases' path,
159 Each of the above is NUL-terminated.
161 If the record value is zero-length, it is unassigned.
163 The keyword database,
167 database of NUL-terminated keywords (record length is non-zero string
168 length plus one) mapping to a 16-byte binary field consisting of the
169 64-bit keyword type and the 64-bit
171 record number, both in network-byte order.
173 The type bit-mask consists of the following
178 .Bl -column "x0x0000000000000001ULLx" "xLix" -offset indent -compact
179 .It Li 0x0000000000000001ULL Ta \&An
180 .It Li 0x0000000000000002ULL Ta \&Ar
181 .It Li 0x0000000000000004ULL Ta \&At
182 .It Li 0x0000000000000008ULL Ta \&Bsx
183 .It Li 0x0000000000000010ULL Ta \&Bx
184 .It Li 0x0000000000000020ULL Ta \&Cd
185 .It Li 0x0000000000000040ULL Ta \&Cm
186 .It Li 0x0000000000000080ULL Ta \&Dv
187 .It Li 0x0000000000000100ULL Ta \&Dx
188 .It Li 0x0000000000000200ULL Ta \&Em
189 .It Li 0x0000000000000400ULL Ta \&Er
190 .It Li 0x0000000000000800ULL Ta \&Ev
191 .It Li 0x0000000000001000ULL Ta \&Fa
192 .It Li 0x0000000000002000ULL Ta \&Fl
193 .It Li 0x0000000000004000ULL Ta \&Fn
194 .It Li 0x0000000000008000ULL Ta \&Ft
195 .It Li 0x0000000000010000ULL Ta \&Fx
196 .It Li 0x0000000000020000ULL Ta \&Ic
197 .It Li 0x0000000000040000ULL Ta \&In
198 .It Li 0x0000000000080000ULL Ta \&Lb
199 .It Li 0x0000000000100000ULL Ta \&Li
200 .It Li 0x0000000000200000ULL Ta \&Lk
201 .It Li 0x0000000000400000ULL Ta \&Ms
202 .It Li 0x0000000000800000ULL Ta \&Mt
203 .It Li 0x0000000001000000ULL Ta \&Nd
204 .It Li 0x0000000002000000ULL Ta \&Nm
205 .It Li 0x0000000004000000ULL Ta \&Nx
206 .It Li 0x0000000008000000ULL Ta \&Ox
207 .It Li 0x0000000010000000ULL Ta \&Pa
208 .It Li 0x0000000020000000ULL Ta \&Rs
209 .It Li 0x0000000040000000ULL Ta \&Sh
210 .It Li 0x0000000080000000ULL Ta \&Ss
211 .It Li 0x0000000100000000ULL Ta \&St
212 .It Li 0x0000000200000000ULL Ta \&Sy
213 .It Li 0x0000000400000000ULL Ta \&Tn
214 .It Li 0x0000000800000000ULL Ta \&Va
215 .It Li 0x0000001000000000ULL Ta \&Vt
216 .It Li 0x0000002000000000ULL Ta \&Xr
218 .Sh IMPLEMENTATION NOTES
219 The time to construct a new database pair grows linearly with the
220 number of keywords in the input files.
221 However, removing or updating entries with
225 respectively, grows as a multiple of the index length and input size.
231 keyword database mapping keywords to a type and file reference in
236 database of indexed file-names.
245 utility exits with one of the following values:
247 .Bl -tag -width Ds -compact
251 Invalid command line arguments were specified.
252 No input files have been read.
254 An operating system error occurred, for example memory exhaustion or an
255 error accessing input files.
258 to exit at once, possibly in the middle of parsing or formatting a file.
259 The output databases are corrupt and should be removed.
262 If the following errors occur, the
264 databases should be rebuilt.
266 .It "%s: Corrupt database"
267 The keyword database file indicated by
270 .It "%s: Corrupt index"
271 The index database file indicated by
274 .It "%s: Path too long"
278 This usually indicates database corruption or invalid command-line
291 utility was written by
292 .An Kristaps Dzonsons ,
293 .Mt kristaps@bsd.lv .