Bug #321: dlls/msvct/vf[w]printf functions
Dmitry Timoshkov
dmitry at baikal.ru
Sun Oct 27 23:27:37 CST 2002
"Jaco Greeff" <jaco at puxedo.org> wrote:
> Changelog:
> * dlls/msvcrt/vfprintf.c, dlls/msvcrt/Makefile.in,
> dlls/msvcrt/tests/printf.c, dlls/msvcrt/tests/Makefile.in: Jaco Greeff
> <jaco at puxedo.org>
> - Full implementation to allow for %C & %S in all printf related functions
> - Test case for the printf functions to test all known cases of formatting
> (test case based on example found on MSDN site)
I'm sorry for returning to that topic again and again, but it's really
does matter.
> +static void test_printf(void)
> +{
> + FILE* f;
> + char ch = 'a', *string = "computer";
> + int count = -9234;
> + double fp = 251.7366;
> + wchar_t wch = L'w', *wstring = L"Unicode";
> + void *p = 0x1234ABCD;
Please,
1. use explicit WCHAR type instead of wchar_t.
2. explicitly encode unicode strings.
> wctomb(ch, wch);
3. directly use Win32 conversion APIs (WideCharToMultiByte in this case).
Take a look at other places in the Wine source how to do it properly.
Thanks.
--
Dmitry.
More information about the wine-devel
mailing list