Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
24a8e33f
Commit
24a8e33f
authored
Oct 29, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Use __ms_va_list in the FormatMessage test.
parent
b3534015
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
format_msg.c
dlls/kernel32/tests/format_msg.c
+14
-14
No files found.
dlls/kernel32/tests/format_msg.c
View file @
24a8e33f
...
...
@@ -26,29 +26,29 @@
/* #define ok(cond,failstr) if(!(cond)) {printf("line %d : %s\n",__LINE__,failstr);exit(1);} */
static
DWORD
doit
(
DWORD
flags
,
LPCVOID
src
,
DWORD
msg_id
,
DWORD
lang_id
,
LPSTR
out
,
DWORD
outsize
,
...
)
static
DWORD
__cdecl
doit
(
DWORD
flags
,
LPCVOID
src
,
DWORD
msg_id
,
DWORD
lang_id
,
LPSTR
out
,
DWORD
outsize
,
...
)
{
va_list
list
;
__ms_
va_list
list
;
DWORD
r
;
va_start
(
list
,
outsize
);
__ms_
va_start
(
list
,
outsize
);
r
=
FormatMessageA
(
flags
,
src
,
msg_id
,
lang_id
,
out
,
outsize
,
&
list
);
va_end
(
list
);
__ms_
va_end
(
list
);
return
r
;
}
static
DWORD
doitW
(
DWORD
flags
,
LPCVOID
src
,
DWORD
msg_id
,
DWORD
lang_id
,
LPWSTR
out
,
DWORD
outsize
,
...
)
static
DWORD
__cdecl
doitW
(
DWORD
flags
,
LPCVOID
src
,
DWORD
msg_id
,
DWORD
lang_id
,
LPWSTR
out
,
DWORD
outsize
,
...
)
{
va_list
list
;
__ms_
va_list
list
;
DWORD
r
;
va_start
(
list
,
outsize
);
__ms_
va_start
(
list
,
outsize
);
r
=
FormatMessageW
(
flags
,
src
,
msg_id
,
lang_id
,
out
,
outsize
,
&
list
);
va_end
(
list
);
__ms_
va_end
(
list
);
return
r
;
}
...
...
@@ -343,11 +343,11 @@ static void test_message_from_string_wide(void)
{
ULONG_PTR
args
[]
=
{
6
,
4
,
2
,
5
,
3
,
1
};
r
=
FormatMessageW
(
FORMAT_MESSAGE_FROM_STRING
|
FORMAT_MESSAGE_ARGUMENT_ARRAY
,
fmt_1oou1oou
,
0
,
0
,
out
,
sizeof
(
out
)
/
sizeof
(
WCHAR
),
(
va_list
*
)
args
);
0
,
0
,
out
,
sizeof
(
out
)
/
sizeof
(
WCHAR
),
(
__ms_
va_list
*
)
args
);
ok
(
!
lstrcmpW
(
s_sp002sp003
,
out
),
"failed out=[%s]
\n
"
,
wine_dbgstr_w
(
out
));
ok
(
r
==
13
,
"failed: r=%d
\n
"
,
r
);
r
=
FormatMessageW
(
FORMAT_MESSAGE_FROM_STRING
|
FORMAT_MESSAGE_ARGUMENT_ARRAY
,
fmt_1oou4oou
,
0
,
0
,
out
,
sizeof
(
out
)
/
sizeof
(
WCHAR
),
(
va_list
*
)
args
);
0
,
0
,
out
,
sizeof
(
out
)
/
sizeof
(
WCHAR
),
(
__ms_
va_list
*
)
args
);
ok
(
!
lstrcmpW
(
s_sp002sp001
,
out
),
"failed out=[%s]
\n
"
,
wine_dbgstr_w
(
out
));
ok
(
r
==
12
,
"failed: r=%d
\n
"
,
r
);
}
...
...
@@ -595,11 +595,11 @@ static void test_message_from_string(void)
{
ULONG_PTR
args
[]
=
{
6
,
4
,
2
,
5
,
3
,
1
};
r
=
FormatMessageA
(
FORMAT_MESSAGE_FROM_STRING
|
FORMAT_MESSAGE_ARGUMENT_ARRAY
,
"%1!*.*u!,%1!*.*u!"
,
0
,
0
,
out
,
sizeof
(
out
),
(
va_list
*
)
args
);
"%1!*.*u!,%1!*.*u!"
,
0
,
0
,
out
,
sizeof
(
out
),
(
__ms_
va_list
*
)
args
);
ok
(
!
strcmp
(
" 0002, 00003"
,
out
),
"failed out=[%s]
\n
"
,
out
);
ok
(
r
==
13
,
"failed: r=%d
\n
"
,
r
);
r
=
FormatMessageA
(
FORMAT_MESSAGE_FROM_STRING
|
FORMAT_MESSAGE_ARGUMENT_ARRAY
,
"%1!*.*u!,%4!*.*u!"
,
0
,
0
,
out
,
sizeof
(
out
),
(
va_list
*
)
args
);
"%1!*.*u!,%4!*.*u!"
,
0
,
0
,
out
,
sizeof
(
out
),
(
__ms_
va_list
*
)
args
);
ok
(
!
strcmp
(
" 0002, 001"
,
out
),
"failed out=[%s]
\n
"
,
out
);
ok
(
r
==
12
,
"failed: r=%d
\n
"
,
r
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment