TOOLKIT revision 1.3 1 1.1 mrg This directory contains 14 shell procedures designed to carry out
2 1.1 mrg various verification and regeneration tasks on the UNIX User's
3 1.1 mrg Manual. The outputs of all procedures are left in files in
4 1.1 mrg /_u_s_r/_m_a_n/_t_m_p; `tocrc (see below) also leaves output in
5 1.1 mrg /_u_s_r/_m_a_n/_m_a_n_0. By default, these procedures operate on all 8
6 1.1 mrg sections of the manual. The options `-s' and `-f' are available
7 1.1 mrg (except in `mgrep' and `tocrc') to restrict the list of sections
8 1.1 mrg and/or files to be used. For example:
9 1.1 mrg
10 1.1 mrg ckspell -s 1 2 3 -f a\*
11 1.1 mrg
12 1.1 mrg will check spelling in all files whose names begin with `a' in
13 1.1 mrg Sections 1-3. Two additional options, `-m' and `-t', can be used
14 1.1 mrg to change the shell procedures' idea of where the manual and its
15 1.1 mrg `tmp' directory reside. For example:
16 1.1 mrg
17 1.1 mrg list -m /usr/aman -t /usr/aman/tmp
18 1.1 mrg
19 1.1 mrg might be meaningful if, for instance, an alternate manual is
20 1.1 mrg located in /_u_s_r/_a_m_a_n. These options are also useful when a new
21 1.1 mrg manual is being built in a secluded place.
22 1.1 mrg
23 1.1 mrg Note that some of the shell procedures produce 8 result files,
24 1.1 mrg one for each section of the manual. In particular, the 4 shell
25 1.1 mrg procedures prefaced with `ck', which perform different types of
26 1.1 mrg verification, produce a unique sorted list for each section, as
27 1.1 mrg opposed to a file-by-file list. This means that one must search
28 1.1 mrg all the files in a section (using `grep', most likely) for
29 1.1 mrg occurrences of a particular string.
30 1.1 mrg
31 1.1 mrg Occasionally, some of these procedures will produce lines of
32 1.1 mrg spurious output. This happens when, for instance, some text
33 1.1 mrg looks like a cross-reference or a file name, e.g., `array(3)' or
34 1.1 mrg `nroff/troff'.
35 1.1 mrg
36 1.1 mrg The following describes these 14 procedures:
37 1.1 mrg
38 1.1 mrg 1. ckcrefs
39 1.1 mrg Locates all cross-references to other manual entries and
40 1.1 mrg checks to see whether the referenced pages exist. Produces
41 1.1 mrg files _b_a_d_c_r_e_f[_1-_8] containing all bad cross-references in
42 1.1 mrg each section. Also produces files _l_o_w_e_r._s_u_f[_1-_8], containing
43 1.1 mrg occurrences of lower-case section suffixes, i.e., 1c, 1m, 3c,
44 1.1 mrg which should be changed to upper-case (1C, 1M, 3C, etc.).
45 1.1 mrg
46 1.1 mrg 2. ckfrefs
47 1.1 mrg Locates all references in the FILES portion of manual entries
48 1.1 mrg and checks to see whether the referenced files exist in the
49 1.1 mrg running system. Produces files _b_a_d_f_r_e_f[_1-_8] containing
50 1.1 mrg references to non-existent files. Note that file references
51 1.1 mrg under headings other than FILES are _n_o_t checked. Temporary
52 1.1 mrg files will, of course, not be found.
53 1.1 mrg
54 1.1 mrg 3. cknames
55 1.1 mrg Performs various checks on the `.TH' line and the NAME
56 1.1 mrg section of entries. Note that the files produced by this
57 1.1 mrg procedure contain the file names of entries that fail the
58 1.1 mrg corresponding check:
59 1.1 mrg
60 1.1 mrg Checks to see that the entry contains a `.SH NAME'
61 1.1 mrg section, producing files _n_o._N_A_M_E[_1-_8].
62 1.1 mrg
63 1.2 ad Checks the NAME section of the entry to ensure that it is
64 1.1 mrg exactly one line long (multi-line NAMEs will severely
65 1.1 mrg confuse `tocrc'), producing files _n_o_t._o_n_e._l_i_n_e[_1-_8].
66 1.1 mrg
67 1.1 mrg Checks to see that the entry contains a `.TH' line,
68 1.1 mrg producing files _n_o._T_H[_1-_8].
69 1.1 mrg
70 1.1 mrg Checks that the entry name and section given on the TH
71 1.1 mrg line match the file name of that entry. For example, a
72 1.1 mrg file containing `.TH GURP 1M' should be called `gurp.1m'.
73 1.1 mrg Produces files _f_i_l_e._m_a_t_c_h[_1-_8].
74 1.1 mrg
75 1.1 mrg Checks that the first name appearing on the NAME line is
76 1.1 mrg the same as the entry name on the TH line (`ckso' below
77 1.1 mrg assumes that this is always true). Produces files
78 1.1 mrg _n_a_m_e._o_r_d_e_r[_1-_8].
79 1.1 mrg
80 1.1 mrg 4. ckso
81 1.1 mrg This procedure performs two types of verification of _n_r_o_f_f
82 1.1 mrg `.so' pointers in /_u_s_r/_m_a_n/_m_a_n[_1-_8]. It first locates files
83 1.1 mrg that contain only a `.so' reference to a real entry, and
84 1.1 mrg checks to see whether that file (entry) exists. Bad
85 1.1 mrg references are written to the files _b_a_d_s_o[_1-_8]. Secondly,
86 1.1 mrg `ckso' verifies the reverse; it locates each real entry,
87 1.1 mrg looks at the NAME portion to see whether more than one name
88 1.1 mrg appears there, and checks whether a file with a `.so'
89 1.1 mrg reference exists for all such names other than the first.
90 1.1 mrg Missing `.so' entries are written to the files _n_e_e_d_s_o[_1-_8].
91 1.1 mrg
92 1.1 mrg 5. ckspell
93 1.3 perry Uses _s_p_e_l_l to check for spelling errors in manual
94 1.1 mrg entries. Produces file _s_p._e_r_r_s containing a section-by-
95 1.1 mrg section list of errors. Uses file /_u_s_r/_m_a_n/_t_o_o_l_s/_s_p._i_g_n_o_r_e
96 1.1 mrg to eliminate strings that appear often in the manual and are
97 1.1 mrg normally flagged as errors by `spell'.
98 1.1 mrg
99 1.1 mrg 6. list
100 1.1 mrg Produces file _l_i_s_t containing a `long' listing with block
101 1.1 mrg counts (`ls -ls') for each section of the manual.
102 1.1 mrg
103 1.1 mrg 7. mcmp
104 1.1 mrg Compares two versions of the manual and reports what files
105 1.1 mrg are unique to each and whether or not the common files have
106 1.1 mrg changed. If the `-d' option is given, _d_i_f_f-style listings
107 1.1 mrg are generated for each common file instead. The `-o' option
108 1.1 mrg is used to specify the name of the second manual directory;
109 1.1 mrg /_u_s_r/_n_m_a_n is the default. Produces files _c_m_p[_1-_8] or
110 1.1 mrg _d_i_f_f[_1-_8].
111 1.1 mrg
112 1.1 mrg 8. mgrep
113 1.1 mrg Searches entire manual for the patterns specified as
114 1.1 mrg arguments (i.e., `mgrep "typewriter"'). Produces file _g_r_e_p_s,
115 1.1 mrg containing section-by-section list for each pattern.
116 1.1 mrg
117 1.1 mrg 9. mklinks
118 1.1 mrg Creates files containing appropriate `.so' links to major
119 1.1 mrg entries where necessary. These links point to their own
120 1.1 mrg directory; don't run this procedure anywhere else than in
121 1.1 mrg /_u_s_r/_m_a_n. Should resolve all errors noted in _n_e_e_d_s_o[_1-_8]
122 1.1 mrg (see `ckso' above).
123 1.1 mrg
124 1.1 mrg 10. mroff
125 1.3 perry Uses the _m_a_n command to _t_r_o_f_f and typeset manual entries.
126 1.1 mrg The `-p' (yes, `-p'!) option is used to produce entries in a
127 1.1 mrg 6x9 inch format, as opposed to the default 8.5x11. Produces
128 1.1 mrg files _m_l_o_g[_1-_8] containing logs of the files that were
129 1.1 mrg processed. _M_r_o_f_f ignores files that contain only a `.so'
130 1.1 mrg line.
131 1.1 mrg
132 1.1 mrg 11. pgcnt
133 1.1 mrg Produces files _p_a_g_e_s[_1-_8] containing page counts for each
134 1.1 mrg entry. Also produces _t_o_t_a_l_p_g_s containing totals for each
135 1.1 mrg section and a grand total. The `-p' option should be used to
136 1.1 mrg count pages in the small format (see `mroff' above). Uses
137 1.1 mrg the C program _p_a_g_e_s (compiled from _p_a_g_e_s._c).
138 1.1 mrg
139 1.1 mrg 12. prnames
140 1.1 mrg Produces files _n_a_m_e_s[_1-_8] containing the NAME portion of each
141 1.1 mrg entry.
142 1.1 mrg
143 1.1 mrg 13. prsynops
144 1.1 mrg Produces files _s_y_n_o_p_s[_1-_8] containing the SYNOPSIS portion of
145 1.1 mrg each entry. A question mark means that the entry has no
146 1.1 mrg SYNOPSIS portion.
147 1.1 mrg
148 1.1 mrg 14. tocrc
149 1.1 mrg Regenerates input for Table of Contents and Permuted Index.
150 1.1 mrg Use `tocrc all' to regenerate both from scratch, `tocrc t' to
151 1.1 mrg regenerate both from existing input files _t_o_c_x[_1-_8] in
152 1.1 mrg /_u_s_r/_m_a_n/_t_m_p, or `tocrc [1-8]' to create, in /_u_s_r/_m_a_n/_t_m_p,
153 1.1 mrg the corresponding input file _t_o_c_x[_1-_8]. The `-p' option
154 1.1 mrg should be used when preparing the table of contents and/or
155 1.1 mrg index in the small (6x9 inch) format (this option, if
156 1.1 mrg present, _m_u_s_t be the first argument to `tocrc'). See
157 1.1 mrg description in /_u_s_r/_m_a_n/_R_E_A_D._M_E of the files in
158 1.1 mrg /_u_s_r/_m_a_n/_m_a_n_0. Uses files _b_r_e_a_k and _i_g_n_o_r_e in
159 1.1 mrg /_u_s_r/_m_a_n/_t_o_o_l_s.
160 1.1 mrg
161 1.1 mrg The file ._p_a_r_a_m is described in /_u_s_r/_m_a_n/_R_E_A_D._M_E. The files
162 1.1 mrg _M._f_o_l_i_o and _M._t_a_b_s are self-explanatory.
163 1.1 mrg
164 1.1 mrg
165 1.1 mrg
166 1.1 mrg
167 1.1 mrg
168 1.1 mrg
169 1.1 mrg
170 1.1 mrg
171 1.1 mrg
172 1.1 mrg
173 1.1 mrg
174 1.1 mrg
175 1.1 mrg
176 1.1 mrg
177 1.1 mrg
178 1.1 mrg
179 1.1 mrg
180 1.1 mrg
181 1.1 mrg
182 1.1 mrg
183 1.1 mrg
184 1.1 mrg
185 1.1 mrg
186 1.1 mrg
187 1.1 mrg
188 1.1 mrg
189 1.1 mrg
190 1.1 mrg
191 1.1 mrg
192 1.1 mrg
193 1.1 mrg
194 1.1 mrg
195 1.1 mrg
196 1.1 mrg
197 1.1 mrg
198 1.1 mrg
199