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
97557ae1
Commit
97557ae1
authored
Nov 02, 2019
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Enable printf %z, %t and %j formats.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1309e11e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
printf.h
dlls/msvcrt/printf.h
+6
-4
printf.c
dlls/msvcrt/tests/printf.c
+6
-5
No files found.
dlls/msvcrt/printf.h
View file @
97557ae1
...
...
@@ -515,16 +515,18 @@ int FUNC_NAME(pf_printf)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ctx, const API
break
;
}
else
if
(
*
p
==
'w'
)
flags
.
WideString
=
*
p
++
;
#if _MSVCR_VER >= 140
else
if
(
*
p
==
'z'
||
*
p
==
't'
)
#if _MSVCR_VER
== 0 || _MSVCR_VER
>= 140
else
if
(
(
*
p
==
'z'
||
*
p
==
't'
)
&&
p
[
1
]
&&
strchr
(
"diouxX"
,
p
[
1
])
)
flags
.
IntegerNative
=
*
p
++
;
else
if
(
*
p
==
'T'
)
flags
.
NaturalString
=
*
p
++
;
else
if
(
*
p
==
'j'
)
{
flags
.
IntegerDouble
++
;
p
++
;
}
#endif
#if _MSVCR_VER >= 140
else
if
(
*
p
==
'T'
)
flags
.
NaturalString
=
*
p
++
;
#endif
else
if
((
*
p
==
'F'
||
*
p
==
'N'
)
&&
legacy_msvcrt_compat
)
p
++
;
/* ignore */
else
...
...
dlls/msvcrt/tests/printf.c
View file @
97557ae1
...
...
@@ -163,8 +163,10 @@ static void test_sprintf( void )
{
"%Ihd"
,
"Ihd"
,
0
,
INT_ARG
,
1
},
{
"%I0d"
,
"I0d"
,
0
,
INT_ARG
,
1
},
{
"%I64D"
,
"D"
,
0
,
ULONGLONG_ARG
,
0
,
-
1
},
{
"%zx"
,
"1"
,
"zx"
,
TODO_FLAG
|
INT_ARG
,
1
},
{
"%z"
,
"1"
,
"z"
,
TODO_FLAG
|
INT_ARG
,
1
},
{
"%zx"
,
"1"
,
"zx"
,
INT_ARG
,
1
},
{
"%z"
,
"z"
,
0
,
INT_ARG
,
1
},
{
"%tx"
,
"1"
,
"tx"
,
INT_ARG
,
1
},
{
"%t"
,
"t"
,
0
,
INT_ARG
,
1
},
{
"% d"
,
" 1"
,
0
,
INT_ARG
,
1
},
{
"%+ d"
,
"+1"
,
0
,
INT_ARG
,
1
},
{
"%S"
,
"wide"
,
0
,
PTR_ARG
,
0
,
0
,
0
,
L"wide"
},
...
...
@@ -216,9 +218,8 @@ static void test_sprintf( void )
{
"%u"
,
"4294967295"
,
0
,
INT_ARG
,
-
1
},
{
"%w"
,
""
,
0
,
INT_ARG
,
-
1
},
{
"%h"
,
""
,
0
,
INT_ARG
,
-
1
},
{
"%z"
,
"z"
,
0
,
INT_ARG
,
-
1
},
{
"%j"
,
""
,
"j"
,
TODO_FLAG
|
ULONGLONG_ARG
,
0
,
-
1
},
{
"%jd"
,
"-1"
,
"jd"
,
TODO_FLAG
|
ULONGLONG_ARG
,
0
,
-
1
},
{
"%j"
,
""
,
"j"
,
ULONGLONG_ARG
,
0
,
-
1
},
{
"%jd"
,
"-1"
,
"jd"
,
ULONGLONG_ARG
,
0
,
-
1
},
{
"%F"
,
""
,
0
,
INT_ARG
,
-
1
},
{
"%N"
,
""
,
0
,
INT_ARG
,
-
1
},
{
"%H"
,
"H"
,
0
,
INT_ARG
,
-
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