msvcrt: Added _scanf_s(_l) implementation.

This commit is contained in:
Piotr Caban 2010-04-22 13:51:57 +02:00 committed by Alexandre Julliard
parent b38fcabfa0
commit 2c07fad607
4 changed files with 34 additions and 6 deletions

View File

@ -852,7 +852,7 @@
@ cdecl -arch=i386 _safe_fprem1() msvcrt._safe_fprem1
@ cdecl _scalb( double long) msvcrt._scalb
@ varargs _scanf_l(str ptr) msvcrt._scanf_l
@ stub _scanf_s_l
@ varargs _scanf_s_l(str ptr) msvcrt._scanf_s_l
@ stub _scprintf
@ stub _scprintf_l
@ stub _scprintf_p
@ -1359,7 +1359,7 @@
@ cdecl rename(str str) msvcrt.rename
@ cdecl rewind(ptr) msvcrt.rewind
@ varargs scanf(str) msvcrt.scanf
@ stub scanf_s
@ varargs scanf_s(str) msvcrt.scanf_s
@ cdecl setbuf(ptr ptr) msvcrt.setbuf
@ cdecl setlocale(long str) msvcrt.setlocale
@ cdecl setvbuf(ptr str long long) msvcrt.setvbuf

View File

@ -838,7 +838,7 @@
@ cdecl -arch=i386 _safe_fprem1() msvcrt._safe_fprem1
@ cdecl _scalb( double long) msvcrt._scalb
@ varargs _scanf_l(str ptr) msvcrt._scanf_l
@ stub _scanf_s_l
@ varargs _scanf_s_l(str ptr) msvcrt._scanf_s_l
@ stub _scprintf
@ stub _scprintf_l
@ stub _scprintf_p
@ -1343,7 +1343,7 @@
@ cdecl rename(str str) msvcrt.rename
@ cdecl rewind(ptr) msvcrt.rewind
@ varargs scanf(str) msvcrt.scanf
@ stub scanf_s
@ varargs scanf_s(str) msvcrt.scanf_s
@ cdecl setbuf(ptr ptr) msvcrt.setbuf
@ cdecl setlocale(long str) msvcrt.setlocale
@ cdecl setvbuf(ptr str long long) msvcrt.setvbuf

View File

@ -795,7 +795,7 @@
@ cdecl -arch=i386 _safe_fprem1()
@ cdecl _scalb(double long) MSVCRT__scalb
@ varargs _scanf_l(str ptr) MSVCRT__scanf_l
# stub _scanf_s_l
@ varargs _scanf_s_l(str ptr) MSVCRT__scanf_s_l
# stub _scprintf
# stub _scprintf_l
# stub _scprintf_p_l
@ -1293,7 +1293,7 @@
@ cdecl rename(str str) MSVCRT_rename
@ cdecl rewind(ptr) MSVCRT_rewind
@ varargs scanf(str) MSVCRT_scanf
# stub scanf_s
@ varargs scanf_s(str) MSVCRT_scanf_s
@ cdecl setbuf(ptr ptr) MSVCRT_setbuf
@ cdecl -arch=x86_64 -norelay -private setjmp(ptr) MSVCRT__setjmp
@ cdecl setlocale(long str) MSVCRT_setlocale

View File

@ -183,6 +183,34 @@ int CDECL MSVCRT__scanf_l(const char *format, MSVCRT__locale_t locale, ...)
return res;
}
/*********************************************************************
* scanf_s (MSVCRT.@)
*/
int CDECL MSVCRT_scanf_s(const char *format, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, format);
res = MSVCRT_vfscanf_s_l(MSVCRT_stdin, format, NULL, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* _scanf_s_l (MSVCRT.@)
*/
int CDECL MSVCRT__scanf_s_l(const char *format, MSVCRT__locale_t locale, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, locale);
res = MSVCRT_vfscanf_s_l(MSVCRT_stdin, format, locale, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* fwscanf (MSVCRT.@)
*/