]> mj.ucw.cz Git - libucw.git/commitdiff
Doc. system: Add type sections to definition list
authorMichal Vaner <vorner@ucw.cz>
Sat, 13 Sep 2008 12:21:52 +0000 (14:21 +0200)
committerMichal Vaner <vorner@ucw.cz>
Sat, 13 Sep 2008 12:21:52 +0000 (14:21 +0200)
The definitions, grouped by type, have section captions (Enums, Structs,
etc).

build/doc-defs
ucw/doc/def_index.txt

index 8feb15fbba9a63327b7b21ea364d0177c004cbc5..fc8112d842a31332e7898e02cec4c4118d97bf0c 100755 (executable)
@@ -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/[^\/]+\/?//;
index 634be2a1b543f32c96986ce878d50195330dc44b..43e8bbac016c18a42487b8275f30cdeec76ce279 100644 (file)
@@ -1,3 +1,8 @@
 All definitions in libucw
 =========================
 
+- <<enum,Enums>>
+- <<struct,Structs>>
+- <<fun,Functions>>
+- <<var,Variables>>
+- <<def,Preprocessor definitions>>