tools: Support multiple error name tokens in a line.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Akihiro Sagawa 2017-07-03 23:24:33 +09:00 committed by Alexandre Julliard
parent c8faa1925c
commit 4fbabc2add
2 changed files with 3 additions and 2 deletions

View File

@ -5429,6 +5429,7 @@ static const struct
{ "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD }, { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
{ "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB }, { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB },
{ "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING }, { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
{ "PROCESS_NOT_IN_JOB", STATUS_PROCESS_NOT_IN_JOB },
{ "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG }, { "SECTION_TOO_BIG", STATUS_SECTION_TOO_BIG },
{ "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED }, { "SEMAPHORE_LIMIT_EXCEEDED", STATUS_SEMAPHORE_LIMIT_EXCEEDED },
{ "SHARING_VIOLATION", STATUS_SHARING_VIOLATION }, { "SHARING_VIOLATION", STATUS_SHARING_VIOLATION },

View File

@ -290,11 +290,11 @@ sub GET_ERROR_NAMES()
open FILE, $f or die "Can't open $f"; open FILE, $f or die "Can't open $f";
while (<FILE>) while (<FILE>)
{ {
if (/STATUS_(\w+)/) while (/\bSTATUS_(\w+)/g)
{ {
$errors{$1} = "STATUS_$1" unless ($1 eq "SUCCESS" || $1 eq "WAIT_0"); $errors{$1} = "STATUS_$1" unless ($1 eq "SUCCESS" || $1 eq "WAIT_0");
} }
elsif (/set_win32_error\s*\(\s*(\w+)\s*\)/) while (/\bset_win32_error\s*\(\s*(\w+)\s*\)/g)
{ {
$errors{$1} = "0xc0010000 | $1"; $errors{$1} = "0xc0010000 | $1";
} }