blob: afd1c379b8d5fe5d18015ab0577080ab7b1efe40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
The indexing programs here are modified from the versions printed in
Bentley & Kernighan, EP-ODD V1 #1. The programs are also described in
AT&T Bell Laboratories Computing Science Technical Report No. 128,
``Tools for Printing Indexes''.
Changes from the published version derive from further experience
after the paper was frozen, plus some cleanup and corrections by Joe
Kruskal (to whom many thanks), plus some very local features for
printing the AMPL book.
USING THE PROGRAMS
install
makes the appropriate files executable. since this file
is not executable, use by typing "sh <install"
ix.test
see.terms
these two files provide test input. make.index produces
standard output and files
foo[1-9] foo.regular foo.see foo.hier foo.all
from ix.test and see.terms. to make sure things
work when you first unbundle this file, type
sh <install
make.index ix.test >foo.ix
troff -ms foo.ix >foo.out
and then examine the troff output foo.out
cleanup
removes the garbage files left around for debugging
CHANGES FROM THE PAPER
make.index
handles "see" file see.terms. A line like
algorithms<tab>searching, sorting
generates in the final index
algorithms see searching, sorting
a 3rd field of %also makes it
algorithms see also searching, sorting
doclean
deroman
range.prep
minor change to defend against bug in some versions of "sort"
rotate
moved here (and changed as necessary) to remove subtle bug.
see check.data below
range.sort
-u option on sort removes duplicate entries on same page
range.collapse
reroman
page number concatenation removed from here ...
num.collapse
and moved to here. also commas between numbers now
inserted here (to make see terms easier)
gen.key
literals protected differently in gsub commands.
rules for non-alpha index terms slightly richer:
purely nonalphabetic lines first
lines with leading digits next
ordinary lines last
see.prep
changed to match changes above, and to rely on font-changing {}
final.sort
uses -d option for "telephone directory" order.
hierarchy
a rather special purpose version to replace runs of items
with a common one or two word prefix and replace them by
a head word and indented lines.
this also does some rearrangement to bring see terms to the top,
and terms with formatting info to the bottom; this is not
always the right thing to do.
format
letter changes (.YY) determined by first letter.
minor rearrangement of how output line is created.
commas no longer added here.
[Some systems have a disk-formatting program called format.]
check.data
new program that catches subtle errors in the data
|