mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
tdb:mksigs: correctly ignode multiline function typedefs
by first concatenating multilint parentheses and removing typefes afterwards.
Michael
(cherry picked from samba commit 13bfcd5a93
)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be ctdb commit 37225f1ed3f70d7259c2af2c51c671105c34476a)
This commit is contained in:
parent
67da31e222
commit
6d9ce0ef50
@ -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/;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user