#!/bin/sh
#
# This script generates automatically to its stdout a windex.html file;
# this file is useful just after running man2html.
# All the html man pages must be located under an html directory at the
# same level as the generated windex.html file.
#


WINDEX=$1

cat <<EOF
 <!-- This is an automatically generated file. Do Not Edit! 
      Use windex2html to generate it -->
 <center><h1>ACE Manual Page Index</h1></center>
<BODY text = "#000000"
link="#000fff"
vlink="#ff0f0f"
bgcolor="#ffffff">
 <p>

 This file has been generated from the <A
 HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/man/windex">windex</A>
 file from the <A
 HREF="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE</A> package and
 it contains a list of pointers to the manual pages generated by the
 <A HREF="http://www.cs.wustl.edu/~schmidt/ACE_wrappers/bin/README.html">OSE
 documentation tools</A>.

 <p>
 <HR>
 <UL>
EOF

cat $WINDEX | \
  sed -e 's/		/	/g'  \
      -e 's/^[a-zA-Z0-9_]*/&\.html">/g' \
      -e 's%(3).*-%(3)</a>%g' \
      -e 's/\.PP/<BR>/g'             \
      -e 's%^%<li><a HREF="html/%g'  \
      -e 's%\\f(CO[a-zA-Z0-9_]*%<CODE>&</B></I></CODE>%g' \
      -e 's%\\f(CO%%g'

echo "</UL>"
