Commit 649a576f authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Copy the msvcrt printf implementation to ntdll to allow supporting MS ABI varargs.

parent 7b82b98e
......@@ -29,6 +29,7 @@ C_SRCS = \
nt.c \
om.c \
path.c \
printf.c \
process.c \
pthread.c \
reg.c \
......
......@@ -1258,8 +1258,8 @@
@ cdecl -private _ltow(long ptr long)
@ cdecl -private _memccpy(ptr ptr long long)
@ cdecl -private _memicmp(str str long)
@ varargs -private _snprintf(ptr long ptr)
@ varargs -private _snwprintf(wstr long wstr)
@ varargs -private _snprintf(ptr long str) NTDLL__snprintf
@ varargs -private _snwprintf(ptr long wstr) NTDLL__snwprintf
@ cdecl -private _splitpath(str ptr ptr ptr ptr)
@ cdecl -private _strcmpi(str str) _stricmp
@ cdecl -private _stricmp(str str)
......@@ -1272,8 +1272,8 @@
@ cdecl -private _ui64tow(double ptr long)
@ cdecl -private _ultoa(long ptr long)
@ cdecl -private _ultow(long ptr long)
@ cdecl -private _vsnprintf(ptr long str ptr)
@ cdecl -private _vsnwprintf(ptr long wstr ptr)
@ cdecl -private _vsnprintf(ptr long str ptr) NTDLL__vsnprintf
@ cdecl -private _vsnwprintf(ptr long wstr ptr) NTDLL__vsnwprintf
@ cdecl -private _wcsicmp(wstr wstr) NTDLL__wcsicmp
@ cdecl -private _wcslwr(wstr) NTDLL__wcslwr
@ cdecl -private _wcsnicmp(wstr wstr long) NTDLL__wcsnicmp
......@@ -1318,7 +1318,7 @@
@ cdecl -private pow(double double) NTDLL_pow
@ cdecl -private qsort(ptr long long ptr) NTDLL_qsort
@ cdecl -private sin(double) NTDLL_sin
@ varargs -private sprintf(str str) NTDLL_sprintf
@ varargs -private sprintf(ptr str) NTDLL_sprintf
@ cdecl -private sqrt(double) NTDLL_sqrt
@ varargs -private sscanf(str str) NTDLL_sscanf
@ cdecl -private strcat(str str) NTDLL_strcat
......@@ -1336,7 +1336,7 @@
@ cdecl -private strstr(str str) NTDLL_strstr
@ cdecl -private strtol(str ptr long) NTDLL_strtol
@ cdecl -private strtoul(str ptr long) NTDLL_strtoul
@ varargs -private swprintf(wstr wstr) NTDLL_swprintf
@ varargs -private swprintf(ptr wstr) NTDLL_swprintf
@ cdecl -private tan(double) NTDLL_tan
@ cdecl -private tolower(long) NTDLL_tolower
@ cdecl -private toupper(long) NTDLL_toupper
......
......@@ -753,52 +753,6 @@ LONG __cdecl NTDLL_atol( const char *nptr )
/*********************************************************************
* sprintf (NTDLL.@)
*/
int __cdecl NTDLL_sprintf( char *str, const char *format, ... )
{
int ret;
va_list valist;
va_start( valist, format );
ret = vsprintf( str, format, valist );
va_end( valist );
return ret;
}
/*********************************************************************
* vsprintf (NTDLL.@)
*/
int __cdecl NTDLL_vsprintf( char *str, const char *format, va_list args )
{
return vsprintf( str, format, args );
}
/*********************************************************************
* _snprintf (NTDLL.@)
*/
int __cdecl _snprintf( char *str, size_t len, const char *format, ... )
{
int ret;
va_list valist;
va_start( valist, format );
ret = vsnprintf( str, len, format, valist );
va_end( valist );
return ret;
}
/*********************************************************************
* _vsnprintf (NTDLL.@)
*/
int __cdecl _vsnprintf( char *str, size_t len, const char *format, va_list args )
{
return vsnprintf( str, len, format, args );
}
/*********************************************************************
* sscanf (NTDLL.@)
*/
int __cdecl NTDLL_sscanf( const char *str, const char *format, ... )
......
......@@ -723,40 +723,3 @@ LONGLONG __cdecl _wtoi64( LPCWSTR str )
return bMinus ? -RunningTotal : RunningTotal;
}
/***********************************************************************
* _snwprintf (NTDLL.@)
*/
int __cdecl _snwprintf(WCHAR *str, unsigned int len, const WCHAR *format, ...)
{
int retval;
va_list valist;
va_start(valist, format);
retval = vsnprintfW(str, len, format, valist);
va_end(valist);
return retval;
}
/***********************************************************************
* swprintf (NTDLL.@)
*/
int __cdecl NTDLL_swprintf(WCHAR *str, const WCHAR *format, ...)
{
int retval;
va_list valist;
va_start(valist, format);
retval = vsnprintfW(str, INT_MAX, format, valist);
va_end(valist);
return retval;
}
/***********************************************************************
* _vsnwprintf (NTDLL.@)
*/
int __cdecl _vsnwprintf( WCHAR *str, unsigned int len, const WCHAR *format, va_list args )
{
return vsnprintfW( str, len, format, args );
}
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