Add the CCHILDREN_TITLEBAR+1 and NUM_POINTS macros.

Add a couple base types that winapi_test does not know how to parse.
Fix a bug so that 'signed' and 'unsigned' are recognised as valid
types.
This commit is contained in:
Francois Gouget 2004-08-16 19:46:09 +00:00 committed by Alexandre Julliard
parent 36021cf79c
commit e69f38551e
3 changed files with 27 additions and 6 deletions

View File

@ -774,9 +774,12 @@ static void test_pack_SHNAMEMAPPINGW(void)
static void test_pack_AUTO_SCROLL_DATA(void)
{
/* AUTO_SCROLL_DATA (pack 4) */
TEST_TYPE(AUTO_SCROLL_DATA, 48, 4);
TEST_FIELD(AUTO_SCROLL_DATA, int, iNextSample, 0, 4, 4);
TEST_FIELD(AUTO_SCROLL_DATA, DWORD, dwLastScroll, 4, 4, 4);
TEST_FIELD(AUTO_SCROLL_DATA, BOOL, bFull, 8, 4, 4);
TEST_FIELD(AUTO_SCROLL_DATA, POINT[NUM_POINTS], pts, 12, 24, 4);
TEST_FIELD(AUTO_SCROLL_DATA, DWORD[NUM_POINTS], dwTimes, 36, 12, 4);
}
static void test_pack_BFFCALLBACK(void)

View File

@ -1112,6 +1112,7 @@ static void test_pack_LPTITLEBARINFO(void)
{
/* LPTITLEBARINFO */
TEST_TYPE(LPTITLEBARINFO, 4, 4);
TEST_TYPE_POINTER(LPTITLEBARINFO, 44, 4);
}
static void test_pack_LPTOGGLEKEYS(void)
@ -1873,6 +1874,7 @@ static void test_pack_PTITLEBARINFO(void)
{
/* PTITLEBARINFO */
TEST_TYPE(PTITLEBARINFO, 4, 4);
TEST_TYPE_POINTER(PTITLEBARINFO, 44, 4);
}
static void test_pack_PUSEROBJECTFLAGS(void)
@ -2037,8 +2039,10 @@ static void test_pack_TIMERPROC(void)
static void test_pack_TITLEBARINFO(void)
{
/* TITLEBARINFO (pack 4) */
TEST_TYPE(TITLEBARINFO, 44, 4);
TEST_FIELD(TITLEBARINFO, DWORD, cbSize, 0, 4, 4);
TEST_FIELD(TITLEBARINFO, RECT, rcTitleBar, 4, 16, 4);
TEST_FIELD(TITLEBARINFO, DWORD[CCHILDREN_TITLEBAR+1], rgstate, 20, 24, 4);
}
static void test_pack_TOGGLEKEYS(void)

View File

@ -149,6 +149,7 @@ my %type_name2type;
my %defines = (
"ANYSIZE_ARRAY" => 1,
"CCHDEVICENAME" => 32,
"CCHILDREN_TITLEBAR+1" => 6,
"ELF_VENDOR_SIZE" => 4,
"EXCEPTION_MAXIMUM_PARAMETERS" => 15,
"HW_PROFILE_GUIDLEN" => 39,
@ -160,7 +161,8 @@ my %defines = (
"MAX_GOPHER_DISPLAY_TEXT + 1" => 129,
"MAX_GOPHER_LOCATOR_LENGTH + 1" => 654,
"MAX_PATH" => 260,
"MAX_PROFILE_LEN" => 80,
"MAX_PROFILE_LEN" => 80,
"NUM_POINTS" => 3,
"OFS_MAXPATHNAME" => 128,
"SIZE_OF_80387_REGISTERS" => 80,
"TOKEN_SOURCE_LENGTH" => 8,
@ -203,7 +205,11 @@ sub _find_align_kind_size {
$align = 2;
$kind = "signed";
$size = 2;
} elsif (!/^$/ && /^(?:(signed|unsigned)\s+)?(?:__int32|int|long(?:\s+int)?)?$/) {
} elsif (/^(signed|unsigned)$/) {
$align = 4;
$kind = defined($1) ? $1 : "signed";
$size = 4;
} elsif (/^(?:(signed|unsigned)\s+)?(?:__int32|int|long(?:\s+int)?)$/) {
$align = 4;
$kind = defined($1) ? $1 : "signed";
$size = 4;
@ -215,7 +221,7 @@ sub _find_align_kind_size {
$align = 8;
$kind = defined($1) ? $1 : "signed";
$size = 8;
} elsif (/^(?:double)$/) {
} elsif (/^(?:double|DOUBLE|DATE)$/) {
$align = 8;
$kind = "float";
$size = 8;
@ -236,9 +242,9 @@ sub _find_align_kind_size {
$kind = "struct";
$size = 8;
} elsif (/^(?:VOID)$/) {
$align = 4;
$kind = "signed";
$size = 4;
$align = 4;
$kind = "signed";
$size = 4;
} elsif (/^(?:SHORT)$/) {
$align = 2;
$kind = "unsigned";
@ -255,6 +261,14 @@ sub _find_align_kind_size {
$align = 2;
$kind = "unsigned";
$size = 2;
} elsif (/^(?:INT64|LONG64|LONGLONG)$/) {
$align = 8;
$kind = "signed";
$size = 8;
} elsif (/^(?:UINT64|ULONG64|DWORD64|ULONGLONG|DWORDLONG)$/) {
$align = 8;
$kind = "unsigned";
$size = 8;
} elsif (/^(?:LARGE_INTEGER)$/) {
$align = 8;
$kind = "union";