[MSVCRT] Add _snwscanf

This commit is contained in:
Mark Jansen 2020-03-15 01:03:14 +01:00
parent 550ce7e818
commit 315765ed8b
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
2 changed files with 24 additions and 1 deletions

View file

@ -95,6 +95,14 @@ static int wchar2digit(wchar_t c, int base) {
#undef SECURE
#include "scanf.h"
/* vsnwscanf_l */
#define WIDE_SCANF 1
#undef CONSOLE
#define STRING 1
#define STRING_LEN 1
#undef SECURE
#include "scanf.h"
#ifndef _LIBCNT_
/* vcscanf_l */
#undef WIDE_SCANF
@ -208,6 +216,21 @@ int CDECL _cscanf(const char *format, ...)
}
#endif
/*********************************************************************
* _snwscanf (MSVCRT.@)
*/
int WINAPIV _snwscanf(const wchar_t *input, size_t length,
const wchar_t *format, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, format);
res = vsnwscanf_l(input, length, format, NULL, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* _snscanf (MSVCRT.@)
*/