diff options
author | rws <empty> | 1988-02-24 08:32:24 +0000 |
---|---|---|
committer | rws <empty> | 1988-02-24 08:32:24 +0000 |
commit | 9bfa8012df8e65498749a7e98f5b0247a672da7d (patch) | |
tree | 9f1c6e00a6e0ae23fefc084308ac511b1c7ab27e /xc/doc/util | |
parent | fe05b7ffd91e09f6bb28c1f48abe70d44b8f849d (diff) |
index fix
Diffstat (limited to 'xc/doc/util')
-rw-r--r-- | xc/doc/util/block.awk | 11 | ||||
-rw-r--r-- | xc/doc/util/fixindex.awk | 33 | ||||
-rw-r--r-- | xc/doc/util/macros.t | 2 |
3 files changed, 40 insertions, 6 deletions
diff --git a/xc/doc/util/block.awk b/xc/doc/util/block.awk index cb5ee9180..0dd75f3f7 100644 --- a/xc/doc/util/block.awk +++ b/xc/doc/util/block.awk @@ -1,9 +1,20 @@ BEGIN { firstchar = "@"; + a["a"] = "A"; a["b"] = "B"; a["c"] = "C"; + a["d"] = "D"; a["e"] = "E"; a["f"] = "F"; + a["g"] = "G"; a["h"] = "H"; a["i"] = "I"; + a["j"] = "J"; a["k"] = "K"; a["l"] = "L"; + a["m"] = "M"; a["n"] = "N"; a["o"] = "O"; + a["p"] = "P"; a["q"] = "Q"; a["r"] = "R"; + a["s"] = "S"; a["t"] = "T"; a["u"] = "U"; + a["v"] = "V"; a["w"] = "W"; a["x"] = "X"; + a["y"] = "Y"; a["z"] = "Z"; } { c = substr($2,2,1); + if (c >= "a" && c <= "z") + c = a[c]; if (c != firstchar) printf(".LB %s\n", c); firstchar = c; diff --git a/xc/doc/util/fixindex.awk b/xc/doc/util/fixindex.awk index 1a2efb3c7..e0f82a76d 100644 --- a/xc/doc/util/fixindex.awk +++ b/xc/doc/util/fixindex.awk @@ -1,5 +1,7 @@ BEGIN { - FS = "\t"; + FS = ":"; + BD = "\\s+1\\fB"; + ED = "\\fP\\s-1"; } NR == 1 { @@ -8,24 +10,45 @@ NR == 1 { major = $2; minor = $3; pageno = $1; + oldpageno = $1; + oldpagelist = ""; pagelist = $1; } NR != 1 { if ($2 == major && $3 == minor) # neither has changed { - if ($1 != pageno) # new page number, append - pagelist = pagelist ", " $1; + if ($1 != pageno) { # new page number, append + if ($4 == "@DEF@") { + pagelist = pagelist ", " BD $1 ED; + } + else { + pagelist = pagelist ", " $1; + } + oldpageno = $1; + oldpagelist = pagelist; + } + else { # old page, but check for def + if ($4 == "@DEF@") { + if (pageno == oldpageno) { + if (oldpagelist != "") + oldpagelist = oldpagelist ", " + } + pagelist = oldpagelist BD $1 ED; + } + } } else # one has changed { - if (minor != "") # dump full record + if (minor != "") # dump full record printf(".I< \"%s\" \"%s\" \"%s\"\n", major, minor, pagelist); else printf(".I> \"%s\" \"%s\"\n", major, pagelist); pagelist = $1; # restart pagelist + oldpagelist = ""; + oldpageno = $1; if ($2 != major && $3 != "") # major has changed, minor not null - printf(".Ib \"%s\"\n", $2); + printf(".Ib \"%s\"\n", $2); } major = $2; minor = $3; diff --git a/xc/doc/util/macros.t b/xc/doc/util/macros.t index 611b498de..0efded03a 100644 --- a/xc/doc/util/macros.t +++ b/xc/doc/util/macros.t @@ -29,7 +29,7 @@ .LP .. .de IN \" send an index entry to the stderr -.tm \\n%\t\\$1\t\\$2 +.tm \\n%:\\$1:\\$2:\\$3 .. .de C{ .KS |