#!/usr/bin/perl # (change this to invoce your local perl5) ##### ABOUT for2html ##### # for2html: the FORTRAN77 to HTML translator # Home page http://for2html.sourceforge.net # Copyright Joachim Wuttke (jwuttke@ph.tum.de) 1999,2002 # Distributed under the Eiffel Forum License # Version 1 released on 29dec99 # Version 1.1 released on 4jan00 (bug fix: 1.0 ate trailing 0's) # Version 1.2 released on 26jan00 (line number in error report, TAB's) # Version 1.3 released on 22mar00 (INCLUDE .h; better handling of col's 2-6) # Version 1.3+ continuously amended $for2html = "\n for2html"; ##### SUBROUTINES ##### ### error messages ### : sub errc { # call error die "for2html aborted while parsing command line :\n@_[0]\n"; } sub errf { # file-access error die "for2html @_[0]\n"; } sub errs { # syntax error die "for2html failed in line $lino :\n@_[0]\n"; } ### analyse command-line parameters : sub com_lin_pars { $argvin = join ' ', @ARGV; @ARGLOOP = @ARGV; foreach (@ARGLOOP) { if ( s/^\-// ) { if ( m/^h/i ) { die "usage: for2html [-s[C][T]] [-d
\n";
printif "Source module last modified on $mdate;
\n";
$thistime = nicetime(time);
printif "HTML image of Fortran source automatically generated by $for2html on $thistime.\n";
printif "
\n";
}
sub print_HTML_head_prj {
print PRJFILE " \n"; }
$thistime = nicetime(time);
print PRJFILE "Fortran project overview automatically generated"
." by $for2html on $thistime, \n";
}
### PERL trivia :
sub nicetime {
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime (@_[0]);
$wdname = (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$wday];
$moname = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$mon];
$year = 1900 + $year;
return "$wdname, $mday $moname $year, ".(sprintf "%2u",$hour)
.":".(sprintf "%02u",$min);
}
##### MAIN PROGRAM #####
com_lin_pars;
print "first pass\n"; # learn entry points
$pass = 1;
foreach $infile (@ARGV) {
print "$infile\n";
open_infile;
while (\n";
}
sub print_HTML_epilogue {
printif "
$prjname
\n";
print PRJFILE "called as for2html $argvin.
\n";
print PRJFILE "\n";
}
sub print_HTML_epi_prj {
print PRJFILE "
\n";
print_HTML_header;
while (
\n";
}
print_HTML_epi_prj;
close PRJFILE;
##### EOF #####