Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
eb6f79f9
Commit
eb6f79f9
authored
Nov 30, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use printf and scanf flags from public header.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
babe6ceb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
27 deletions
+26
-27
msvcrt.h
dlls/msvcrt/msvcrt.h
+12
-13
printf.h
dlls/msvcrt/printf.h
+4
-4
scanf.c
dlls/msvcrt/scanf.c
+6
-6
wcs.c
dlls/msvcrt/wcs.c
+4
-4
No files found.
dlls/msvcrt/msvcrt.h
View file @
eb6f79f9
...
...
@@ -23,6 +23,7 @@
#include <errno.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <wchar.h>
#include "windef.h"
...
...
@@ -1020,23 +1021,21 @@ extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t,
#define UNDNAME_NO_SPECIAL_SYMS (0x4000)
#define UNDNAME_NO_COMPLEX_TYPE (0x8000)
#define UCRTBASE_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION (0x0001)
#define UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR (0x0002)
#define UCRTBASE_PRINTF_LEGACY_WIDE_SPECIFIERS (0x0004)
#define UCRTBASE_PRINTF_LEGACY_MSVCRT_COMPATIBILITY (0x0008)
#define UCRTBASE_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS (0x0010)
#define UCRTBASE_PRINTF_STANDARD_ROUNDING (0x0020)
#define UCRTBASE_PRINTF_MASK (0x003F)
#define UCRTBASE_PRINTF_MASK ( \
_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION | \
_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR | \
_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS | \
_CRT_INTERNAL_PRINTF_LEGACY_MSVCRT_COMPATIBILITY | \
_CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS | \
_CRT_INTERNAL_PRINTF_STANDARD_ROUNDING )
#define MSVCRT_PRINTF_POSITIONAL_PARAMS (0x0100)
#define MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER (0x0200)
#define UCRTBASE_SCANF_SECURECRT (0x0001)
#define UCRTBASE_SCANF_LEGACY_WIDE_SPECIFIERS (0x0002)
#define UCRTBASE_SCANF_LEGACY_MSVCRT_COMPATIBILITY (0x0004)
#define UCRTBASE_SCANF_MASK (0x0007)
#define UCRTBASE_SCANF_MASK ( \
_CRT_INTERNAL_SCANF_SECURECRT | \
_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS | \
_CRT_INTERNAL_SCANF_LEGACY_MSVCRT_COMPATIBILITY )
#define COOPERATIVE_TIMEOUT_INFINITE ((unsigned int)-1)
#define COOPERATIVE_WAIT_TIMEOUT ~0
...
...
dlls/msvcrt/printf.h
View file @
eb6f79f9
...
...
@@ -960,10 +960,10 @@ int FUNC_NAME(pf_printf)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ctx, const API
BOOL
positional_params
=
options
&
MSVCRT_PRINTF_POSITIONAL_PARAMS
;
BOOL
invoke_invalid_param_handler
=
options
&
MSVCRT_PRINTF_INVOKE_INVALID_PARAM_HANDLER
;
#if _MSVCR_VER >= 140
BOOL
legacy_wide
=
options
&
UCRTBASE
_PRINTF_LEGACY_WIDE_SPECIFIERS
;
BOOL
legacy_msvcrt_compat
=
options
&
UCRTBASE
_PRINTF_LEGACY_MSVCRT_COMPATIBILITY
;
BOOL
three_digit_exp
=
options
&
UCRTBASE
_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS
;
BOOL
standard_rounding
=
options
&
UCRTBASE
_PRINTF_STANDARD_ROUNDING
;
BOOL
legacy_wide
=
options
&
_CRT_INTERNAL
_PRINTF_LEGACY_WIDE_SPECIFIERS
;
BOOL
legacy_msvcrt_compat
=
options
&
_CRT_INTERNAL
_PRINTF_LEGACY_MSVCRT_COMPATIBILITY
;
BOOL
three_digit_exp
=
options
&
_CRT_INTERNAL
_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS
;
BOOL
standard_rounding
=
options
&
_CRT_INTERNAL
_PRINTF_STANDARD_ROUNDING
;
#else
BOOL
legacy_wide
=
TRUE
,
legacy_msvcrt_compat
=
TRUE
;
BOOL
three_digit_exp
=
MSVCRT__get_output_format
()
!=
MSVCRT__TWO_DIGIT_EXPONENT
;
...
...
dlls/msvcrt/scanf.c
View file @
eb6f79f9
...
...
@@ -674,7 +674,7 @@ int CDECL MSVCRT__stdio_common_vsscanf(unsigned __int64 options,
* but parsing of those isn't implemented at all yet. */
if
(
options
&
~
UCRTBASE_SCANF_MASK
)
FIXME
(
"options %s not handled
\n
"
,
wine_dbgstr_longlong
(
options
));
if
(
options
&
UCRTBASE
_SCANF_SECURECRT
)
if
(
options
&
_CRT_INTERNAL
_SCANF_SECURECRT
)
return
MSVCRT_vsnscanf_s_l
(
input
,
length
,
format
,
locale
,
valist
);
else
return
MSVCRT_vsnscanf_l
(
input
,
length
,
format
,
locale
,
valist
);
...
...
@@ -694,7 +694,7 @@ int CDECL MSVCRT__stdio_common_vswscanf(unsigned __int64 options,
* but parsing of those isn't implemented at all yet. */
if
(
options
&
~
UCRTBASE_SCANF_MASK
)
FIXME
(
"options %s not handled
\n
"
,
wine_dbgstr_longlong
(
options
));
if
(
options
&
UCRTBASE
_SCANF_SECURECRT
)
if
(
options
&
_CRT_INTERNAL
_SCANF_SECURECRT
)
return
MSVCRT_vsnwscanf_s_l
(
input
,
length
,
format
,
locale
,
valist
);
else
return
MSVCRT_vsnwscanf_l
(
input
,
length
,
format
,
locale
,
valist
);
...
...
@@ -709,9 +709,9 @@ int CDECL MSVCRT__stdio_common_vfscanf(unsigned __int64 options,
_locale_t
locale
,
__ms_va_list
valist
)
{
if
(
options
&
~
UCRTBASE
_SCANF_SECURECRT
)
if
(
options
&
~
_CRT_INTERNAL
_SCANF_SECURECRT
)
FIXME
(
"options %s not handled
\n
"
,
wine_dbgstr_longlong
(
options
));
if
(
options
&
UCRTBASE
_SCANF_SECURECRT
)
if
(
options
&
_CRT_INTERNAL
_SCANF_SECURECRT
)
return
MSVCRT_vfscanf_s_l
(
file
,
format
,
locale
,
valist
);
else
return
MSVCRT_vfscanf_l
(
file
,
format
,
locale
,
valist
);
...
...
@@ -726,9 +726,9 @@ int CDECL MSVCRT__stdio_common_vfwscanf(unsigned __int64 options,
_locale_t
locale
,
__ms_va_list
valist
)
{
if
(
options
&
~
UCRTBASE
_SCANF_SECURECRT
)
if
(
options
&
~
_CRT_INTERNAL
_SCANF_SECURECRT
)
FIXME
(
"options %s not handled
\n
"
,
wine_dbgstr_longlong
(
options
));
if
(
options
&
UCRTBASE
_SCANF_SECURECRT
)
if
(
options
&
_CRT_INTERNAL
_SCANF_SECURECRT
)
return
MSVCRT_vfwscanf_s_l
(
file
,
format
,
locale
,
valist
);
else
return
MSVCRT_vfwscanf_l
(
file
,
format
,
locale
,
valist
);
...
...
dlls/msvcrt/wcs.c
View file @
eb6f79f9
...
...
@@ -896,11 +896,11 @@ int CDECL __stdio_common_vsprintf( unsigned __int64 options, char *str, size_t l
if
(
!
str
)
return
ret
;
if
(
options
&
UCRTBASE
_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION
)
if
(
options
&
_CRT_INTERNAL
_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION
)
return
ret
>
len
?
-
1
:
ret
;
if
(
ret
>=
len
)
{
if
(
len
)
str
[
len
-
1
]
=
0
;
if
(
options
&
UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOU
R
)
if
(
options
&
_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIO
R
)
return
ret
;
return
len
>
0
?
-
2
:
-
1
;
}
...
...
@@ -1509,11 +1509,11 @@ int CDECL MSVCRT__stdio_common_vswprintf( unsigned __int64 options,
if
(
!
str
)
return
ret
;
if
(
options
&
UCRTBASE
_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION
)
if
(
options
&
_CRT_INTERNAL
_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION
)
return
ret
>
len
?
-
1
:
ret
;
if
(
ret
>=
len
)
{
if
(
len
)
str
[
len
-
1
]
=
0
;
if
(
options
&
UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOU
R
)
if
(
options
&
_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIO
R
)
return
ret
;
return
len
>
0
?
-
2
:
-
1
;
}
...
...
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