mirror of
https://github.com/reactos/wine.git
synced 2025-01-26 05:54:34 +00:00
msvcrt: Added _cwscanf* implementation.
This commit is contained in:
parent
177d545592
commit
f36671c57f
@ -355,10 +355,10 @@
|
||||
@ stub _cwprintf_p_l
|
||||
@ stub _cwprintf_s
|
||||
@ stub _cwprintf_s_l
|
||||
@ stub _cwscanf
|
||||
@ stub _cwscanf_l
|
||||
@ stub _cwscanf_s
|
||||
@ stub _cwscanf_s_l
|
||||
@ varargs _cwscanf(wstr) msvcrt._cwscanf
|
||||
@ varargs _cwscanf_l(wstr ptr) msvcrt._cwscanf_l
|
||||
@ varargs _cwscanf_s(wstr) msvcrt._cwscanf_s
|
||||
@ varargs _cwscanf_s_l(wstr ptr) msvcrt._cwscanf_s_l
|
||||
@ extern _daylight msvcrt._daylight
|
||||
@ cdecl _decode_pointer(ptr) msvcr90._decode_pointer
|
||||
@ cdecl _difftime32(long long) msvcrt._difftime32
|
||||
|
@ -347,10 +347,10 @@
|
||||
@ stub _cwprintf_p_l
|
||||
@ stub _cwprintf_s
|
||||
@ stub _cwprintf_s_l
|
||||
@ stub _cwscanf
|
||||
@ stub _cwscanf_l
|
||||
@ stub _cwscanf_s
|
||||
@ stub _cwscanf_s_l
|
||||
@ varargs _cwscanf(wstr) msvcrt._cwscanf
|
||||
@ varargs _cwscanf_l(wstr ptr) msvcrt._cwscanf_l
|
||||
@ varargs _cwscanf_s(wstr) msvcrt._cwscanf_s
|
||||
@ varargs _cwscanf_s_l(wstr ptr) msvcrt._cwscanf_s_l
|
||||
@ extern _daylight msvcrt._daylight
|
||||
@ cdecl _decode_pointer(ptr) MSVCR90_decode_pointer
|
||||
@ cdecl _difftime32(long long) msvcrt._difftime32
|
||||
|
@ -329,10 +329,10 @@
|
||||
# stub _cwprintf_p_l
|
||||
# stub _cwprintf_s
|
||||
# stub _cwprintf_s_l
|
||||
# stub _cwscanf
|
||||
# stub _cwscanf_l
|
||||
# stub _cwscanf_s
|
||||
# stub _cwscanf_s_l
|
||||
@ varargs _cwscanf(wstr)
|
||||
@ varargs _cwscanf_l(wstr ptr)
|
||||
@ varargs _cwscanf_s(wstr)
|
||||
@ varargs _cwscanf_s_l(wstr ptr)
|
||||
@ extern _daylight MSVCRT___daylight
|
||||
@ cdecl _difftime32(long long) MSVCRT__difftime32
|
||||
@ cdecl _difftime64(long long) MSVCRT__difftime64
|
||||
|
@ -113,6 +113,17 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) {
|
||||
#define SECURE 1
|
||||
#include "scanf.h"
|
||||
|
||||
/* vcwscanf_l */
|
||||
#define WIDE_SCANF 1
|
||||
#define CONSOLE 1
|
||||
#undef STRING
|
||||
#undef SECURE
|
||||
#include "scanf.h"
|
||||
|
||||
/* vcwscanf_s_l */
|
||||
#define SECURE 1
|
||||
#include "scanf.h"
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* fscanf (MSVCRT.@)
|
||||
@ -515,3 +526,59 @@ int CDECL _cscanf_s_l(const char *format, MSVCRT__locale_t locale, ...)
|
||||
__ms_va_end(valist);
|
||||
return res;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _cwscanf (MSVCRT.@)
|
||||
*/
|
||||
int CDECL _cwscanf(const char *format, ...)
|
||||
{
|
||||
__ms_va_list valist;
|
||||
int res;
|
||||
|
||||
__ms_va_start(valist, format);
|
||||
res = MSVCRT_vcwscanf_l(format, NULL, valist);
|
||||
__ms_va_end(valist);
|
||||
return res;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _cwscanf_l (MSVCRT.@)
|
||||
*/
|
||||
int CDECL _cwscanf_l(const char *format, MSVCRT__locale_t locale, ...)
|
||||
{
|
||||
__ms_va_list valist;
|
||||
int res;
|
||||
|
||||
__ms_va_start(valist, locale);
|
||||
res = MSVCRT_vcwscanf_l(format, locale, valist);
|
||||
__ms_va_end(valist);
|
||||
return res;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _cwscanf_s (MSVCRT.@)
|
||||
*/
|
||||
int CDECL _cwscanf_s(const char *format, ...)
|
||||
{
|
||||
__ms_va_list valist;
|
||||
int res;
|
||||
|
||||
__ms_va_start(valist, format);
|
||||
res = MSVCRT_vcwscanf_s_l(format, NULL, valist);
|
||||
__ms_va_end(valist);
|
||||
return res;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _cwscanf_s_l (MSVCRT.@)
|
||||
*/
|
||||
int CDECL _cwscanf_s_l(const char *format, MSVCRT__locale_t locale, ...)
|
||||
{
|
||||
__ms_va_list valist;
|
||||
int res;
|
||||
|
||||
__ms_va_start(valist, locale);
|
||||
res = MSVCRT_vcwscanf_s_l(format, locale, valist);
|
||||
__ms_va_end(valist);
|
||||
return res;
|
||||
}
|
||||
|
@ -48,11 +48,19 @@
|
||||
#ifdef CONSOLE
|
||||
#define _GETC_(file) (consumed++, _getch())
|
||||
#define _UNGETC_(nch, file) do { _ungetch(nch); consumed--; } while(0)
|
||||
#ifdef WIDE_SCANF
|
||||
#ifdef SECURE
|
||||
#define _FUNCTION_ static int MSVCRT_vcwscanf_s_l(const char *format, MSVCRT__locale_t locale, __ms_va_list ap)
|
||||
#else /* SECURE */
|
||||
#define _FUNCTION_ static int MSVCRT_vcwscanf_l(const char *format, MSVCRT__locale_t locale, __ms_va_list ap)
|
||||
#endif /* SECURE */
|
||||
#else /* WIDE_SCANF */
|
||||
#ifdef SECURE
|
||||
#define _FUNCTION_ static int MSVCRT_vcscanf_s_l(const char *format, MSVCRT__locale_t locale, __ms_va_list ap)
|
||||
#else /* SECURE */
|
||||
#define _FUNCTION_ static int MSVCRT_vcscanf_l(const char *format, MSVCRT__locale_t locale, __ms_va_list ap)
|
||||
#endif /* SECURE */
|
||||
#endif /* WIDE_SCANF */
|
||||
#else
|
||||
#ifdef STRING
|
||||
#undef _EOF_
|
||||
|
Loading…
x
Reference in New Issue
Block a user