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
6c70942a
Commit
6c70942a
authored
Dec 26, 2005
by
Jesse Allen
Committed by
Alexandre Julliard
Dec 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Parse I, I32, and I64 integer size flags in printf.
parent
81c446ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
printf.c
dlls/msvcrt/tests/printf.c
+15
-0
wcs.c
dlls/msvcrt/wcs.c
+14
-0
No files found.
dlls/msvcrt/tests/printf.c
View file @
6c70942a
...
...
@@ -56,6 +56,21 @@ static void test_sprintf( void )
ok
(
!
strcmp
(
buffer
,
"I"
),
"Problem with
\"
I
\"
interpretation
\n
"
);
ok
(
r
==
1
,
"return count wrong
\n
"
);
format
=
"%I0d"
;
r
=
sprintf
(
buffer
,
format
,
1
);
ok
(
!
strcmp
(
buffer
,
"I0d"
),
"I0d failed
\n
"
);
ok
(
r
==
3
,
"return count wrong
\n
"
);
format
=
"%I32d"
;
r
=
sprintf
(
buffer
,
format
,
1
);
ok
(
!
strcmp
(
buffer
,
"1"
),
"I32d failed
\n
"
);
ok
(
r
==
1
,
"return count wrong
\n
"
);
format
=
"%I64D"
;
r
=
sprintf
(
buffer
,
format
,(
LONGLONG
)
-
1
);
ok
(
!
strcmp
(
buffer
,
"D"
),
"I64D failed: %s
\n
"
,
buffer
);
ok
(
r
==
1
,
"return count wrong
\n
"
);
format
=
"% d"
;
r
=
sprintf
(
buffer
,
format
,
1
);
ok
(
!
strcmp
(
buffer
,
" 1"
),
"Problem with sign place-holder: '%s'
\n
"
,
buffer
);
...
...
dlls/msvcrt/wcs.c
View file @
6c70942a
...
...
@@ -495,6 +495,20 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, va_list valist )
flags
.
IntegerLength
=
*
p
;
p
++
;
}
else
if
(
*
p
==
'I'
)
{
if
(
*
(
p
+
1
)
==
'6'
&&
*
(
p
+
2
)
==
'4'
)
{
flags
.
IntegerDouble
++
;
p
+=
3
;
}
else
if
(
*
(
p
+
1
)
==
'3'
&&
*
(
p
+
2
)
==
'2'
)
p
+=
3
;
else
if
(
isdigit
(
*
(
p
+
1
))
||
*
(
p
+
1
)
==
0
)
break
;
else
p
++
;
}
else
if
(
*
p
==
'w'
)
flags
.
WideString
=
*
p
++
;
else
if
(
*
p
==
'F'
)
...
...
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