[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kdoc
Subject: Re-added HTML'ized headers (was Re: Things lost on the way from 1.0 to 2.0)
From: Marcin Kasperski <Marcin.Kasperski () softax ! com ! pl>
Date: 1999-04-12 15:25:33
[Download RAW message or body]
Sirtaj Singh Kang wrote:
>
> On Sat, 10 Apr 1999, Marcin Kasperski wrote:
>
> > I found two important changes in kdoc 2.0 which spoiled sth..
> >
> > 1) (I guess a bug) kdoc does no longer create HTML'ized header files
> > (myfile-hxx.html) - although links to them are still generated. What's
> > going on? This feature was really useful...
>
> I'm still figuring out what to do with this link. Should I link it
> directly to the HTMLized header, or to a page with links to all nodes
> defined in that header (ie global functions, classes, vars, types etc,
> just like the "Globals" page but with classes). This will be very handy
> for C programmers.
I changed kdoc2 copying some code from kdoc1 and adapting it a bit and
got HTML'ized headers again. Exactly I changed kdocCxxHtml.pm file by:
1) Appending just before the end of writeDoc function:
print "Generating HTMLized headers.\n" unless $main::quiet;
foreach $header ( @main::ARGV ) {
markupCxxHeader( $header, $rootnode );
}
2) Adding on the end of this file (remove ISO-LATIN II declaration if
you do not need it):
sub markupCxxHeader
{
my( $filename, $rootnode ) = @_;
$className = "";
my( $reference );
my( @inheritance );
my( $word );
open( HFILE, $filename ) || die "Couldn't open $filename to read.\n";
$_ = $filename;
# convert dashes to double dash, convert path to dash
s/-/--g/g;
s/\/|\./-/g;
$outputFilename = $_;
$outputFilename = $outputdir."/".$outputFilename;
open( HTMLFILE, ">$outputFilename.html" )
|| die "Couldn't open $outputFilename to read.\n";
print HTMLFILE "<HTML>\n<HEAD><TITLE>$outputFilename</TITLE><META
HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;
charset=iso-8859-2\"></HEAD>\n".
"<BODY BGCOLOR=\"#ffffff\">\n<PRE>";
while( <HFILE> )
{
s/</\</g;
s/>/\>/g;
s/"/\"/g;
if( /^\s*(template.*\s+)?(class|struct)/ ) {
if($rootnode) {
$_ = textRef($_, $rootnode);
} else {
print STDERR "$0: can not make hyperlinks in
file $filename\n";
}
}
print HTMLFILE;
}
print HTMLFILE "</PRE>\n<HR>\n<address>$gentext",
"</address>\n</BODY>\n</HTML>\n";
}
-- Marcin Kasperski Marcin.Kasperski<at>softax.com.pl
-- marckasp<at>friko6.onet.pl
-- Moje poglądy są moimi poglądami, nikogo poza mną nie reprezentują.
-- (My opinions are just my opinions.)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic