X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=build%2Fdoc-extract;h=67fdd64cb070ab919fe7de69cc239c8bf39ccd2f;hb=1d9a3e3de04d38b74a35a7f70785452d99afaeca;hp=6be99b45fb54e8e5728adb7dab147908ecfa4036;hpb=7603b94e10b120a1aed22f5c95f054a128554dd8;p=libucw.git diff --git a/build/doc-extract b/build/doc-extract index 6be99b45..67fdd64c 100755 --- a/build/doc-extract +++ b/build/doc-extract @@ -22,7 +22,7 @@ if( defined $defdump ) { $hasdump = 1; } -# Function to guess type of stytement +# Function to guess type of statement sub detect( $ ) { ( $_ ) = @_; # typedef struct|enum { something } name; @@ -68,7 +68,7 @@ sub formatNote( $$ ) { $oneline =~ s/\s+$//; $oneline =~ s/;?$/;/ if( $semicolon ); $head =~ s/;?\s*$/;/ if( $semicolon ); - $head =~ s/(\.\.\.)/\\$1/g; + $head =~ s/(\s|,|\()(\.\.\.)/$1\\$2/g; # Do not convert tripple dot into ellipsis print OUT "[[${type}_$name]]\n"; $head = $oneline if $type eq 'fun';#Remove { from inline functions # Remove the generic hack markup @@ -159,9 +159,12 @@ sub process( $$ ) { $struct = $sdepth = 1; } } elsif( ( $buff ) = ( $line =~ /\/\*\*\*(.*)\*\*\*\// ) ) { - $buff =~ s/\s?//; + $buff =~ s/^\s?//; print OUT "$buff\n\n"; $buff = undef; + } elsif( ( $buff ) = ( $line =~ /^\s*\/\*\*(.*)\*\*\// ) ) { + $buff =~ s/^\s*//; + $buff .= "\n"; } elsif( ( $head, $buff ) = ( $line =~ /^(.*)\/\*\*(.*)\*\*\// ) ) { $buff =~ s/^\s*//; $buff =~ s/\s*$//;