Commit 133a38fc authored by Eryk Wieliczko's avatar Eryk Wieliczko Committed by Alexandre Julliard

msvcrt: Implement printf_s and wprintf_s.

parent 6296d95b
......@@ -1543,7 +1543,7 @@
@ cdecl perror(str) msvcrt.perror
@ cdecl pow(double double) msvcrt.pow
@ varargs printf(str) msvcrt.printf
@ stub printf_s
@ varargs printf_s(str) msvcrt.printf_s
@ cdecl putc(long ptr) msvcrt.putc
@ cdecl putchar(long) msvcrt.putchar
@ cdecl puts(str) msvcrt.puts
......@@ -1665,6 +1665,6 @@
@ stub wmemcpy_s
@ stub wmemmove_s
@ varargs wprintf(wstr) msvcrt.wprintf
@ stub wprintf_s
@ varargs wprintf_s(wstr) msvcrt.wprintf_s
@ varargs wscanf(wstr) msvcrt.wscanf
@ varargs wscanf_s(wstr) msvcrt.wscanf_s
......@@ -1397,7 +1397,7 @@
@ cdecl perror(str) msvcrt.perror
@ cdecl pow(double double) msvcrt.pow
@ varargs printf(str) msvcrt.printf
@ stub printf_s
@ varargs printf_s(str) msvcrt.printf_s
@ cdecl putc(long ptr) msvcrt.putc
@ cdecl putchar(long) msvcrt.putchar
@ cdecl puts(str) msvcrt.puts
......@@ -1517,6 +1517,6 @@
@ cdecl wctomb(ptr long) msvcrt.wctomb
@ stub wctomb_s
@ varargs wprintf(wstr) msvcrt.wprintf
@ stub wprintf_s
@ varargs wprintf_s(wstr) msvcrt.wprintf_s
@ varargs wscanf(wstr) msvcrt.wscanf
@ varargs wscanf_s(wstr) msvcrt.wscanf_s
......@@ -1381,7 +1381,7 @@
@ cdecl perror(str) msvcrt.perror
@ cdecl pow(double double) msvcrt.pow
@ varargs printf(str) msvcrt.printf
@ stub printf_s
@ varargs printf_s(str) msvcrt.printf_s
@ cdecl putc(long ptr) msvcrt.putc
@ cdecl putchar(long) msvcrt.putchar
@ cdecl puts(str) msvcrt.puts
......@@ -1501,6 +1501,6 @@
@ cdecl wctomb(ptr long) msvcrt.wctomb
@ stub wctomb_s
@ varargs wprintf(wstr) msvcrt.wprintf
@ stub wprintf_s
@ varargs wprintf_s(wstr) msvcrt.wprintf_s
@ varargs wscanf(wstr) msvcrt.wscanf
@ varargs wscanf_s(wstr) msvcrt.wscanf_s
......@@ -3526,6 +3526,19 @@ int CDECL MSVCRT_printf(const char *format, ...)
}
/*********************************************************************
* printf_s (MSVCRT.@)
*/
int CDECL MSVCRT_printf_s(const char *format, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, format);
res = MSVCRT_vprintf_s(format, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* ungetc (MSVCRT.@)
*/
int CDECL MSVCRT_ungetc(int c, MSVCRT_FILE * file)
......@@ -3575,6 +3588,19 @@ int CDECL MSVCRT_wprintf(const MSVCRT_wchar_t *format, ...)
}
/*********************************************************************
* wprintf_s (MSVCRT.@)
*/
int CDECL MSVCRT_wprintf_s(const MSVCRT_wchar_t *format, ...)
{
__ms_va_list valist;
int res;
__ms_va_start(valist, format);
res = MSVCRT_vwprintf_s(format, valist);
__ms_va_end(valist);
return res;
}
/*********************************************************************
* _getmaxstdio (MSVCRT.@)
*/
int CDECL _getmaxstdio(void)
......
......@@ -1339,7 +1339,7 @@
@ cdecl pow(double double) MSVCRT_pow
@ cdecl -arch=x86_64 powf(float float) MSVCRT_powf
@ varargs printf(str) MSVCRT_printf
# stub printf_s
@ varargs printf_s(str) MSVCRT_printf_s
@ cdecl putc(long ptr) MSVCRT_putc
@ cdecl putchar(long) MSVCRT_putchar
@ cdecl puts(str) MSVCRT_puts
......@@ -1470,7 +1470,7 @@
@ cdecl wctomb(ptr long) MSVCRT_wctomb
# stub wctomb_s
@ varargs wprintf(wstr) MSVCRT_wprintf
# stub wprintf_s
@ varargs wprintf_s(wstr) MSVCRT_wprintf_s
@ varargs wscanf(wstr) MSVCRT_wscanf
@ varargs wscanf_s(wstr) MSVCRT_wscanf_s
......
......@@ -148,6 +148,7 @@ int __cdecl getchar(void);
char* __cdecl gets(char*);
void __cdecl perror(const char*);
int __cdecl printf(const char*,...);
int __cdecl printf_s(const char*,...);
int __cdecl putc(int,FILE*);
int __cdecl putchar(int);
int __cdecl puts(const char*);
......@@ -220,6 +221,7 @@ int __cdecl vswprintf_s(wchar_t*,size_t,const wchar_t*,__ms_va_list);
int __cdecl vwprintf(const wchar_t*,__ms_va_list);
int __cdecl vwprintf_s(const wchar_t*,__ms_va_list);
int __cdecl wprintf(const wchar_t*,...);
int __cdecl wprintf_s(const wchar_t*,...);
int __cdecl wscanf(const wchar_t*,...);
int __cdecl wscanf_s(const wchar_t*,...);
#endif /* _WSTDIO_DEFINED */
......
......@@ -316,6 +316,7 @@ int __cdecl vswprintf_s(wchar_t*,size_t,const wchar_t*,__ms_va_list);
int __cdecl vwprintf(const wchar_t*,__ms_va_list);
int __cdecl vwprintf_s(const wchar_t*,__ms_va_list);
int __cdecl wprintf(const wchar_t*,...);
int __cdecl wprintf_s(const wchar_t*,...);
int __cdecl wscanf(const wchar_t*,...);
int __cdecl wscanf_s(const wchar_t*,...);
#endif /* _WSTDIO_DEFINED */
......
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