checkAPIs: match packet-*.[ch], independent of locale

In perl, the \w character group seems to match '-' depending on the
locale. On Linux (with the C or en_US.UTF-8 locale), packet-ssl-utils.c
does not match.

This patch makes the regex match anything except for the path separator.

Change-Id: I27543072295af5f2bd5ea8ab36e5d913bebf7d85
Reviewed-on: https://code.wireshark.org/review/7266
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Peter Wu 2015-02-19 23:58:41 +01:00 committed by Michael Mann
parent 5012cf84e6
commit c1b672cf23
1 changed files with 1 additions and 1 deletions

View File

@ -2011,7 +2011,7 @@ if (!$result || $help_flag) {
if ($pre_commit) {
my $filename = $ARGV[0];
# if the filename is packet-*.c or packet-*.h, then we set the abort and termoutput groups.
if ($filename =~ /\bpacket-\w+\.[ch]$/) {
if ($filename =~ /\bpacket-[^\/\\]+\.[ch]$/) {
push @apiGroups, "abort";
push @apiGroups, "termoutput";
}