Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site shark.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!mtuxo!mtunh!mtung!mtunf!ariel!vax135!cornell!uw-beaver!tektronix!orca!shark!stephent From: stephent@shark.UUCP (Steve Tyler) Newsgroups: net.lang.lisp Subject: Script to make index for Franz Lisp manual Message-ID: <1496@shark.UUCP> Date: Sun, 11-Aug-85 19:27:28 EDT Article-I.D.: shark.1496 Posted: Sun Aug 11 19:27:28 1985 Date-Received: Sat, 17-Aug-85 13:08:51 EDT Distribution: net Organization: Tektronix, Wilsonville OR Lines: 63 Appended is a script which will generate an index to the Franz Lisp Manual by Foderaro and Sklower. On our VAX the manual (June 83 version) comes with a helpindex but this index only gives section numbers. The manual's page numbering in section 4 is off by one so those pages have to be renumbered in the manual by hand. The index contains all functions in the helpindex plus a few extra. To print it I filter it through "pr -2" ("pr -3" truncates some lines). The regular expression in the awk script selects lines that look like: "(xxx...)" or "(yyy..." where y is not a right-paren. =============================================================================== #! /bin/sh # # makelispindex # # usage: makelispindex > lispindex # # Prints each line that matches the regular expression below followed by # the computed section and page number. # The index is sorted and uniq'd. # Assumes 66 lines per page. # Example output: # changes 13-4 # top-level) 13-2 # trace 11-1 # traceargs 11-5 # tracedump) 11-5 # untrace 11-5 # valueof 13-3 # chaplist='0 1 10 11 12 13 14 15 16 2 3 4 5 6 61 7 8 9 b c' for chap in $chaplist do col < /usr/lib/lisp/manual/ch$chap.r | \ awk ' BEGIN { chapter = '$chap' page = 1 line = 1 } /^\(.*\)[ ]*$|^\([^\)]+$/ { split($1, nam, "(") print nam[2] " " chapter "-" page } { if (line >= 66) { line = 1 page = page + 1 } else { line = line + 1 } } ' >> /tmp/,makelispindex$$ done sort < /tmp/,makelispindex$$ | uniq rm /tmp/,makelispindex$$