Commit d09ab74d authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Added _snwscanf implementation.

parent 405e6eb3
......@@ -1101,10 +1101,10 @@
@ stub _snwprintf_l
@ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s
@ stub _snwprintf_s_l
@ stub _snwscanf
@ stub _snwscanf_l
@ stub _snwscanf_s
@ stub _snwscanf_s_l
@ varargs _snwscanf(wstr long wstr) msvcrt._snwscanf
@ varargs _snwscanf_l(wstr long wstr ptr) msvcrt._snwscanf_l
@ varargs _snwscanf_s(wstr long wstr) msvcrt._snwscanf_s
@ varargs _snwscanf_s_l(wstr long wstr ptr) msvcrt._snwscanf_s_l
@ varargs _sopen(str long long) msvcrt._sopen
@ cdecl _sopen_s(ptr str long long long) msvcrt._sopen_s
@ varargs _spawnl(long str str) msvcrt._spawnl
......
......@@ -528,7 +528,7 @@
@ varargs _snprintf(ptr long str) msvcrt._snprintf
@ varargs _snscanf(str long str) msvcrt._snscanf
@ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf
@ stub _snwscanf
@ varargs _snwscanf(wstr long wstr) msvcrt._snwscanf
@ varargs _sopen(str long long) msvcrt._sopen
@ varargs _spawnl(long str str) msvcrt._spawnl
@ varargs _spawnle(long str str) msvcrt._spawnle
......
......@@ -524,7 +524,7 @@
@ varargs _snprintf(str long str) msvcrt._snprintf
@ varargs _snscanf(str long str) msvcrt._snscanf
@ varargs _snwprintf(wstr long wstr) msvcrt._snwprintf
@ stub _snwscanf
@ varargs _snwscanf(wstr long wstr) msvcrt._snwscanf
@ varargs _sopen(str long long) msvcrt._sopen
@ varargs _spawnl(long str str) msvcrt._spawnl
@ varargs _spawnle(long str str) msvcrt._spawnle
......
......@@ -955,10 +955,10 @@
@ stub _snwprintf_l
@ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s
@ stub _snwprintf_s_l
@ stub _snwscanf
@ stub _snwscanf_l
@ stub _snwscanf_s
@ stub _snwscanf_s_l
@ varargs _snwscanf(wstr long wstr) msvcrt._snwscanf
@ varargs _snwscanf_l(wstr long wstr ptr) msvcrt._snwscanf_l
@ varargs _snwscanf_s(wstr long wstr) msvcrt._snwscanf_s
@ varargs _snwscanf_s_l(wstr long wstr ptr) msvcrt._snwscanf_s_l
@ varargs _sopen(str long long) msvcrt._sopen
@ cdecl _sopen_s(ptr str long long long) msvcrt._sopen_s
@ varargs _spawnl(long str str) msvcrt._spawnl
......
......@@ -941,10 +941,10 @@
@ stub _snwprintf_l
@ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s
@ stub _snwprintf_s_l
@ stub _snwscanf
@ stub _snwscanf_l
@ stub _snwscanf_s
@ stub _snwscanf_s_l
@ varargs _snwscanf(wstr long wstr) msvcrt._snwscanf
@ varargs _snwscanf_l(wstr long wstr ptr) msvcrt._snwscanf_l
@ varargs _snwscanf_s(wstr long wstr) msvcrt._snwscanf_s
@ varargs _snwscanf_s_l(wstr long wstr ptr) msvcrt._snwscanf_s_l
@ varargs _sopen(str long long) msvcrt._sopen
@ cdecl _sopen_s(ptr str long long long) msvcrt._sopen_s
@ varargs _spawnl(long str str) msvcrt._spawnl
......
......@@ -884,10 +884,10 @@
# stub _snwprintf_l
@ varargs _snwprintf_s(ptr long long wstr) MSVCRT__snwprintf_s
# stub _snwprintf_s_l
# stub _snwscanf
# stub _snwscanf_l
# stub _snwscanf_s
# stub _snwscanf_s_l
@ varargs _snwscanf(wstr long wstr) MSVCRT__snwscanf
@ varargs _snwscanf_l(wstr long wstr ptr) MSVCRT__snwscanf_l
@ varargs _snwscanf_s(wstr long wstr) MSVCRT__snwscanf_s
@ varargs _snwscanf_s_l(wstr long wstr ptr) MSVCRT__snwscanf_s_l
@ varargs _sopen(str long long) MSVCRT__sopen
@ cdecl _sopen_s(ptr str long long long) MSVCRT__sopen_s
@ varargs _spawnl(long str str)
......
......@@ -99,6 +99,15 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) {
/* vsnscanf_s_l */
#define SECURE
#include "scanf.h"
/* vsnwscanf_l */
#define WIDE_SCANF 1
#undef SECURE
#include "scanf.h"
/* vsnwscanf_s_l */
#define SECURE 1
#include "scanf.h"
#undef STRING_LEN
/* vswscanf_l */
......@@ -650,3 +659,63 @@ int CDECL MSVCRT__snscanf_s_l(char *input, MSVCRT_size_t length,
__ms_va_end(valist);
return res;
}
/*********************************************************************
* _snwscanf (MSVCRT.@)
*/
int CDECL MSVCRT__snwscanf(MSVCRT_wchar_t *input, MSVCRT_size_t length,
const MSVCRT_wchar_t *format, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, format);
res = MSVCRT_vsnwscanf_l(input, length, format, NULL, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* _snwscanf_l (MSVCRT.@)
*/
int CDECL MSVCRT__snwscanf_l(MSVCRT_wchar_t *input, MSVCRT_size_t length,
const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, locale);
res = MSVCRT_vsnwscanf_l(input, length, format, locale, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* _snwscanf_s (MSVCRT.@)
*/
int CDECL MSVCRT__snwscanf_s(MSVCRT_wchar_t *input, MSVCRT_size_t length,
const MSVCRT_wchar_t *format, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, format);
res = MSVCRT_vsnwscanf_s_l(input, length, format, NULL, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* _snscanf_s_l (MSVCRT.@)
*/
int CDECL MSVCRT__snwscanf_s_l(MSVCRT_wchar_t *input, MSVCRT_size_t length,
const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, locale);
res = MSVCRT_vsnwscanf_s_l(input, length, 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