From: Jan T. <de...@us...> - 2002-09-24 23:22:12
|
Update of /cvsroot/net-script/netscript2/src/tools/IPdoc In directory usw-pr-cvs1:/tmp/cvs-serv15599 Modified Files: IPdoc.pm NSDoclet.pm Log Message: * small cosmetic fixes Index: IPdoc.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/IPdoc.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IPdoc.pm 13 May 2002 11:19:30 -0000 1.5 --- IPdoc.pm 24 Sep 2002 23:22:08 -0000 1.6 *************** *** 1,6 **** #-------------------------------------------------------- # $Id$ # ! # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia --- 1,7 ---- #-------------------------------------------------------- + # IPdoc - The insOMnia Perl Documenting System # $Id$ # ! # IPdoc and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia *************** *** 24,28 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.03'; #/** --- 25,34 ---- # Globals #-------------------------------------------------------- ! ! use vars qw( $VERSION ); ! #/** ! # The current version of IPdoc. ! #*/ ! $VERSION = "1.06"; #/** *************** *** 96,100 **** my $baseDir = shift @{$this -> {m_baseDirs}}; my $class = $this -> processFile( $fileName, $baseDir ); ! $classes{$class->name()} = $class; } --- 102,108 ---- my $baseDir = shift @{$this -> {m_baseDirs}}; my $class = $this -> processFile( $fileName, $baseDir ); ! if ( defined( $class ) ) { ! $classes{$class->name()} = $class; ! } } *************** *** 239,242 **** --- 247,251 ---- $lastComment = $this -> processComment( $lastComment, $sub ); $class -> newSub($sub); + $lastComment = ""; } *************** *** 246,249 **** --- 255,259 ---- $lastComment = $this -> processComment( $lastComment, $global ); $class -> newGlobal( $global ); + $lastComment = ""; } *************** *** 390,391 **** --- 400,402 ---- } } + 1; Index: NSDoclet.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/NSDoclet.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NSDoclet.pm 13 May 2002 11:19:30 -0000 1.4 --- NSDoclet.pm 24 Sep 2002 23:22:08 -0000 1.5 *************** *** 1,20 **** #-------------------------------------------------------- ! # This class is a basic doclet for IPDoc. ! # # $Id$ # ! # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- ! package IPdoc::NSDoclet; use IPdoc::Sub; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; #/** --- 1,19 ---- #-------------------------------------------------------- ! # IPdoc - The insOMnia Perl Documenting System. # $Id$ # ! # IPdoc and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- ! use strict; ! #/** ! # This class represents a doclet for IPdoc. Doclets merely ! # affect the style of the documentation. ! #*/ package IPdoc::NSDoclet; use IPdoc::Sub; #/** *************** *** 172,176 **** my $globalComment = $_ -> comment(); # cut comment down to the first line or sentence. ! $subComment =~ /^([^\.]+)/; $result .= "<tr><td><a href=\"#global_$globalName\"><b>$globalName</b></a><br>$1</td></tr>"; } --- 171,175 ---- my $globalComment = $_ -> comment(); # cut comment down to the first line or sentence. ! $globalComment =~ /^([^\.]+)/; $result .= "<tr><td><a href=\"#global_$globalName\"><b>$globalName</b></a><br>$1</td></tr>"; } *************** *** 189,194 **** my $subComment = $_ -> comment(); # cut comment down to the first line or sentence. ! $subComment =~ /^([^\.]+)/; ! $result .= "<tr><td><a href=\"#sub_$subName\"><b>$subName</b></a><br>$1</td></tr>"; } --- 188,197 ---- my $subComment = $_ -> comment(); # cut comment down to the first line or sentence. ! if ( $subComment =~ /^([^\.]+)/ ) { ! $result .= "<tr><td><a href=\"#sub_$subName\"><b>$subName</b></a><br>$1</td></tr>"; ! } ! else { ! $result .= "<tr><td><a href=\"#sub_$subName\"><b>$subName</b></a><br>...</td></tr>"; ! } } *************** *** 210,214 **** my $subName = $_ -> name(); my $type = $_ -> elementType(); ! my $subLink = $classfile . "#$type_" . $subName; # cut comment down to the first line or sentence. $subComment =~ /^([^\.]+)/; --- 213,218 ---- my $subName = $_ -> name(); my $type = $_ -> elementType(); ! my $subLink = $classfile . "#".$type."_" . $subName; ! my $subComment = $_ -> comment(); # cut comment down to the first line or sentence. $subComment =~ /^([^\.]+)/; *************** *** 299,314 **** if ( $description ne "") { ! $aSubName = $aSub -> name(); ! $aClassLink = $class -> relativeFileName(). $aSub -> parent() -> fullFileName(); ! $aSubLink = $aClassLink."#sub_".$aSubName; ! $aClassName = $aSub -> parent() -> name(); ! $description = "<b>Description copied from <a href=\"$aSubLink\">$aSubName</a> in <a href=\"$aClassLink\">$aClassName</a>:</b>".$description; $params = $aSub -> params(); } } ! my $result = "<h3><a name=\"$type_$name\">$name</a></h3><dl><dd>$description</dd><p>"; $result .= $this -> renderParams( $params ); ! $resutl .= "</p></dl>"; $result; } --- 303,318 ---- if ( $description ne "") { ! my $aSubName = $aSub -> name(); ! my $aClassLink = $class -> relativeFileName(). $aSub -> parent() -> fullFileName(); ! my $aSubLink = $aClassLink."#sub_".$aSubName; ! my $aClassName = $aSub -> parent() -> name(); ! $description = "<b>Description copied from <a href=\"$aSubLink\">$aSubName</a> in <a href=\"$aClassLink\">$aClassName</a>:</b><br>".$description; $params = $aSub -> params(); } } ! my $result = "<h3><a name=\"".$type."_$name\">$name</a></h3><dl><dd>$description\n"; $result .= $this -> renderParams( $params ); ! $result .= "\n</dd></dl>"; $result; } *************** *** 328,334 **** my $params = $global -> params(); ! my $result = "<h3><a name=\"$type_$name\">$name</a></h3><dl><dd>$description</dd><p>"; $result .= $this -> renderParams( $params ); ! $resutl .= "</p></dl>"; $result; } --- 332,338 ---- my $params = $global -> params(); ! my $result = "<h3><a name=\"".$type."_$name\">$name</a></h3><dl><dd>$description"; $result .= $this -> renderParams( $params ); ! $result .= "</dd></dl>"; $result; } *************** *** 370,377 **** ! $result .= "<dl>"; for (@order) { ! $elem = $_; ! foreach $index (0..$#paramNames ) { #FIXME: this is incredibly slow if ( $paramNames[$index] eq $elem ) { $result .= "<dd><b>".$mappings{($paramNames[$index])}."</b><dl><dd>".(@paramValues[$index])."</dd></dl></dd>"; --- 374,381 ---- ! $result .= "<dl>\n"; for (@order) { ! my $elem = $_; ! foreach my $index (0..$#paramNames ) { #FIXME: this is incredibly slow if ( $paramNames[$index] eq $elem ) { $result .= "<dd><b>".$mappings{($paramNames[$index])}."</b><dl><dd>".(@paramValues[$index])."</dd></dl></dd>"; *************** *** 380,384 **** } ! $result .= "</dl>"; $result; --- 384,388 ---- } ! $result .= "\n</dl>"; $result; *************** *** 491,496 **** # sort the array alphabetically by name @allSymbols = sort { ! $name1 = $a -> name(); ! $name2 = $b -> name(); $name1 =~ s/^.*:://g; $name2 =~ s/^.*:://g; --- 495,500 ---- # sort the array alphabetically by name @allSymbols = sort { ! my $name1 = $a -> name(); ! my $name2 = $b -> name(); $name1 =~ s/^.*:://g; $name2 =~ s/^.*:://g; *************** *** 500,504 **** my $lastLetter = ""; my $letters = ""; ! my $biglist = ""; my $first = 1; for (@allSymbols) { --- 504,508 ---- my $lastLetter = ""; my $letters = ""; ! my $bigList = ""; my $first = 1; for (@allSymbols) { *************** *** 527,531 **** $bigList .= "<a name=\"letter_$lastLetter\"><h2><b>$lastLetter</b></h2></a><dl>"; } ! $bigList .= "<dt><a href=\"$file#$type_$name\">$shortName</a> - "; if ( $type eq $IPdoc::Class::ELEMENT_TYPE ) { my $pkName = $package; --- 531,535 ---- $bigList .= "<a name=\"letter_$lastLetter\"><h2><b>$lastLetter</b></h2></a><dl>"; } ! $bigList .= "<dt><a href=\"$file#".$type."_$name\">$shortName</a> - "; if ( $type eq $IPdoc::Class::ELEMENT_TYPE ) { my $pkName = $package; *************** *** 533,537 **** my $href = $fmtString; $href =~ s/\[PKNAME\]/$pkName/e; ! $bigList .= "class in package <a href=\"$href\" target=\"pkgframe\">$package</a>"; } else { --- 537,541 ---- my $href = $fmtString; $href =~ s/\[PKNAME\]/$pkName/e; ! $bigList .= "class in package <a href=\"$href\" target=\"pkgFrame\">$package</a>"; } else { *************** *** 543,546 **** --- 547,551 ---- $bigList .="</dt><dd> $comment</dd>"; } + $bigList .= "</dl>"; $result .= $this -> renderHead( $title, $home, $index, $frameset, $self, $letters ); *************** *** 549,550 **** --- 554,557 ---- $result; } + + 1; # make require happy |