From: Michal Vaner Date: Sat, 13 Sep 2008 12:21:52 +0000 (+0200) Subject: Doc. system: Add type sections to definition list X-Git-Tag: holmes-import~298 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b90ae6286778137f13dee19a47d148665121487c;p=libucw.git Doc. system: Add type sections to definition list The definitions, grouped by type, have section captions (Enums, Structs, etc). --- diff --git a/build/doc-defs b/build/doc-defs index 8feb15fb..fc8112d8 100755 --- a/build/doc-defs +++ b/build/doc-defs @@ -24,15 +24,29 @@ while( defined( my $line = <> ) ) { } my %groups = ( - 'enum' => 1, + 'enum' => 0, 'struct' => 1, 'fun' => 2, 'var' => 3, 'def' => 4 ); +my %heads = ( + 'enum' => 'Enums', + 'struct' => 'Structs', + 'fun' => 'Functions', + 'var' => 'Variables', + 'def' => 'Preprocessor definitions' +); + +my $lasttype = ''; + foreach( sort { ( $groups{$a->[2]} <=> $groups{$b->[2]} ) or ( $a->[3] cmp $b->[3] ); } @dump ) { my( $file, $anchor, $type, $name, $text ) = @{$_}; + if( $lasttype ne $type ) { + $lasttype = $type; + print OUT "\n== $heads{$type} [[$type]]\n\n"; + } my $dircp = $dir; while( shift @{[ $dircp =~ /([^\/]+)/, "//" ]} eq shift @{[ $file =~ /([^\/]+)/, "///" ]} ) { $dircp =~ s/[^\/]+\/?//; diff --git a/ucw/doc/def_index.txt b/ucw/doc/def_index.txt index 634be2a1..43e8bbac 100644 --- a/ucw/doc/def_index.txt +++ b/ucw/doc/def_index.txt @@ -1,3 +1,8 @@ All definitions in libucw ========================= +- <> +- <> +- <> +- <> +- <>