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
c3165b4c
Commit
c3165b4c
authored
Mar 12, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ucrtbase/tests: Directly use ucrtbase functions in scanf.c.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d6f5afdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
27 deletions
+3
-27
scanf.c
dlls/ucrtbase/tests/scanf.c
+3
-27
No files found.
dlls/ucrtbase/tests/scanf.c
View file @
c3165b4c
...
...
@@ -27,38 +27,16 @@
#include "wine/test.h"
static
int
(
__cdecl
*
p_vsscanf
)(
unsigned
__int64
options
,
const
char
*
str
,
size_t
len
,
const
char
*
format
,
void
*
locale
,
__ms_va_list
valist
);
static
BOOL
init
(
void
)
{
HMODULE
hmod
=
LoadLibraryA
(
"ucrtbase.dll"
);
if
(
!
hmod
)
{
win_skip
(
"ucrtbase.dll not installed
\n
"
);
return
FALSE
;
}
p_vsscanf
=
(
void
*
)
GetProcAddress
(
hmod
,
"__stdio_common_vsscanf"
);
return
TRUE
;
}
static
int
WINAPIV
vsscanf_wrapper
(
unsigned
__int64
options
,
const
char
*
str
,
size_t
len
,
const
char
*
format
,
...)
{
int
ret
;
__ms_va_list
valist
;
__ms_va_start
(
valist
,
format
);
ret
=
p
_vsscanf
(
options
,
str
,
len
,
format
,
NULL
,
valist
);
ret
=
__stdio_common
_vsscanf
(
options
,
str
,
len
,
format
,
NULL
,
valist
);
__ms_va_end
(
valist
);
return
ret
;
}
#define UCRTBASE_SCANF_SECURECRT (0x0001)
#define UCRTBASE_SCANF_LEGACY_WIDE_SPECIFIERS (0x0002)
#define UCRTBASE_SCANF_LEGACY_MSVCRT_COMPATIBILITY (0x0004)
static
void
test_sscanf
(
void
)
{
static
const
float
float1
=
-
82
.
6267
f
,
float2
=
27
.
76
f
;
...
...
@@ -74,8 +52,8 @@ static void test_sscanf(void)
static
const
unsigned
int
tests
[]
=
{
0
,
UCRTBASE
_SCANF_LEGACY_WIDE_SPECIFIERS
,
UCRTBASE
_SCANF_LEGACY_MSVCRT_COMPATIBILITY
,
_CRT_INTERNAL
_SCANF_LEGACY_WIDE_SPECIFIERS
,
_CRT_INTERNAL
_SCANF_LEGACY_MSVCRT_COMPATIBILITY
,
};
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
tests
);
++
i
)
...
...
@@ -316,7 +294,5 @@ static void test_sscanf(void)
START_TEST
(
scanf
)
{
if
(
!
init
())
return
;
test_sscanf
();
}
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