my $config = "crypto/err/openssl.ec";
my $debug = 0;
my $rebuild = 0;
-my $static = 0;
+my $static = 1;
my $recurse = 0;
my $reindex = 0;
+my $dowrite = 0;
while (@ARGV) {
} elsif($arg eq "-reindex") {
$reindex = 1;
shift @ARGV;
- } elsif($arg eq "-static") {
- $static = 1;
+ } elsif($arg eq "-nostatic") {
+ $static = 0;
+ shift @ARGV;
+ } elsif($arg eq "-write") {
+ $dowrite = 1;
shift @ARGV;
} else {
last;
} elsif (/^R\s+(\S+)\s+(\S+)/) {
$rextra{$1} = $2;
$rcodes{$1} = $2;
- # Add extra reason with $1, value $2
}
}
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";
}
} else {
print STDERR "$lib:\t\t$fnew{$lib} New Functions,";
print STDERR " $rnew{$lib} New Reasons.\n";
-
+ next unless $dowrite;
}
# If we get here then we have some new error codes so we