This directory contains 14 shell procedures designed to carry out
various verification and regeneration tasks on the UNIX User's
Manual.  The outputs of all procedures are left in files in
/usr/man/tmp; `tocrc (see below) also leaves output in
/usr/man/man0.  By default, these procedures operate on all 8
sections of the manual.  The options `-s' and `-f' are available
(except in `mgrep' and `tocrc') to restrict the list of sections
and/or files to be used.  For example:

          ckspell -s 1 2 3 -f a\*

will check spelling in all files whose names begin with `a' in
Sections 1-3.  Two additional options, `-m' and `-t', can be used
to change the shell procedures' idea of where the manual and its
`tmp' directory reside.  For example:

          list -m /usr/aman -t /usr/aman/tmp

might be meaningful if, for instance, an alternate manual is
located in /usr/aman.  These options are also useful when a new
manual is being built in a secluded place.

Note that some of the shell procedures produce 8 result files,
one for each section of the manual.  In particular, the 4 shell
procedures prefaced with `ck', which perform different types of
verification, produce a unique sorted list for each section, as
opposed to a file-by-file list.  This means that one must search
all the files in a section (using `grep', most likely) for
occurrences of a particular string.

Occasionally, some of these procedures will produce lines of
spurious output.  This happens when, for instance, some text
looks like a cross-reference or a file name, e.g., `array(3)' or
`nroff/troff'.

The following describes these 14 procedures:

1.  ckcrefs
    Locates all cross-references to other manual entries and
    checks to see whether the referenced pages exist.  Produces
    files badcref[1-8] containing all bad cross-references in
    each section.  Also produces files lower.suf[1-8], containing
    occurrences of lower-case section suffixes, i.e., 1c, 1m, 3c,
    which should be changed to upper-case (1C, 1M, 3C, etc.).

2.  ckfrefs
    Locates all references in the FILES portion of manual entries
    and checks to see whether the referenced files exist in the
    running system.  Produces files badfref[1-8] containing
    references to non-existent files.  Note that file references
    under headings other than FILES are not checked.  Temporary
    files will, of course, not be found.

3.  cknames
    Performs various checks on the `.TH' line and the NAME
    section of entries.  Note that the files produced by this
    procedure contain the file names of entries that fail the
    corresponding check:

        Checks to see that the entry contains a `.SH NAME'
        section, producing files no.NAME[1-8].

        Checks the NAME section of the entry to ensure that it is
        exactly one line long (multi-line NAMEs will severely
        confuse `tocrc'), producing files not.one.line[1-8].

        Checks to see that the entry contains a `.TH' line,
        producing files no.TH[1-8].

        Checks that the entry name and section given on the TH
        line match the file name of that entry.  For example, a
        file containing `.TH GURP 1M' should be called `gurp.1m'.
        Produces files file.match[1-8].

        Checks that the first name appearing on the NAME line is
        the same as the entry name on the TH line (`ckso' below
        assumes that this is always true).  Produces files
        name.order[1-8].

4.  ckso
    This procedure performs two types of verification of nroff
    `.so' pointers in /usr/man/man[1-8].  It first locates files
    that contain only a `.so' reference to a real entry, and
    checks to see whether that file (entry) exists.  Bad
    references are written to the files badso[1-8].  Secondly,
    `ckso' verifies the reverse; it locates each real entry,
    looks at the NAME portion to see whether more than one name
    appears there, and checks whether a file with a `.so'
    reference exists for all such names other than the first.
    Missing `.so' entries are written to the files needso[1-8].

5.  ckspell
    Uses spell to check for spelling errors in manual
    entries.  Produces file sp.errs containing a section-by-
    section list of errors.  Uses file /usr/man/tools/sp.ignore
    to eliminate strings that appear often in the manual and are
    normally flagged as errors by `spell'.

6.  list
    Produces file list containing a `long' listing with block
    counts (`ls -ls') for each section of the manual.

7.  mcmp
    Compares two versions of the manual and reports what files
    are unique to each and whether or not the common files have
    changed.  If the `-d' option is given, diff-style listings
    are generated for each common file instead.  The `-o' option
    is used to specify the name of the second manual directory;
    /usr/nman is the default.  Produces files cmp[1-8] or
    diff[1-8].

8.  mgrep
    Searches entire manual for the patterns specified as
    arguments (i.e., `mgrep "typewriter"').  Produces file greps,
    containing section-by-section list for each pattern.

9.  mklinks
    Creates files containing appropriate `.so' links to major
    entries where necessary.  These links point to their own
    directory; don't run this procedure anywhere else than in
    /usr/man.  Should resolve all errors noted in needso[1-8]
    (see `ckso' above).

10. mroff
    Uses the man command to troff and typeset manual entries.
    The `-p' (yes, `-p'!) option is used to produce entries in a
    6x9 inch format, as opposed to the default 8.5x11.  Produces
    files mlog[1-8] containing logs of the files that were
    processed.  Mroff ignores files that contain only a `.so'
    line.

11. pgcnt
    Produces files pages[1-8] containing page counts for each
    entry.  Also produces totalpgs containing totals for each
    section and a grand total.  The `-p' option should be used to
    count pages in the small format (see `mroff' above).  Uses
    the C program pages (compiled from pages.c).

12. prnames
    Produces files names[1-8] containing the NAME portion of each
    entry.

13. prsynops
    Produces files synops[1-8] containing the SYNOPSIS portion of
    each entry.  A question mark means that the entry has no
    SYNOPSIS portion.

14. tocrc
    Regenerates input for Table of Contents and Permuted Index.
    Use `tocrc all' to regenerate both from scratch, `tocrc t' to
    regenerate both from existing input files tocx[1-8] in
    /usr/man/tmp, or `tocrc [1-8]' to create, in /usr/man/tmp,
    the corresponding input file tocx[1-8].  The `-p' option
    should be used when preparing the table of contents and/or
    index in the small (6x9 inch) format (this option, if
    present, must be the first argument to `tocrc').  See
    description in /usr/man/READ.ME of the files in
    /usr/man/man0.  Uses files break and ignore in
    /usr/man/tools.

The file .param is described in /usr/man/READ.ME.  The files
M.folio and M.tabs are self-explanatory.




































