msvcrt: Added _fwscanf_s(_l) implementation.

This commit is contained in:
Piotr Caban 2010-04-22 13:52:18 +02:00 committed by Alexandre Julliard
parent 2c07fad607
commit 3b99441770
4 changed files with 40 additions and 6 deletions

View File

@ -459,7 +459,7 @@
@ stub _fwprintf_s_l
@ stub _fwrite_nolock
@ varargs _fwscanf_l(ptr wstr ptr) msvcrt._fwscanf_l
@ stub _fwscanf_s_l
@ varargs _fwscanf_s_l(ptr wstr ptr) msvcrt._fwscanf_s_l
@ cdecl _gcvt(double long str) msvcrt._gcvt
@ stub _gcvt_s
@ stub _get_amblksiz
@ -1281,7 +1281,7 @@
@ stub fwprintf_s
@ cdecl fwrite(ptr long long ptr) msvcrt.fwrite
@ varargs fwscanf(ptr wstr) msvcrt.fwscanf
@ stub fwscanf_s
@ varargs fwscanf_s(ptr wstr) msvcrt.fwscanf_s
@ cdecl getc(ptr) msvcrt.getc
@ cdecl getchar() msvcrt.getchar
@ cdecl getenv(str) msvcrt.getenv

View File

@ -451,7 +451,7 @@
@ stub _fwprintf_s_l
@ stub _fwrite_nolock
@ varargs _fwscanf_l(ptr wstr ptr) msvcrt._fwscanf_l
@ stub _fwscanf_s_l
@ varargs _fwscanf_s_l(ptr wstr ptr) msvcrt._fwscanf_s_l
@ cdecl _gcvt(double long str) msvcrt._gcvt
@ stub _gcvt_s
@ stub _get_amblksiz
@ -1265,7 +1265,7 @@
@ stub fwprintf_s
@ cdecl fwrite(ptr long long ptr) msvcrt.fwrite
@ varargs fwscanf(ptr wstr) msvcrt.fwscanf
@ stub fwscanf_s
@ varargs fwscanf_s(ptr wstr) msvcrt.fwscanf_s
@ cdecl getc(ptr) msvcrt.getc
@ cdecl getchar() msvcrt.getchar
@ cdecl getenv(str) msvcrt.getenv

View File

@ -421,7 +421,7 @@
# stub _fwprintf_p_l
# stub _fwprintf_s_l
@ varargs _fwscanf_l(ptr wstr ptr) MSVCRT__fwscanf_l
# stub _fwscanf_s_l
@ varargs _fwscanf_s_l(ptr wstr ptr) MSVCRT__fwscanf_s_l
@ cdecl _gcvt(double long str)
# stub _gcvt_s
# stub _get_doserrno
@ -1212,7 +1212,7 @@
# stub fwprintf_s
@ cdecl fwrite(ptr long long ptr) MSVCRT_fwrite
@ varargs fwscanf(ptr wstr) MSVCRT_fwscanf
# stub fwscanf_s
@ varargs fwscanf_s(ptr wstr) MSVCRT_fwscanf_s
@ cdecl getc(ptr) MSVCRT_getc
@ cdecl getchar() MSVCRT_getchar
@ cdecl getenv(str) MSVCRT_getenv

View File

@ -65,6 +65,7 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) {
#undef SECURE
#include "scanf.h"
/* vfscanf_l */
#define SECURE 1
#include "scanf.h"
@ -75,6 +76,10 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) {
#undef SECURE
#include "scanf.h"
/* vfwscanf_s_l */
#define SECURE 1
#include "scanf.h"
/* vsscanf_l */
#undef WIDE_SCANF
#undef CONSOLE
@ -240,6 +245,35 @@ int CDECL MSVCRT__fwscanf_l(MSVCRT_FILE *file, const MSVCRT_wchar_t *format,
return res;
}
/*********************************************************************
* fwscanf_s (MSVCRT.@)
*/
int CDECL MSVCRT_fwscanf_s(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, format);
res = MSVCRT_vfwscanf_s_l(file, format, NULL, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* _fwscanf_s_l (MSVCRT.@)
*/
int CDECL MSVCRT__fwscanf_s_l(MSVCRT_FILE *file, const MSVCRT_wchar_t *format,
MSVCRT__locale_t locale, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, locale);
res = MSVCRT_vfwscanf_s_l(file, format, locale, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* wscanf (MSVCRT.@)
*/