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
6ee428e3
Commit
6ee428e3
authored
Mar 20, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add support for field width in scanf %c format.
parent
0506c341
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
+16
-17
scanf.h
dlls/msvcrt/scanf.h
+16
-17
No files found.
dlls/msvcrt/scanf.h
View file @
6ee428e3
...
...
@@ -331,8 +331,7 @@ _FUNCTION_ {
else
goto
widecharstring
;
#endif
/* WIDE_SCANF */
charstring
:
{
/* read a word into a char */
char
*
str
=
suppress
?
NULL
:
va_arg
(
ap
,
char
*
);
char
*
sptr
=
str
;
char
*
sptr
=
suppress
?
NULL
:
va_arg
(
ap
,
char
*
);
/* skip initial whitespace */
while
((
nch
!=
_EOF_
)
&&
_ISSPACE_
(
nch
))
nch
=
_GETC_
(
file
);
...
...
@@ -348,9 +347,7 @@ _FUNCTION_ {
}
break
;
widecharstring
:
{
/* read a word into a wchar_t* */
MSVCRT_wchar_t
*
str
=
suppress
?
NULL
:
va_arg
(
ap
,
MSVCRT_wchar_t
*
);
MSVCRT_wchar_t
*
sptr
=
str
;
MSVCRT_wchar_t
*
sptr
=
suppress
?
NULL
:
va_arg
(
ap
,
MSVCRT_wchar_t
*
);
/* skip initial whitespace */
while
((
nch
!=
_EOF_
)
&&
_ISSPACE_
(
nch
))
nch
=
_GETC_
(
file
);
...
...
@@ -384,24 +381,26 @@ _FUNCTION_ {
else
goto
widecharacter
;
#endif
/* WIDE_SCANF */
character
:
{
/* read single character into char */
if
(
nch
!=
_EOF_
)
{
if
(
!
suppress
)
{
char
*
c
=
va_arg
(
ap
,
char
*
);
*
c
=
_CHAR2SUPPORTED_
(
nch
);
}
st
=
1
;
char
*
str
=
suppress
?
NULL
:
va_arg
(
ap
,
char
*
);
if
(
width
==
-
1
)
width
=
1
;
while
((
width
!=
0
)
&&
(
nch
!=
_EOF_
))
{
if
(
!
suppress
)
*
str
++
=
_CHAR2SUPPORTED_
(
nch
);
st
++
;
width
--
;
nch
=
_GETC_
(
file
);
}
}
break
;
widecharacter
:
{
/* read single character into a wchar_t */
if
(
nch
!=
_EOF_
)
{
if
(
!
suppress
)
{
MSVCRT_wchar_t
*
c
=
va_arg
(
ap
,
MSVCRT_wchar_t
*
);
*
c
=
_WIDE2SUPPORTED_
(
nch
);
}
MSVCRT_wchar_t
*
str
=
suppress
?
NULL
:
va_arg
(
ap
,
MSVCRT_wchar_t
*
);
if
(
width
==
-
1
)
width
=
1
;
while
((
width
!=
0
)
&&
(
nch
!=
_EOF_
))
{
if
(
!
suppress
)
*
str
++
=
_WIDE2SUPPORTED_
(
nch
);
st
++
;
width
--
;
nch
=
_GETC_
(
file
);
st
=
1
;
}
}
break
;
...
...
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