#!/home/nkew/bin/perl

foreach (@ARGV) { process($_) ; }
#map { &process ($_) ; } 
#qw(index signup contest rs areas images nav reflectors imagej faq links)
#;

exit ;

sub process() {
  my $name = shift ;
  my $head = "src/" . $name . ".h" ;
  my $body = "src/" . $name . ".b" ;
  my $html = $name . ".html" ;

  open(HEAD, "<$head") or die "error opening $head for read.\n" ;
  open(BODY, "<$body") or die "error opening $body for read.\n" ;
  open(HTML, ">$html") or die "error opening $html for write.\n" ;

print HTML <<'END1' ;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
        "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head>
<link rev="made" href="mailto:nick@webthing.com">
END1
# <link rel="stylesheet" href="../sea-space.css">

print HTML while (<HEAD>) ;

print HTML <<'END2' ;
</head><body bgcolor="#e8e8e8" text = "#000000"	background="../../background.gif"
link="#0000ff" vlink="#4068c0">
<a href="../../"><img  alt="Sea and Space" src="../../img/seaspace-icon.gif" width="115" height="105" align="left" border="0"></a>

<img alt="SeaSpace Consortium" src="../../img/consortium.mod-small.gif"
width="188" height="52" align="right" border="0"
usemap="#consortium.mod-small">
END2
print HTML `cat .path` ;

print HTML <<END22;
<br clear=all>
<hr>
<map name="consortium.mod-small">
<area shape="rect" alt="EAAE" coords="1,0,44,51" href="http://www.algonet.se/~sirius/eaae.htm">
<area shape="rect" alt="ESO" coords="46,0,84,51" href="http://www.eso.org/">
<area shape="rect" alt="ESA" coords="84,0,187,51" href="http://www.esa.int/">
</map>

END22
print HTML while (<BODY>) ;
print HTML <<END3;
</body></html>
END3


close HTML ;
close BODY ;
close HEAD ;
}
