msvcrt: Added _sscanf_s(_l) implementation.

This commit is contained in:
Piotr Caban 2010-04-22 13:52:55 +02:00 committed by Alexandre Julliard
parent 98e34c7f82
commit 8386e95afc
4 changed files with 39 additions and 6 deletions

View File

@ -922,7 +922,7 @@
@ stub _sprintf_p_l @ stub _sprintf_p_l
@ stub _sprintf_s_l @ stub _sprintf_s_l
@ varargs _sscanf_l(str str ptr) msvcrt._sscanf_l @ varargs _sscanf_l(str str ptr) msvcrt._sscanf_l
@ stub _sscanf_s_l @ varargs _sscanf_s_l(str str ptr) msvcrt._sscanf_s_l
@ stub _stat32 @ stub _stat32
@ stub _stat32i64 @ stub _stat32i64
@ cdecl _stat64(str ptr) msvcrt._stat64 @ cdecl _stat64(str ptr) msvcrt._stat64
@ -1371,7 +1371,7 @@
@ cdecl sqrt(double) msvcrt.sqrt @ cdecl sqrt(double) msvcrt.sqrt
@ cdecl srand(long) msvcrt.srand @ cdecl srand(long) msvcrt.srand
@ varargs sscanf(str str) msvcrt.sscanf @ varargs sscanf(str str) msvcrt.sscanf
@ stub sscanf_s @ varargs sscanf_s(str str) msvcrt.sscanf_s
@ cdecl strcat(str str) msvcrt.strcat @ cdecl strcat(str str) msvcrt.strcat
@ cdecl strcat_s(str long str) msvcrt.strcat_s @ cdecl strcat_s(str long str) msvcrt.strcat_s
@ cdecl strchr(str long) msvcrt.strchr @ cdecl strchr(str long) msvcrt.strchr

View File

@ -908,7 +908,7 @@
@ stub _sprintf_p_l @ stub _sprintf_p_l
@ stub _sprintf_s_l @ stub _sprintf_s_l
@ varargs _sscanf_l(str str ptr) msvcrt._sscanf_l @ varargs _sscanf_l(str str ptr) msvcrt._sscanf_l
@ stub _sscanf_s_l @ varargs _sscanf_s_l(str str ptr) msvcrt._sscanf_s_l
@ stub _stat32 @ stub _stat32
@ stub _stat32i64 @ stub _stat32i64
@ cdecl _stat64(str ptr) msvcrt._stat64 @ cdecl _stat64(str ptr) msvcrt._stat64
@ -1355,7 +1355,7 @@
@ cdecl sqrt(double) msvcrt.sqrt @ cdecl sqrt(double) msvcrt.sqrt
@ cdecl srand(long) msvcrt.srand @ cdecl srand(long) msvcrt.srand
@ varargs sscanf(str str) msvcrt.sscanf @ varargs sscanf(str str) msvcrt.sscanf
@ stub sscanf_s @ varargs sscanf_s(str str) msvcrt.sscanf_s
@ cdecl strcat(str str) msvcrt.strcat @ cdecl strcat(str str) msvcrt.strcat
@ cdecl strcat_s(str long str) msvcrt.strcat_s @ cdecl strcat_s(str long str) msvcrt.strcat_s
@ cdecl strchr(str long) msvcrt.strchr @ cdecl strchr(str long) msvcrt.strchr

View File

@ -858,7 +858,7 @@
# stub _sprintf_p_l # stub _sprintf_p_l
# stub _sprintf_s_l # stub _sprintf_s_l
@ varargs _sscanf_l(str str ptr) MSVCRT__sscanf_l @ varargs _sscanf_l(str str ptr) MSVCRT__sscanf_l
# stub _sscanf_s_l @ varargs _sscanf_s_l(str str ptr) MSVCRT__sscanf_s_l
@ cdecl _stat(str ptr) MSVCRT_stat @ cdecl _stat(str ptr) MSVCRT_stat
@ cdecl _stat64(str ptr) MSVCRT_stat64 @ cdecl _stat64(str ptr) MSVCRT_stat64
@ cdecl _stati64(str ptr) MSVCRT_stati64 @ cdecl _stati64(str ptr) MSVCRT_stati64
@ -1306,7 +1306,7 @@
@ cdecl sqrt(double) MSVCRT_sqrt @ cdecl sqrt(double) MSVCRT_sqrt
@ cdecl srand(long) MSVCRT_srand @ cdecl srand(long) MSVCRT_srand
@ varargs sscanf(str str) MSVCRT_sscanf @ varargs sscanf(str str) MSVCRT_sscanf
# stub sscanf_s @ varargs sscanf_s(str str) MSVCRT_sscanf_s
@ cdecl strcat(str str) ntdll.strcat @ cdecl strcat(str str) ntdll.strcat
@ cdecl strcat_s(str long str) MSVCRT_strcat_s @ cdecl strcat_s(str long str) MSVCRT_strcat_s
@ cdecl strchr(str long) ntdll.strchr @ cdecl strchr(str long) ntdll.strchr

View File

@ -87,6 +87,10 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) {
#undef SECURE #undef SECURE
#include "scanf.h" #include "scanf.h"
/* vsscanf_s_l */
#define SECURE 1
#include "scanf.h"
/* vswscanf_l */ /* vswscanf_l */
#define WIDE_SCANF 1 #define WIDE_SCANF 1
#undef CONSOLE #undef CONSOLE
@ -361,6 +365,35 @@ int CDECL MSVCRT__sscanf_l(const char *str, const char *format,
return res; return res;
} }
/*********************************************************************
* sscanf_s (MSVCRT.@)
*/
int CDECL MSVCRT_sscanf_s(const char *str, const char *format, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, format);
res = MSVCRT_vsscanf_s_l(str, format, NULL, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* _sscanf_s_l (MSVCRT.@)
*/
int CDECL MSVCRT__sscanf_s_l(const char *str, const char *format,
MSVCRT__locale_t locale, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, locale);
res = MSVCRT_vsscanf_s_l(str, format, locale, valist);
__ms_va_end(valist);
return res;
}
/********************************************************************* /*********************************************************************
* swscanf (MSVCRT.@) * swscanf (MSVCRT.@)
*/ */