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
9e3a4652
Commit
9e3a4652
authored
Jul 01, 2008
by
Peter Oberndorfer
Committed by
Alexandre Julliard
Jul 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implement %p for scanf.
parent
02fb99e6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
scanf.h
dlls/msvcrt/scanf.h
+3
-1
scanf.c
dlls/msvcrt/tests/scanf.c
+0
-2
No files found.
dlls/msvcrt/scanf.h
View file @
9e3a4652
...
...
@@ -149,6 +149,8 @@ _FUNCTION_ {
}
/* read type */
switch
(
*
format
)
{
case
'p'
:
case
'P'
:
/* pointer. */
case
'x'
:
case
'X'
:
/* hexadecimal integer. */
base
=
16
;
...
...
@@ -179,7 +181,7 @@ _FUNCTION_ {
if
(
width
>
0
)
width
--
;
}
/* look for leading indication of base */
if
(
width
!=
0
&&
nch
==
'0'
)
{
if
(
width
!=
0
&&
nch
==
'0'
&&
*
format
!=
'p'
&&
*
format
!=
'P'
)
{
nch
=
_GETC_
(
file
);
if
(
width
>
0
)
width
--
;
seendigit
=
1
;
...
...
dlls/msvcrt/tests/scanf.c
View file @
9e3a4652
...
...
@@ -41,7 +41,6 @@ static void test_sscanf( void )
ok
(
ret
==
EOF
,
"sscanf returns %x instead of %x
\n
"
,
ret
,
EOF
);
/* check %p */
todo_wine
{
ok
(
sscanf
(
"000000000046F170"
,
"%p"
,
&
ptr
)
==
1
,
"sscanf failed
\n
"
);
ok
(
ptr
==
(
void
*
)
0x46F170
,
"sscanf reads %p instead of %x
\n
"
,
ptr
,
0x46F170
);
...
...
@@ -66,7 +65,6 @@ static void test_sscanf( void )
ok
(
sscanf
(
"1234"
,
"%P"
,
&
ptr
)
==
1
,
"sscanf failed
\n
"
);
ok
(
ptr
==
(
void
*
)
0x1234
,
"sscanf reads %p instead of %x
\n
"
,
ptr
,
0x1234
);
}
/* check %x */
strcpy
(
buffer
,
"0x519"
);
...
...
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