Commit 177d5455 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Added _cscanf_s(_l) implementation.

parent a51292e4
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment