diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-04-25 11:17:44 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-04-25 11:17:44 +0000 |
commit | 5043fc9fd577bcc06623a8aad418a136c15a5928 (patch) | |
tree | 185aff46b2b458eb75afc33d52347b9f5f8c829f /util/mkerr.pl | |
parent | 8e945b5efb24927387154dd6d50a04a5bf786463 (diff) | |
download | openssl-new-5043fc9fd577bcc06623a8aad418a136c15a5928.tar.gz |
Fix mkerr.pl to find functions returning function pointers (thanks Ulf!)
also add a few missing prototypes.
Diffstat (limited to 'util/mkerr.pl')
-rw-r--r-- | util/mkerr.pl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/util/mkerr.pl b/util/mkerr.pl index ccf766b9a0..60a3028bc6 100644 --- a/util/mkerr.pl +++ b/util/mkerr.pl @@ -66,7 +66,6 @@ while(<IN>) } elsif (/^R\s+(\S+)\s+(\S+)/) { $rextra{$1} = $2; $rcodes{$1} = $2; - # Add extra reason with $1, value $2 } } @@ -114,20 +113,24 @@ while (($lib, $hdr) = each %hinc) foreach (split /;/, $def) { s/^[\n\s]*//g; s/[\n\s]*$//g; - next if (/\w+\W+(\w+)\W*\(\s*\)$/s); # K&R C - next if (/\(\*(\w*)\([^\)]+/); - if (/\w+\W+\w+\W*\(.*\)$/s) { + next if(/typedef\W/); + if (/\(\*(\w*)\([^\)]+/) { + my $name = $1; + $name =~ tr/[a-z]/[A-Z]/; + $ftrans{$name} = $1; + } elsif (/\w+\W+(\w+)\W*\(\s*\)$/s){ + # K&R C + next ; + } elsif (/\w+\W+\w+\W*\(.*\)$/s) { while (not /\(\)$/s) { s/[^\(\)]*\)$/\)/s; s/\([^\(\)]*\)\)$/\)/s; } s/\(void\)//; /(\w+)\W*\(\)/s; - next if(/typedef\W/); my $name = $1; $name =~ tr/[a-z]/[A-Z]/; $ftrans{$name} = $1; - } elsif (/\(/ and not (/=/ or /DECLARE_STACK/)) { print STDERR "Header $hdr: cannot parse: $_;\n"; } |