Newsgroups: net.unix-wizards From: Dan Hoey Date: Tue, 4-Dec-84 07:42:51 EST Subject: 4.2BSD catman(8) fails on large manual +FIX PROBLEM: /etc/catman -w gives message "?TMP" and creates an empty /usr/lib/whatis. REPEAT-BY: /etc/catman -w did it for us. It is dependent on the number of manual entries, and the size of their NAME sections. DIAGNOSIS: Catman runs /usr/lib/makewhatis, which uses ed(1) to massage a bunch of header lines from the manuals. Ed is running out of buffer space somewhere. "?TMP" is one of those `self-explanatory message's from ed. FIX: The same function can be performed with sed(1), and doesn't need to use a buffer. I have also made it include the "local" and "new" manual sections in the whatis database, though I'm not sure I should. In the diff listing below, replace "" with a tab character. 3c3 < for i in man1 man2 man3 man4 man5 man6 man7 man8 --- > for i in man1 man2 man3 man4 man5 man6 man7 man8 manl mann 9,17c9,11 < ed - /tmp/whatis <<\! < g/\\-/s//-/ < g/\\\*-/s//-/ < g/ VAX-11/s/// < 1,$s/.TH [^ ]* \([^ ]*\).*\([^-]*\)/\2(\1)/ < g/ /s///g < w /tmp/whatis2 < q < ! --- > sed -e 's/\\-/-/g' -e 's/\\\*-/-/g' -e 's/ VAX-11 / /g' \ > -e 's/^\.TH [^ ]* \([^ ]*\).*\([^-]*\)/\2(\1)/' \ > -e 's/ //g' /tmp/whatis >/tmp/whatis2 Dan Hoey Navy Center for Applied Research in Artificial Intelligence Hoey@NRL-AIC.ARPA