Currently a '//****' is matched as an /* comment - disallow a '/' in

front of the '/*' match. An 'extern "C" {' can be split in several
lines - allow '\n' as space, and lookout for the rest if partial
found.
This commit is contained in:
Peter Berg Larsen 2005-01-03 20:18:58 +00:00 committed by Alexandre Julliard
parent 6beae245ea
commit 08aa87fb57
1 changed files with 5 additions and 2 deletions

View File

@ -75,7 +75,7 @@ foreach my $file (@files) {
}
# remove C comments
if(s/^(.*?)(\/\*.*?\*\/)(.*)$/$1 $3/s) {
if(s/^(|.*?[^\/])(\/\*.*?\*\/)(.*)$/$1 $3/s) {
$again = 1;
next;
} elsif(/^(.*?)\/\*/s) {
@ -101,10 +101,13 @@ foreach my $file (@files) {
}
# Remove extern "C"
if(s/^\s*extern\s+"C"\s+\{//m) {
if(s/^\s*extern[\s\n]+"C"[\s\n]+\{//m) {
$extern_c = 1;
$again = 1;
next;
} elsif(m/^\s*extern[\s\n]+"C"/m) {
$lookahead = 1;
next;
}
if($level > 0)