# -*-perl-*- # # grdoc_richdoc # # Makes the rich frame frame targets and sub-descriptors from a given infile # Note this does not have to parse through the file since it simply # assembles the already created File and Routine documentation. # (although does some stuff to those). # $Id: grdoc_richdoc,v 1.15 1996/04/21 17:31:49 pwalker Exp $ sub grdoc_richdoc { local ($infile) = @_; $outfile = $infile; $outfile =~ s:$opt_i:$opt_o/:; $outfile =~ s:^(.*)/([^/]+)$:\2:; $thesd = $1; $urlfile = $outfile; $urlfile =~ s:\.:_:g; # Create the frameset doc. open (OUT, ">$thesd/${urlfile}_Rich_Doc.html") || die "$thesd/${urlfile}_Rich_Doc.html: $!\n"; print " Created $thesd/${urlfile}_Rich_Doc.html\n" if $opt_V; $thehtmld = $thesd; $thehtmld =~ s:$opt_o:$opt_t/PROTECTED:; $srcurl = "$thehtmld/${urlfile}_RD_src.html"; print OUT < $outfile Rich Documentation <h1 align=center>This document uses Frames</h1> This document requires the use of frames, and thus must be viewed with a frames compliant browser, such as Netscape 2.0 or higher. The fact that you are seeing this indicates that you are NOT using a frames compliant browser, so you cannot see this document. <hr> This document uses frames<br> <a href="mailto:$author">$author</a> EOM close OUT; # Create the actual frame index open(OUT, ">$thesd/${urlfile}_RD.html") || die "$thesd/${urlfile}_RD.html: $!\n"; $dadots = &make_dotdot($infile); print OUT <

$outfile
Documentation Index

EOM &navigation($dadots); print OUT "
\n"; # OK, now go through this file inserting the html from the other locations # into this document separated by horizontal rules. We will filter out all # rules from the read in files before printing, and then add our own. # First, grab the file descriptor print OUT "

\@file: "; &localnav($outfile, "brief"); print OUT "

"; open (FD, "< $thesd/${urlfile}_File_Doc.html") || warn "FILE: $thesd/${urlfile}_File_Doc.html File in richdoc: $!\n"; while () { last if //; } $printing = 1; while () { last if //; $printing = 0 if //; $printing = 1 if //; s/
//gi; # Cut out a tonne of troublesome crapola with the new navigation # paradigm. print OUT if $printing; } print OUT "
"; close FD; # Now do each of the routines. foreach $ROUTINE (sort cialph keys %routine_home) { next if (!($routine_home{$ROUTINE} =~ m/$outfile/)); open (RD, "< $thesd/${ROUTINE}_Routine_Doc.html") || warn "ROUTINE: $thesd/${ROUTINE}_Routine_Doc.html in richdoc: $!\n"; while () { last if //; } print OUT "

\@routine: "; &localnav($ROUTINE, "brief", "$srcurl"); print OUT "

"; while () { last if //; s/
//gi; # Once again, lots of troubling stuff is gone print OUT; } print OUT "
"; } # Footer &navigation($dadots); print OUT < $opt_c Rich Documentation Index
$html_foot_date
$organization / \n$author EOM close OUT; # Finally, convert the src to the RDsrc. # Protection $thesd =~ s:$opt_o:$opt_o/PROTECTED:; open(IN, "< $thesd/${urlfile}_src.html") || die "IN in rd\n"; open(OUT,"> $thesd/${urlfile}_RD_src.html") || die "OUT in rd\n"; # OK copy up to the first
while () { print OUT; s/h2/h3/g; last if /
/; } # Now go through munging any file hrefs to point to the RD. $printing = 1; while () { if (//) { s/.*$/$src_comment_start >> GRDoc Region for \1Supressed << $src_comment_end/; print OUT; $printing = 0; } if (//) { s/^.*//; $printing = 1; } if (/"); $newline = ""; foreach $REF (@refs) { if ($REF =~ m//; } # and finish the copying while () { print OUT; } close IN; close OUT; } 1;