X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=build%2Fdoc-defs;h=8e398250eadd2f37b6b4bdfcc48cfa5fd8bcc9ef;hb=0db6e10eac28f38bfc3b325b13ad95107c58ce1e;hp=b0c5a5e8810d5f2c3da8a7f3654be0ae470b50b2;hpb=f3735242f39f63c019d35091cd380147de658ad2;p=libucw.git diff --git a/build/doc-defs b/build/doc-defs index b0c5a5e8..8e398250 100755 --- a/build/doc-defs +++ b/build/doc-defs @@ -23,21 +23,22 @@ while( defined( my $line = <> ) ) { push @dump, [ split /,/, $line, 5 ]; } -my %groups = ( - 'enum' => 0, - 'struct' => 1, - 'fun' => 2, - 'var' => 3, - 'def' => 4 +my @types = ( + [ 'enum', 'Enumerations' ], + [ 'struct', 'Structures' ], + [ 'type', 'Types' ], + [ 'fun', 'Functions' ], + [ 'var', 'Variables' ], + [ 'def', 'Preprocessor definitions' ] ); -my %heads = ( - 'enum' => 'Enums', - 'struct' => 'Structs', - 'fun' => 'Functions', - 'var' => 'Variables', - 'def' => 'Preprocessor definitions' -); +my( $index, %groups, %heads ) = ( 0 ); + +foreach( @types ) { + my( $name, $value ) = @{$_}; + $groups{$name} = ++ $index; + $heads{$name} = $value; +} my $lasttype = ''; @@ -56,7 +57,7 @@ foreach( sort { ( $groups{$a->[2]} <=> $groups{$b->[2]} ) or ( $a->[3] cmp $b->[ $file = $dircp."/".$file; $file =~ s/^\///; $file =~ s/\.[^.]+$//; - $text =~ s/(\.\.\.)/\\$1/g; + $text =~ s/(\.\.\.|\*|'|#|_)/\\$1/g; print OUT "<<$file:$anchor,`$name`>>:: `$text`\n"; }