<a href='{filename}.html'>{caption=<tt>[{filename}]</tt>}</a>
[func_anchor-inlinemacro]
-<div class="literalblock" id="fun_{name}"><div class="content"><pre><tt>{prefix}:!:{params}</tt></pre></div></div>
+<div class="literalblock"><div class="content"><pre><tt>{prefix}:!:{params}</tt></pre></div></div>
[func_auto_ref-inlinemacro]
<a href='#fun_{name}'><tt>{all}</tt></a>
my %groups = (
'enum' => 1,
'struct' => 1,
- 'function' => 2,
- 'variable' => 3,
- 'define' => 4
+ 'fun' => 2,
+ 'var' => 3,
+ 'def' => 4
);
foreach( sort { ( $groups{$a->[2]} <=> $groups{$b->[2]} ) or ( $a->[3] cmp $b->[3] ); } @dump ) {
- my( $file, $num, $type, $name, $text ) = @{$_};
+ my( $file, $anchor, $type, $name, $text ) = @{$_};
my $dircp = $dir;
while( shift @{[ $dircp =~ /([^\/]+)/, "//" ]} eq shift @{[ $file =~ /([^\/]+)/, "///" ]} ) {
$dircp =~ s/[^\/]+\/?//;
$file =~ s/\.[^.]+$//;
$text =~ s/\(/!!PARENT_OPEN!!/g;
$text =~ s/(\.\.\.)/\\$1/g;
- print OUT "- <<$file:auto_$num,`$text`>>\n";
+ print OUT "- <<$file:$anchor,`$text`>>\n";
}
close OUT;
warn( "Unknown statement $_\n" );
return( '', 0, $_, $_ );
}
- return( 'define', 0, $1, $_ ) if( /#define\s+(\w+)/ );
- return( 'function', 1, $1, $_ ) if( /(\w+)\(.*\)/ );
- return( 'variable', 1, $1, $_ ) if( /\s(\w+);/ );
+ return( 'def', 0, $1, $_ ) if( /#define\s+(\w+)/ );
+ return( 'fun', 1, $1, $_ ) if( /(\w+)\(.*\)/ );
+ return( 'var', 1, $1, $_ ) if( /\s(\w+);/ );
warn( "Unknown statement $_\n" );
return( '', 0, $_, $_ );
}
print OUT "\n";
print OUT "''''\n";
chomp $head;
- print OUT "[[auto_$id]]\n";
my( $type, $semicolon, $name, $oneline ) = detect( $head );
$oneline =~ s/\s+$//;
$head =~ s/;?\s*$/;/ if( $semicolon );
$head =~ s/(\.\.\.)/\\$1/g;
- if( $type eq 'function' ) {
+ print OUT "[[${type}_$name]]\n";
+ if( $type eq 'fun' ) {
print OUT "!!f!$head!!!\n\n";
} else {
print OUT "..................\n";
print OUT "..................\n\n";
}
if( $hasdump ) {
- print DUMP "$outname,$id,$type,$name,$oneline\n";
+ print DUMP "$outname,${type}_$name,$type,$name,$oneline\n";
$id ++;
}
print OUT "$comment\n\n";