tdb:mksigs: correctly ignode multiline function typedefs
authorMichael Adam <obnox@samba.org>
Fri, 11 Sep 2009 13:01:46 +0000 (15:01 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 11 Sep 2009 13:31:30 +0000 (15:31 +0200)
by first concatenating multilint parentheses and removing typefes afterwards.

Michael

lib/tdb/script/mksigs.pl

index 3eb90d99dc6dd34466eca2ff106b95f52f249f7b..ab2e18ec520d29bd628262f302fce7855f9c4251 100755 (executable)
@@ -118,11 +118,6 @@ while (my $LINE = <>) {
                }
        }
 
-       next if ($LINE =~ /^typedef\s/);
-       next if ($LINE =~ /^enum\s+[^\{\(]+\s+\{/);
-       next if ($LINE =~ /^struct\s+[^\{\(]+\s+\{.*\}\s*;/);
-       next if ($LINE =~ /^struct\s+[a-zA-Z0-9_]+\s*;/);
-
        # concetenate function prototypes that stretch over multiple lines
        $REST = $LINE;
        my $parenthesis = 0;
@@ -156,6 +151,11 @@ while (my $LINE = <>) {
                }
        }
 
+       next if ($LINE =~ /^typedef\s/);
+       next if ($LINE =~ /^enum\s+[^\{\(]+\s+\{/);
+       next if ($LINE =~ /^struct\s+[^\{\(]+\s+\{.*\}\s*;/);
+       next if ($LINE =~ /^struct\s+[a-zA-Z0-9_]+\s*;/);
+
        # remove trailing spaces
        $LINE =~ s/(.*?)\s*$/$1/;