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
242beda8
Commit
242beda8
authored
Oct 10, 2003
by
Uwe Bonnes
Committed by
Alexandre Julliard
Oct 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
%n returns the number of consumed characters.
parent
5cb5aa63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
scanf.h
dlls/msvcrt/scanf.h
+10
-10
No files found.
dlls/msvcrt/scanf.h
View file @
242beda8
...
...
@@ -42,15 +42,15 @@
#endif
/* WIDE_SCANF */
#ifdef CONSOLE
#define _GETC_(file)
_getch(
)
#define _UNGETC_(nch, file)
_ungetch(nch
)
#define _GETC_(file)
(consumed++, _getch()
)
#define _UNGETC_(nch, file)
do { _ungetch(nch); consumed--; } while(0
)
#define _FUNCTION_ _cscanf(const _CHAR_ *format, ...)
#else
#ifdef STRING
#undef _EOF_
#define _EOF_ 0
#define _GETC_(file)
*file++
#define _UNGETC_(nch, file)
file--
#define _GETC_(file)
(consumed++, *file++)
#define _UNGETC_(nch, file)
do { file--; consumed--; } while(0)
#ifdef WIDE_SCANF
#define _FUNCTION_ MSVCRT_swscanf(const MSVCRT_wchar_t *file, const MSVCRT_wchar_t *format, ...)
#else
/* WIDE_SCANF */
...
...
@@ -58,12 +58,12 @@
#endif
/* WIDE_SCANF */
#else
/* STRING */
#ifdef WIDE_SCANF
#define _GETC_(file)
MSVCRT_fgetwc(file
)
#define _UNGETC_(nch, file)
MSVCRT_ungetwc(nch, file
)
#define _GETC_(file)
(consumed++, MSVCRT_fgetwc(file)
)
#define _UNGETC_(nch, file)
do { MSVCRT_ungetwc(nch, file); consumed--; } while(0
)
#define _FUNCTION_ MSVCRT_fwscanf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, ...)
#else
/* WIDE_SCANF */
#define _GETC_(file)
MSVCRT_fgetc(file
)
#define _UNGETC_(nch, file)
MSVCRT_ungetc(nch, file
)
#define _GETC_(file)
(consumed++, MSVCRT_fgetc(file)
)
#define _UNGETC_(nch, file)
do { MSVCRT_ungetc(nch, file); consumed--; } while(0
)
#define _FUNCTION_ MSVCRT_fscanf(MSVCRT_FILE* file, const char *format, ...)
#endif
/* WIDE_SCANF */
#endif
/* STRING */
...
...
@@ -76,7 +76,7 @@
* more types of format spec.
*/
int
_FUNCTION_
{
int
rd
=
0
;
int
rd
=
0
,
consumed
=
0
;
int
nch
;
va_list
ap
;
if
(
!*
format
)
return
0
;
...
...
@@ -430,7 +430,7 @@ int _FUNCTION_ {
case
'n'
:
{
if
(
!
suppress
)
{
int
*
n
=
va_arg
(
ap
,
int
*
);
*
n
=
rd
;
*
n
=
consumed
-
(
nch
!=
_EOF_
)
;
}
}
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