"Vitaly Lipatov" lav@etersoft.ru wrote:
Changelog: EnumDateFormatsA:
- Add ru_RU locale (0x419)
That's a completely broken implementation, please do not extend it. It should retrieve the data from the kernel32 locale database (have a look at dlls/kernel/nls).
- Use DATE_SHORTDATE when dwFlags is 0
- Ignore LOCALE_USE_CP_ACP bit in dwFlags (I can't find a difference in
Windows behavior with this flag)
It would be nice to see a test case for that.
Also please use a common indent 4 spaces as (almost) everywhere in Wine.
В сообщении от Вторник 02 Ноябрь 2004 19:10 Dmitry Timoshkov написал(a):
"Vitaly Lipatov" lav@etersoft.ru wrote:
Changelog: EnumDateFormatsA:
- Add ru_RU locale (0x419)
That's a completely broken implementation, please do not extend it. It should retrieve the data from the kernel32 locale database (have a look at dlls/kernel/nls).
I guess it... after I realized my hack. Well, will I reimplement EnumDateFormats or anyone?
- Use DATE_SHORTDATE when dwFlags is 0
- Ignore LOCALE_USE_CP_ACP bit in dwFlags (I can't find a difference in
Windows behavior with this flag)
It would be nice to see a test case for that.
How I can show test case to you if I compare result of my small program between WINE и Win2003?
Also please use a common indent 4 spaces as (almost) everywhere in Wine.
Sorry.
P.S. Dmitry, can we talk about some details in russian (in private letter?) My English is very ugly and I have
"Vitaly Lipatov" lav@etersoft.ru wrote:
That's a completely broken implementation, please do not extend it. It should retrieve the data from the kernel32 locale database (have a look at dlls/kernel/nls).
I guess it... after I realized my hack. Well, will I reimplement EnumDateFormats or anyone?
That should not be too much work, actually that will simplify things a lot. New implementation would look like the following:
BOOL WINAPI EnumDateFormatsA(DATEFMT_ENUMPROCA proc, LCID lcid, DWORD flags) { char buf[256];
switch (flags) { case DATE_SHORTDATE: if (GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, 256)) proc(buf); break;
case DATE_LONGDATE: if (GetLocaleInfoA(lcid, LOCALE_SLONGDATE, buf, 256)) proc(buf); break;
default: FIXME("Unknown date format (%ld)\n", flags); SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } return TRUE; }
Same for EnumDateFormatsW and EnumTimeFormatsA/W. If you could implement them that would be great.
- Use DATE_SHORTDATE when dwFlags is 0
- Ignore LOCALE_USE_CP_ACP bit in dwFlags (I can't find a difference in
Windows behavior with this flag)
It would be nice to see a test case for that.
How I can show test case to you if I compare result of my small program between WINE и Win2003?
Just add another small test case to dlls/kernel/tests/locale.c.
P.S. Dmitry, can we talk about some details in russian (in private letter?) My English is very ugly and I have
Sure, mail me anytime you wish, just take into account time difference with Irkutsk (+5).
-- Dmitry.