Re: [PATCH 10/14] [Msvcrt*]: implemented _vc(w)printf
Eric Pouech <eric.pouech(a)orange.fr> writes:
+int CDECL _vcprintf(const char* format, __ms_va_list xvalist) { char buf[2048], *mem = buf; int written, resize = sizeof(buf), retval; - __ms_va_list valist; + __ms_va_list valist = xvalist;
You can't copy a valist. This needs to be integrated properly with the other printf functions. -- Alexandre Julliard julliard(a)winehq.org
Le 03/11/2010 10:53, Alexandre Julliard a écrit :
Eric Pouech<eric.pouech(a)orange.fr> writes:
+int CDECL _vcprintf(const char* format, __ms_va_list xvalist) { char buf[2048], *mem = buf; int written, resize = sizeof(buf), retval; - __ms_va_list valist; + __ms_va_list valist = xvalist; You can't copy a valist. This needs to be integrated properly with the other printf functions.
I therefore suspect MSVCRT_vfprintf (in file.c) to be buggy as well as the va_list isn't reset between calls to MSVCRT_vsnprintf A+ -- Eric Pouech "The problem with designing something completely foolproof is to underestimate the ingenuity of a complete idiot." (Douglas Adams)
Eric Pouech <eric.pouech(a)orange.fr> writes:
I therefore suspect MSVCRT_vfprintf (in file.c) to be buggy as well as the va_list isn't reset between calls to MSVCRT_vsnprintf
Yes, vfprintf has the same issue. -- Alexandre Julliard julliard(a)winehq.org
On Wed, Nov 03, 2010 at 10:53:55AM +0100, Alexandre Julliard wrote:
Eric Pouech <eric.pouech(a)orange.fr> writes:
+int CDECL _vcprintf(const char* format, __ms_va_list xvalist) { char buf[2048], *mem = buf; int written, resize = sizeof(buf), retval; - __ms_va_list valist; + __ms_va_list valist = xvalist;
You can't copy a valist. This needs to be integrated properly with the other printf functions.
Well, you can if you can find a va_copy() function ..... David -- David Laight: david(a)l8s.co.uk
va_copy only exists in C99 wine requires C89 only A+ 2010/11/8 David Laight <david(a)l8s.co.uk>
On Wed, Nov 03, 2010 at 10:53:55AM +0100, Alexandre Julliard wrote:
Eric Pouech <eric.pouech(a)orange.fr> writes:
+int CDECL _vcprintf(const char* format, __ms_va_list xvalist) { char buf[2048], *mem = buf; int written, resize = sizeof(buf), retval; - __ms_va_list valist; + __ms_va_list valist = xvalist;
You can't copy a valist. This needs to be integrated properly with the other printf functions.
Well, you can if you can find a va_copy() function .....
David
-- David Laight: david(a)l8s.co.uk
-- -- Eric Pouech
participants (3)
-
Alexandre Julliard -
David Laight -
Eric Pouech