Re: [Mingw-w64-public] Strange behavior of snwprintf() function

2012-07-12 Thread JonY
On 7/13/2012 00:21, niXman wrote: > 2012/7/12 niXman: > >> I have only one question: why, with and without the macro results are >> different? > Rafaël has already mentioned POSIX vs non POSIX behavior. > Another strange thing is that none of the developers of mingw-w64 did > not answer, wheth

Re: [Mingw-w64-public] Strange behavior of snwprintf() function

2012-07-12 Thread niXman
2012/7/12 niXman: > I have only one question: why, with and without the macro results are > different? Another strange thing is that none of the developers of mingw-w64 did not answer, whether it is normal or not. -- Regards, niXman ___ Dual-tar

Re: [Mingw-w64-public] Strange behavior of snwprintf() function

2012-07-12 Thread niXman
2012/7/11 Rafaël Carré: I have only one question: why, with and without the macro results are different? -- Regards, niXman ___ Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows: http://sourceforge.net/projects/mingwbuilds/

Re: [Mingw-w64-public] Strange behavior of snwprintf() function

2012-07-10 Thread Rafaël Carré
Hello, Le 2012-07-04 17:46, niXman a écrit : > The following code gives the right result when compiled without Which right result exactly ? My reading of MSDN suggests a negative return value. > defined __USE_MINGW_ANSI_STDIO macro. > But, if __USE_MINGW_ANSI_STDIO macro is defined - the result

Re: [Mingw-w64-public] Strange behavior of snwprintf() function

2012-07-10 Thread niXman
2012/7/6 niXman: > 2012/7/5 niXman: >> 2012/7/4 xunxun: >> >> Thank you for reply. >> >>> Maybe someone can explain it here. >> >> Maybe... > > ping? ping? -- Regards, niXman ___ Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:

Re: [Mingw-w64-public] Strange behavior of snwprintf() function

2012-07-06 Thread niXman
2012/7/5 niXman: > 2012/7/4 xunxun: > > Thank you for reply. > >> Maybe someone can explain it here. > > Maybe... ping? -- Regards, niXman ___ Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows: http://sourceforge.net/projects/ming

Re: [Mingw-w64-public] Strange behavior of snwprintf() function

2012-07-05 Thread niXman
2012/7/4 xunxun: Thank you for reply. > Maybe someone can explain it here. Maybe... -- Regards, niXman ___ Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows: http://sourceforge.net/projects/mingwbuilds/ ---

Re: [Mingw-w64-public] Strange behavior of snwprintf() function

2012-07-04 Thread xunxun
于 2012/7/4 23:46, niXman 写道: > The following code gives the right result when compiled without > defined __USE_MINGW_ANSI_STDIO macro. > But, if __USE_MINGW_ANSI_STDIO macro is defined - the result is 6. > Why? > > code: > #include > int main() { > wchar_t buf[2]; > int len = snwprintf(b

[Mingw-w64-public] Strange behavior of snwprintf() function

2012-07-04 Thread niXman
The following code gives the right result when compiled without defined __USE_MINGW_ANSI_STDIO macro. But, if __USE_MINGW_ANSI_STDIO macro is defined - the result is 6. Why? code: #include int main() { wchar_t buf[2]; int len = snwprintf(buf, sizeof(buf) / 2, L"world!"); printf("%d\n"