=================================================================== RCS file: /cvs/mandoc/Attic/makewhatis.1,v retrieving revision 1.8 retrieving revision 1.13 diff -u -p -r1.8 -r1.13 --- mandoc/Attic/makewhatis.1 2011/07/01 09:11:35 1.8 +++ mandoc/Attic/makewhatis.1 2011/07/11 21:56:06 1.13 @@ -1,4 +1,4 @@ -.\" $Id: makewhatis.1,v 1.8 2011/07/01 09:11:35 kristaps Exp $ +.\" $Id: makewhatis.1,v 1.13 2011/07/11 21:56:06 kristaps Exp $ .\" .\" Copyright (c) 2011 Kristaps Dzonsons .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 1 2011 $ +.Dd $Mdocdate: July 11 2011 $ .Dt MAKEWHATIS 1 .Os .Sh NAME @@ -22,7 +22,7 @@ .Nd index UNIX manuals .Sh SYNOPSIS .Nm -.Op Fl v +.Op Fl ruv .Op Fl d Ar dir .Ar .Sh DESCRIPTION @@ -42,6 +42,15 @@ or .Xr man 7 .Ux manual format. +.It Fl r +Remove entries. +This will remove the index and keyword references. +If the record is not found, it is ignored. +.It Fl u +Update the record. +This will first remove the record (as in +.Fl r ) +then re-add it. .It Fl v Verbose output. If specified once, prints the name of each indexed file. @@ -50,11 +59,12 @@ If twice, prints keywords for each file. .Pp By default, .Nm -constructs the +constructs a new .Sx Index Database and .Sx Keyword Database in the current working directory. +Existing databases are truncated. .Pp If fatal parse errors are encountered, the offending file is printed to stderr, omitted from the index, and the parse continues with the next @@ -120,6 +130,10 @@ Listed as the link name, then a period, then the link If the link has no section, the period terminates the string. .It Li 0x400 Path reference as given in the FILES section. +.It Li 0x800 +Environment variable as given in the ENVIRONMENT section. +.It Li 0x1000 +Error codes as given in the ERRORS section. .El .Pp The last four bytes are a host-ordered record number within the @@ -129,6 +143,14 @@ The .Nm utility is .Ud +.Sh IMPLEMENTATION NOTES +The time to construct a new database pair grows linearly with the +number of keywords in the input. +However, removing or updating entries with +.Fl r +or +.Fl u , +respectively, grows as a multiple of the index length and input size. .Sh FILES .Bl -tag -width Ds .It Pa mandoc.db @@ -136,19 +158,30 @@ A .Xr btree 3 keyword database mapping keywords to a type and file reference in .Pa mandoc.index . -.It Pa mandoc.db~ -Working copy of -.Pa mandoc.db . .It Pa mandoc.index A .Xr recno 3 database of indexed file-names. -.It Pa mandoc.index~ -Working copy of -.Pa mandoc.index . .El .Sh EXIT STATUS -.Ex -std +The +.Nm +utility exits with one of the following values: +.Pp +.Bl -tag -width Ds -compact +.It 0 +No errors occurred. +.It 5 +Invalid command line arguments were specified. +No input files have been read. +.It 6 +An operating system error occurred, for example memory exhaustion or an +error accessing input files. +Such errors cause +.Nm +to exit at once, possibly in the middle of parsing or formatting a file. +The output databases are corrupt and should be removed . +.El .Sh SEE ALSO .Xr mandoc 1 .Sh AUTHORS