[BACK]Return to makewhatis.1 CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/Attic/makewhatis.1 between version 1.1 and 1.13

version 1.1, 2011/05/13 00:42:26 version 1.13, 2011/07/11 21:56:06
Line 15 
Line 15 
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"  .\"
 .Dd $Mdocdate$  .Dd $Mdocdate$
 .Dt MANDOC-DB 1  .Dt MAKEWHATIS 1
 .Os  .Os
 .Sh NAME  .Sh NAME
 .Nm makewhatis  .Nm makewhatis
 .Nd index UNIX manuals  .Nd index UNIX manuals
 .Sh SYNOPSIS  .Sh SYNOPSIS
 .Nm  .Nm
   .Op Fl ruv
 .Op Fl d Ar dir  .Op Fl d Ar dir
 .Ar  .Ar
 .Sh DESCRIPTION  .Sh DESCRIPTION
Line 41  or
Line 42  or
 .Xr man 7  .Xr man 7
 .Ux  .Ux
 manual format.  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.
   If twice, prints keywords for each file.
 .El  .El
 .Pp  .Pp
 By default,  By default,
 .Nm  .Nm
 constructs the  constructs a new
 .Sx Index Database  .Sx Index Database
 and  and
 .Sx Keyword Database  .Sx Keyword Database
 in the current working directory.  in the current working directory.
   Existing databases are truncated.
 .Pp  .Pp
 If fatal parse errors are encountered, the offending file is printed to  If fatal parse errors are encountered, the offending file is printed to
 stderr, omitted from the index, and the parse continues with the next  stderr, omitted from the index, and the parse continues with the next
Line 87  length plus one) mapping to a 8-byte binary field cons
Line 102  length plus one) mapping to a 8-byte binary field cons
 keyword type and source  keyword type and source
 .Sx Index Database  .Sx Index Database
 record number.  record number.
 The type, an unsigned 32-bit integer in host order, is one of the  The type, a 32-bit bit-mask in host order, consists of the following
 following:  fields:
 .Pp  .Pp
 .Bl -tag -width Ds -offset indent -compact  .Bl -tag -width Ds -offset indent -compact
 .It Li 0x01  .It Li 0x01
 The name of a manual page as given in the NAME section.  The name of a manual page as given in the NAME section.
 .It Li 0x02  .It Li 0x02
 A function prototype name as given in the SYNOPSIS section.  A function prototype name as given in the SYNOPSIS section.
 .It Li 0x03  
 A utility name as given in the SYNOPSIS section.  
 .It Li 0x04  .It Li 0x04
   A utility name as given in the SYNOPSIS section.
   .It Li 0x08
 An include file as given in the SYNOPSIS section.  An include file as given in the SYNOPSIS section.
 .It Li 0x05  .It Li 0x10
 A variable name as given in the SYNOPSIS section.  A variable name as given in the SYNOPSIS section.
 .It Li 0x06  .It Li 0x20
 A standard as given in the STANDARDS section.  A standard as given in the STANDARDS section.
 .It Li 0x07  .It Li 0x40
 An author as given in the AUTHORS section.  An author as given in the AUTHORS section.
 .It Li 0x08  .It Li 0x80
 A configuration as given in the SYNOPSIS section.  A configuration as given in the SYNOPSIS section.
   .It Li 0x100
   Free-form descriptive text as given in the NAME section.
   .It Li 0x200
   Cross-links between manuals.
   Listed as the link name, then a period, then the link section.
   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  .El
 .Pp  .Pp
 If a value is encountered outside of this range, the database is  The last four bytes are a host-ordered record number within the
 corrupt.  
 .Pp  
 The latter four bytes are a host-ordered record number within the  
 .Sx Index Database .  .Sx Index Database .
 .Pp  .Pp
 The  The
 .Nm  .Nm
 utility is  utility is
 .Ud  .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  .Sh FILES
 .Bl -tag -width Ds  .Bl -tag -width Ds
 .It Pa mandoc.db  .It Pa mandoc.db
Line 126  A
Line 158  A
 .Xr btree 3  .Xr btree 3
 keyword database mapping keywords to a type and file reference in  keyword database mapping keywords to a type and file reference in
 .Pa mandoc.index .  .Pa mandoc.index .
 .It Pa mandoc.db~  
 Working copy of  
 .Pa mandoc.db .  
 .It Pa mandoc.index  .It Pa mandoc.index
 A  A
 .Xr recno 3  .Xr recno 3
 database of indexed file-names.  database of indexed file-names.
 .It Pa mandoc.index~  
 Working copy of  
 .Pa mandoc.index .  
 .El  .El
 .Sh EXIT STATUS  .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  .Sh SEE ALSO
 .Xr mandoc 1  .Xr mandoc 1
 .Sh AUTHORS  .Sh AUTHORS
Line 146  The
Line 189  The
 .Nm  .Nm
 utility was written by  utility was written by
 .An Kristaps Dzonsons Aq kristaps@bsd.lv .  .An Kristaps Dzonsons Aq kristaps@bsd.lv .
 .Sh CAVEATS  
 Only  
 .Xr mdoc 7  
 manuals are processed.  

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.13

CVSweb