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
545a3b71
Commit
545a3b71
authored
Dec 15, 2003
by
Uwe Bonnes
Committed by
Alexandre Julliard
Dec 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch and test for scanf %i.
parent
73593d7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
scanf.h
dlls/msvcrt/scanf.h
+1
-1
scanf.c
dlls/msvcrt/tests/scanf.c
+9
-0
No files found.
dlls/msvcrt/scanf.h
View file @
545a3b71
...
...
@@ -168,7 +168,7 @@ int _FUNCTION_ {
base
=
10
;
number_signed
=
1
;
goto
number
;
case
'i'
:
/* generic integer */
base
=
0
;
number_signed
=
1
;
base
=
1
0
;
number_signed
=
1
;
number
:
{
/* read an integer */
long
unsigned
int
cur
=
0
;
...
...
dlls/msvcrt/tests/scanf.c
View file @
545a3b71
...
...
@@ -73,6 +73,15 @@ static void test_sscanf( void )
ret
=
sscanf
(
buffer
+
2
,
"%*c%n"
,
&
number_so_far
);
ok
(
ret
==
0
,
"problem with format arg
\"
%%*c%%n
\"
"
);
ok
(
number_so_far
==
1
,
"Read wrong arg for
\"
%%n
\"
%d instead of 2"
,
number_so_far
);
/* Check %i according to bug 1878 */
strcpy
(
buffer
,
"123"
);
ret
=
sscanf
(
buffer
,
"%i"
,
&
result
);
ok
(
ret
==
1
,
"Wrong number of arguments read"
);
ok
(
result
==
123
,
"Wrong number read"
);
ret
=
sscanf
(
buffer
,
"%d"
,
&
result
);
ok
(
ret
==
1
,
"Wrong number of arguments read"
);
ok
(
result
==
123
,
"Wrong number read"
);
}
static
void
test_sprintf
(
void
)
...
...
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