msvcrt: Added _cscanf_s(_l) implementation.

This commit is contained in:
Piotr Caban 2010-04-22 13:53:28 +02:00 committed by Alexandre Julliard
parent a51292e4dc
commit 177d545592
4 changed files with 38 additions and 6 deletions

View File

@ -342,8 +342,8 @@
@ stub _crt_debugger_hook
@ varargs _cscanf(str) msvcrt._cscanf
@ varargs _cscanf_l(str ptr) msvcrt._cscanf_l
@ stub _cscanf_s
@ stub _cscanf_s_l
@ varargs _cscanf_s(str) msvcrt._cscanf_s
@ varargs _cscanf_s_l(str ptr) msvcrt._cscanf_s_l
@ cdecl _ctime32(ptr) msvcrt._ctime32
@ stub _ctime32_s
@ cdecl _ctime64(ptr) msvcrt._ctime64

View File

@ -334,8 +334,8 @@
@ stub _crt_debugger_hook
@ varargs _cscanf(str) msvcrt._cscanf
@ varargs _cscanf_l(str ptr) msvcrt._cscanf_l
@ stub _cscanf_s
@ stub _cscanf_s_l
@ varargs _cscanf_s(str) msvcrt._cscanf_s
@ varargs _cscanf_s_l(str ptr) msvcrt._cscanf_s_l
@ cdecl _ctime32(ptr) msvcrt._ctime32
@ stub _ctime32_s
@ cdecl _ctime64(ptr) msvcrt._ctime64

View File

@ -315,8 +315,8 @@
# stub _crtDbgFlag
@ varargs _cscanf(str)
@ varargs _cscanf_l(str ptr)
# stub _cscanf_s
# stub _cscanf_s_l
@ varargs _cscanf_s(str)
@ varargs _cscanf_s_l(str ptr)
@ cdecl _ctime32(ptr) MSVCRT__ctime32
# stub _ctime32_s
@ cdecl _ctime64(ptr) MSVCRT__ctime64

View File

@ -109,6 +109,10 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) {
#undef SECURE
#include "scanf.h"
/* vcscanf_s_l */
#define SECURE 1
#include "scanf.h"
/*********************************************************************
* fscanf (MSVCRT.@)
@ -483,3 +487,31 @@ int CDECL _cscanf_l(const char *format, MSVCRT__locale_t locale, ...)
__ms_va_end(valist);
return res;
}
/*********************************************************************
* _cscanf_s (MSVCRT.@)
*/
int CDECL _cscanf_s(const char *format, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, format);
res = MSVCRT_vcscanf_s_l(format, NULL, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* _cscanf_s_l (MSVCRT.@)
*/
int CDECL _cscanf_s_l(const char *format, MSVCRT__locale_t locale, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, locale);
res = MSVCRT_vcscanf_s_l(format, locale, valist);
__ms_va_end(valist);
return res;
}