diff options
Diffstat (limited to 'lib/talloc/script/mksigs.pl')
-rwxr-xr-x | lib/talloc/script/mksigs.pl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/talloc/script/mksigs.pl b/lib/talloc/script/mksigs.pl index 755cd79603..dfe36bc138 100755 --- a/lib/talloc/script/mksigs.pl +++ b/lib/talloc/script/mksigs.pl @@ -27,6 +27,7 @@ use strict; use warnings; my $in_comment = 0; +my $in_doxygen = 0; my $extern_C_block = 0; while (my $LINE = <>) { @@ -41,6 +42,14 @@ while (my $LINE = <>) { } } + # find end of DOXYGEN section + if ($in_doxygen) { + if ($LINE =~ /^#\s*else(?:\s+.*)?$/) { + $in_doxygen = 0; + } + next; + } + # strip C++-style comments $LINE =~ s/^(.*?)\/\/.*$/$1/; @@ -69,6 +78,13 @@ while (my $LINE = <>) { $LINE .= " " . $LINE2; } + # remove DOXYGEN sections + if ($LINE =~ /^#\s*ifdef\s+DOXYGEN(?:\s+.*)?$/) { + $in_doxygen = 1; + next; + } + + # remove all preprocessor directives next if ($LINE =~ /^#/); |