Better splitting regexp for test_ordinals
Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
parent
2ab9687479
commit
ea09088e17
@ -73,28 +73,28 @@ sub testordinals
|
||||
|
||||
open(my $fh, '<', $filename);
|
||||
while (my $line = <$fh>) {
|
||||
my @tokens = split(/( |\t|:)+/, $line);
|
||||
my @tokens = split(/(?:\s+|\s*:\s*)/, $line);
|
||||
#Check the line looks sane
|
||||
if ($#tokens < 8 || $#tokens > 10) {
|
||||
if ($#tokens < 4 || $#tokens > 5) {
|
||||
print STDERR "Invalid line:\n$line\n";
|
||||
$ret = 0;
|
||||
last;
|
||||
}
|
||||
if ($tokens[4] eq "NOEXIST") {
|
||||
if ($tokens[2] eq "NOEXIST") {
|
||||
#Ignore this line
|
||||
next;
|
||||
}
|
||||
#Some ordinals can be repeated, e.g. if one is VMS and another is !VMS
|
||||
$newqual = $tokens[6];
|
||||
$newqual = $tokens[3];
|
||||
$newqual =~ s/!//g;
|
||||
if ($cnt > $tokens[2]
|
||||
|| ($cnt == $tokens[2] && ($qualifier ne $newqual
|
||||
if ($cnt > $tokens[1]
|
||||
|| ($cnt == $tokens[1] && ($qualifier ne $newqual
|
||||
|| $qualifier eq "FUNCTION"))) {
|
||||
print STDERR "Invalid ordinal detected: ".$tokens[2]."\n";
|
||||
print STDERR "Invalid ordinal detected: ".$tokens[1]."\n";
|
||||
$ret = 0;
|
||||
last;
|
||||
}
|
||||
$cnt = $tokens[2];
|
||||
$cnt = $tokens[1];
|
||||
$qualifier = $newqual;
|
||||
$lastfunc = $tokens[0];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user