EnumDateFormatsA: Add ru_RU locale and default DATE format
Dmitry Timoshkov
dmitry at baikal.ru
Tue Nov 2 21:51:49 CST 2004
"Vitaly Lipatov" <lav at 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.
More information about the wine-devel
mailing list