Make matching more robbust in generate_errors.pl

This commit is contained in:
Andres Amaya Garcia 2017-10-17 21:24:56 +01:00
parent d2da622138
commit 69944b1e67

View File

@ -50,7 +50,7 @@ my @files = <$include_dir/*.h>;
my @matches;
foreach my $file (@files) {
open(FILE, "$file");
my @grep_res = grep(/define MBEDTLS_ERR_/, <FILE>);
my @grep_res = grep(/^\s*#define\s+MBEDTLS_ERR_\w+\s+\-0x[0-9A-Fa-f]+/, <FILE>);
push(@matches, @grep_res);
close FILE;
}