msvcrt: Add support for sprintf_s.

This commit is contained in:
Jason Edmeades 2010-01-10 13:40:40 -08:00 committed by Alexandre Julliard
parent a2d4e5cb5d
commit 97194ec070
2 changed files with 15 additions and 0 deletions

View file

@ -747,6 +747,7 @@
@ cdecl sin(double) MSVCRT_sin
@ cdecl sinh(double) MSVCRT_sinh
@ varargs sprintf(ptr str) MSVCRT_sprintf
@ varargs sprintf_s(ptr long str) MSVCRT_sprintf_s
@ cdecl sqrt(double) MSVCRT_sqrt
@ cdecl srand(long) MSVCRT_srand
@ varargs sscanf(str str) MSVCRT_sscanf

View file

@ -901,6 +901,20 @@ int CDECL MSVCRT_sprintf( char *str, const char *format, ... )
return r;
}
/*********************************************************************
* sprintf_s (MSVCRT.@)
*/
int CDECL MSVCRT_sprintf_s( char *str, MSVCRT_size_t num, const char *format, ... )
{
__ms_va_list ap;
int r;
__ms_va_start( ap, format );
r = MSVCRT_vsnprintf( str, num, format, ap );
__ms_va_end( ap );
return r;
}
/*********************************************************************
* swprintf (MSVCRT.@)
*/