]> mj.ucw.cz Git - libucw.git/commitdiff
Documentation: keep ; at the end of functions
authorMichal Vaner <vorner@ucw.cz>
Fri, 5 Sep 2008 18:33:30 +0000 (20:33 +0200)
committerMichal Vaner <vorner@ucw.cz>
Fri, 5 Sep 2008 18:33:30 +0000 (20:33 +0200)
And replace { at the end of inline functions with ;

build/extract-doc.pl

index 7eb28354f699ed9eb705a33934625dbae93fc6e3..b4ea259caccfa6d83be65bd61b5a66bcb8fc93ae 100755 (executable)
@@ -81,7 +81,8 @@ sub process( $ ) {
                                        s/^\s*\s?//;
                                        s/\/\/.*//;
                                        s/\/\*.*?\*\///gs;
-                                       s/[;{].*//;
+                                       s/([;{]).*/";"x length( $1 )/e;
+                                       s/\)\s*;$/);/;
                                        formatNote( $_, $buff );
                                        $head = undef;
                                        $buff = undef;
@@ -99,7 +100,8 @@ sub process( $ ) {
                                if( $head =~ /\(/ || $head !~ /{/ ) {
                                        $head =~ s/^\s*//;
                                        $head =~ s/\/\*.*?\*\///gs;
-                                       $head =~ s/[;{].*//;
+                                       $head =~ s/([;{]).*/";"x length( $1 )/e;
+                                       $head =~ s/\)\s*;$/);/;
                                        formatNote( $head, $buff );
                                        $head = undef;
                                        $buff = undef;