- next if $line =~ /typedef/;
- next if $line =~ /STACK_OF/;
- next unless $line =~ /([A-Za-z0-9_]+)\(/;
- print "$id $1 missing from NAME section\n"
- unless defined $names{$1};
- $names{$1} = 2;
+ my $sym;
+ $line =~ s/STACK_OF\([^)]+\)/int/g;
+ $line =~ s/__declspec\([^)]+\)//;
+ if ( $line =~ /typedef.* (\S+);/ ) {
+ $sym = $1;
+ } elsif ( $line =~ /#define ([A-Za-z0-9_]+)/ ) {
+ $sym = $1;
+ } elsif ( $line =~ /([A-Za-z0-9_]+)\(/ ) {
+ $sym = $1;
+ }
+ else {
+ next;
+ }
+ print "$id $sym missing from NAME section\n"
+ unless defined $names{$sym};
+ $names{$sym} = 2;