]> mj.ucw.cz Git - libucw.git/commitdiff
Doc. system: Fix one-line structs & enums
authorMichal Vaner <vorner@ucw.cz>
Mon, 20 Oct 2008 20:28:21 +0000 (22:28 +0200)
committerMichal Vaner <vorner@ucw.cz>
Mon, 20 Oct 2008 20:28:21 +0000 (22:28 +0200)
When a struct or enum started and ended on the same line
(eg. struct { som items; }), the extractor did not recognize it as an
end.

build/doc-extract

index 4264140f8b02d6761e6da4a2affed8fb767f6c9c..8bd84ef76b07ffe0024a9a14d2e2407cb8e4c19f 100755 (executable)
@@ -136,7 +136,7 @@ sub process( $ ) {
                        } elsif( ( $head, $buff ) = ( $line =~ /^(.*)\/\*\*(.*)\*\*\// ) ) {
                                $buff =~ s/^\s*//;
                                $buff =~ s/\s*$//;
-                               if( $head =~ /\(/ || $head !~ /{/ ) {
+                               if( $head =~ /\(/ || $head !~ /{/ || $head =~/}/ ) {
                                        $head =~ s/^\s*//;
                                        $head =~ s/\/\*.*?\*\///gs;
                                        formatNote( $head, $buff );