]> mj.ucw.cz Git - libucw.git/blobdiff - build/doc-extract
The rest of sighandler separation
[libucw.git] / build / doc-extract
index 6be99b45fb54e8e5728adb7dab147908ecfa4036..67fdd64cb070ab919fe7de69cc239c8bf39ccd2f 100755 (executable)
@@ -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*$//;