Fixed EOF return value for sscanf.
This commit is contained in:
parent
5778165d65
commit
a3717a2edd
|
@ -26,6 +26,7 @@
|
||||||
#ifdef WIDE_SCANF
|
#ifdef WIDE_SCANF
|
||||||
#define _CHAR_ MSVCRT_wchar_t
|
#define _CHAR_ MSVCRT_wchar_t
|
||||||
#define _EOF_ MSVCRT_WEOF
|
#define _EOF_ MSVCRT_WEOF
|
||||||
|
#define _EOF_RET MSVCRT_WEOF
|
||||||
#define _ISSPACE_(c) MSVCRT_iswspace(c)
|
#define _ISSPACE_(c) MSVCRT_iswspace(c)
|
||||||
#define _ISDIGIT_(c) MSVCRT_iswdigit(c)
|
#define _ISDIGIT_(c) MSVCRT_iswdigit(c)
|
||||||
#define _CONVERT_(c) c /*** FIXME ***/
|
#define _CONVERT_(c) c /*** FIXME ***/
|
||||||
|
@ -33,6 +34,7 @@
|
||||||
#else /* WIDE_SCANF */
|
#else /* WIDE_SCANF */
|
||||||
#define _CHAR_ char
|
#define _CHAR_ char
|
||||||
#define _EOF_ MSVCRT_EOF
|
#define _EOF_ MSVCRT_EOF
|
||||||
|
#define _EOF_RET MSVCRT_EOF
|
||||||
#define _ISSPACE_(c) isspace(c)
|
#define _ISSPACE_(c) isspace(c)
|
||||||
#define _ISDIGIT_(c) isdigit(c)
|
#define _ISDIGIT_(c) isdigit(c)
|
||||||
#define _CONVERT_(c) c /*** FIXME ***/
|
#define _CONVERT_(c) c /*** FIXME ***/
|
||||||
|
@ -90,7 +92,7 @@ int _FUNCTION_ {
|
||||||
#endif /* CONSOLE */
|
#endif /* CONSOLE */
|
||||||
#endif /* WIDE_SCANF */
|
#endif /* WIDE_SCANF */
|
||||||
nch = _GETC_(file);
|
nch = _GETC_(file);
|
||||||
if (nch == _EOF_) return _EOF_;
|
if (nch == _EOF_) return _EOF_RET;
|
||||||
|
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
while (*format) {
|
while (*format) {
|
||||||
|
|
Loading…
Reference in New Issue