Commit f44e90d2 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Add a few printf functions.

parent 9a044007
...@@ -1444,8 +1444,10 @@ ...@@ -1444,8 +1444,10 @@
@ cdecl _memccpy(ptr ptr long long) @ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long) @ cdecl _memicmp(str str long)
@ varargs _snprintf(ptr long str) NTDLL__snprintf @ varargs _snprintf(ptr long str) NTDLL__snprintf
@ varargs _snprintf_s(ptr long long str) _snprintf_s @ varargs _snprintf_s(ptr long long str)
@ varargs _snwprintf(ptr long wstr) NTDLL__snwprintf @ varargs _snwprintf(ptr long wstr) NTDLL__snwprintf
@ varargs _snwprintf_s(ptr long long wstr)
@ varargs _swprintf(ptr wstr) NTDLL_swprintf
@ cdecl _splitpath(str ptr ptr ptr ptr) @ cdecl _splitpath(str ptr ptr ptr ptr)
@ cdecl _strcmpi(str str) _stricmp @ cdecl _strcmpi(str str) _stricmp
@ cdecl _stricmp(str str) @ cdecl _stricmp(str str)
...@@ -1459,8 +1461,10 @@ ...@@ -1459,8 +1461,10 @@
@ cdecl _ultoa(long ptr long) @ cdecl _ultoa(long ptr long)
@ cdecl _ultow(long ptr long) @ cdecl _ultow(long ptr long)
@ cdecl -norelay _vsnprintf(ptr long str ptr) NTDLL__vsnprintf @ cdecl -norelay _vsnprintf(ptr long str ptr) NTDLL__vsnprintf
@ cdecl _vsnprintf_s(ptr long str ptr) _vsnprintf_s @ cdecl _vsnprintf_s(ptr long str ptr)
@ cdecl _vsnwprintf(ptr long wstr ptr) NTDLL__vsnwprintf @ cdecl _vsnwprintf(ptr long wstr ptr) NTDLL__vsnwprintf
@ cdecl _vsnwprintf_s(ptr long long wstr ptr)
@ cdecl _vswprintf(ptr wstr ptr) NTDLL__vswprintf
@ cdecl _wcsicmp(wstr wstr) NTDLL__wcsicmp @ cdecl _wcsicmp(wstr wstr) NTDLL__wcsicmp
@ cdecl _wcslwr(wstr) NTDLL__wcslwr @ cdecl _wcslwr(wstr) NTDLL__wcslwr
@ cdecl _wcsnicmp(wstr wstr long) NTDLL__wcsnicmp @ cdecl _wcsnicmp(wstr wstr long) NTDLL__wcsnicmp
...@@ -1506,6 +1510,7 @@ ...@@ -1506,6 +1510,7 @@
@ cdecl qsort(ptr long long ptr) NTDLL_qsort @ cdecl qsort(ptr long long ptr) NTDLL_qsort
@ cdecl sin(double) NTDLL_sin @ cdecl sin(double) NTDLL_sin
@ varargs sprintf(ptr str) NTDLL_sprintf @ varargs sprintf(ptr str) NTDLL_sprintf
@ varargs sprintf_s(ptr long str)
@ cdecl sqrt(double) NTDLL_sqrt @ cdecl sqrt(double) NTDLL_sqrt
@ varargs sscanf(str str) NTDLL_sscanf @ varargs sscanf(str str) NTDLL_sscanf
@ cdecl strcat(str str) NTDLL_strcat @ cdecl strcat(str str) NTDLL_strcat
...@@ -1525,6 +1530,7 @@ ...@@ -1525,6 +1530,7 @@
@ cdecl strtol(str ptr long) NTDLL_strtol @ cdecl strtol(str ptr long) NTDLL_strtol
@ cdecl strtoul(str ptr long) NTDLL_strtoul @ cdecl strtoul(str ptr long) NTDLL_strtoul
@ varargs swprintf(ptr wstr) NTDLL_swprintf @ varargs swprintf(ptr wstr) NTDLL_swprintf
@ varargs swprintf_s(ptr long wstr)
@ cdecl tan(double) NTDLL_tan @ cdecl tan(double) NTDLL_tan
@ cdecl tolower(long) NTDLL_tolower @ cdecl tolower(long) NTDLL_tolower
@ cdecl toupper(long) NTDLL_toupper @ cdecl toupper(long) NTDLL_toupper
...@@ -1533,6 +1539,8 @@ ...@@ -1533,6 +1539,8 @@
@ stdcall vDbgPrintEx(long long str ptr) @ stdcall vDbgPrintEx(long long str ptr)
@ stdcall vDbgPrintExWithPrefix(str long long str ptr) @ stdcall vDbgPrintExWithPrefix(str long long str ptr)
@ cdecl vsprintf(ptr str ptr) NTDLL_vsprintf @ cdecl vsprintf(ptr str ptr) NTDLL_vsprintf
@ cdecl vsprintf_s(ptr long str ptr)
@ cdecl vswprintf_s(ptr long wstr ptr)
@ cdecl wcscat(wstr wstr) NTDLL_wcscat @ cdecl wcscat(wstr wstr) NTDLL_wcscat
@ cdecl wcschr(wstr long) NTDLL_wcschr @ cdecl wcschr(wstr long) NTDLL_wcschr
@ cdecl wcscmp(wstr wstr) NTDLL_wcscmp @ cdecl wcscmp(wstr wstr) NTDLL_wcscmp
......
...@@ -798,6 +798,27 @@ int CDECL _vsnprintf_s( char *str, SIZE_T size, SIZE_T len, const char *format, ...@@ -798,6 +798,27 @@ int CDECL _vsnprintf_s( char *str, SIZE_T size, SIZE_T len, const char *format,
} }
/***********************************************************************
* _vsnwprintf_s (NTDLL.@)
*/
int CDECL _vsnwprintf_s( WCHAR *str, SIZE_T size, SIZE_T len, const WCHAR *format, __ms_va_list args )
{
pf_output out;
int r;
out.unicode = TRUE;
out.buf.W = str;
out.used = 0;
out.len = min( size, len );
r = pf_vsnprintf( &out, format, args );
if (out.used < size) str[out.used] = 0;
else str[0] = 0;
if (r == size) r = -1;
return r;
}
/********************************************************************* /*********************************************************************
* _snprintf_s (NTDLL.@) * _snprintf_s (NTDLL.@)
*/ */
...@@ -814,6 +835,21 @@ int WINAPIV _snprintf_s( char *str, SIZE_T size, SIZE_T len, const char *format, ...@@ -814,6 +835,21 @@ int WINAPIV _snprintf_s( char *str, SIZE_T size, SIZE_T len, const char *format,
/********************************************************************* /*********************************************************************
* _snwprintf_s (NTDLL.@)
*/
int WINAPIV _snwprintf_s( WCHAR *str, SIZE_T size, SIZE_T len, const WCHAR *format, ... )
{
int ret;
__ms_va_list valist;
__ms_va_start( valist, format );
ret = _vsnwprintf_s( str, size, len, format, valist );
__ms_va_end( valist );
return ret;
}
/*********************************************************************
* vsprintf (NTDLL.@) * vsprintf (NTDLL.@)
*/ */
int CDECL NTDLL_vsprintf( char *str, const char *format, __ms_va_list args ) int CDECL NTDLL_vsprintf( char *str, const char *format, __ms_va_list args )
...@@ -823,6 +859,33 @@ int CDECL NTDLL_vsprintf( char *str, const char *format, __ms_va_list args ) ...@@ -823,6 +859,33 @@ int CDECL NTDLL_vsprintf( char *str, const char *format, __ms_va_list args )
/********************************************************************* /*********************************************************************
* vsprintf_s (NTDLL.@)
*/
int CDECL vsprintf_s( char *str, SIZE_T size, const char *format, __ms_va_list args )
{
return _vsnprintf_s( str, size, size, format, args );
}
/*********************************************************************
* _vswprintf (NTDLL.@)
*/
int CDECL NTDLL__vswprintf( WCHAR *str, const WCHAR *format, __ms_va_list args )
{
return NTDLL__vsnwprintf( str, size_max, format, args );
}
/*********************************************************************
* vswprintf_s (NTDLL.@)
*/
int CDECL vswprintf_s( WCHAR *str, SIZE_T size, const WCHAR *format, __ms_va_list args )
{
return _vsnwprintf_s( str, size, size, format, args );
}
/*********************************************************************
* sprintf (NTDLL.@) * sprintf (NTDLL.@)
*/ */
int WINAPIV NTDLL_sprintf( char *str, const char *format, ... ) int WINAPIV NTDLL_sprintf( char *str, const char *format, ... )
...@@ -837,6 +900,21 @@ int WINAPIV NTDLL_sprintf( char *str, const char *format, ... ) ...@@ -837,6 +900,21 @@ int WINAPIV NTDLL_sprintf( char *str, const char *format, ... )
} }
/*********************************************************************
* sprintf_s (NTDLL.@)
*/
int WINAPIV sprintf_s( char *str, SIZE_T size, const char *format, ... )
{
int ret;
__ms_va_list valist;
__ms_va_start( valist, format );
ret = vsprintf_s( str, size, format, valist );
__ms_va_end( valist );
return ret;
}
/*********************************************************************** /***********************************************************************
* swprintf (NTDLL.@) * swprintf (NTDLL.@)
*/ */
...@@ -850,3 +928,18 @@ int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... ) ...@@ -850,3 +928,18 @@ int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... )
__ms_va_end(valist); __ms_va_end(valist);
return ret; return ret;
} }
/***********************************************************************
* swprintf_s (NTDLL.@)
*/
int WINAPIV swprintf_s( WCHAR *str, SIZE_T size, const WCHAR *format, ... )
{
int ret;
__ms_va_list valist;
__ms_va_start(valist, format);
ret = vswprintf_s( str, size, format, valist );
__ms_va_end(valist);
return ret;
}
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