Re: [v2 PATCH 3/4] kernel32: Added support for TIME_NOSECONDS, restructured EnumTimeFormats implementation
Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
-BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW proc, LCID lcid, DWORD flags) +BOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA proc, LCID lcid, DWORD flags) { - WCHAR buf[256]; + struct enumtimeformats_context ctxt;
- if (!proc) + /* EnumTimeFormatsA doesn't support flags, EnumTimeFormatsW does. */ + if (flags & ~LOCALE_USE_CP_ACP) { - SetLastError(ERROR_INVALID_PARAMETER); + SetLastError(ERROR_INVALID_FLAGS);
This change doesn't seem to be confirmed by a test case. -- Dmitry.
On 10.11.2015 17:45, Dmitry Timoshkov wrote:
Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
-BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW proc, LCID lcid, DWORD flags) +BOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA proc, LCID lcid, DWORD flags) { - WCHAR buf[256]; + struct enumtimeformats_context ctxt;
- if (!proc) + /* EnumTimeFormatsA doesn't support flags, EnumTimeFormatsW does. */ + if (flags & ~LOCALE_USE_CP_ACP) { - SetLastError(ERROR_INVALID_PARAMETER); + SetLastError(ERROR_INVALID_FLAGS);
This change doesn't seem to be confirmed by a test case.
It is. Removed error is for 'proc' check, that is moved by this patch.
Nikolay Sivov <bunglehead(a)gmail.com> wrote:
-BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW proc, LCID lcid, DWORD flags) +BOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA proc, LCID lcid, DWORD flags) { - WCHAR buf[256]; + struct enumtimeformats_context ctxt;
- if (!proc) + /* EnumTimeFormatsA doesn't support flags, EnumTimeFormatsW does. */ + if (flags & ~LOCALE_USE_CP_ACP) { - SetLastError(ERROR_INVALID_PARAMETER); + SetLastError(ERROR_INVALID_FLAGS);
This change doesn't seem to be confirmed by a test case.
It is. Removed error is for 'proc' check, that is moved by this patch.
I see, thanks. -- Dmitry.
participants (2)
-
Dmitry Timoshkov -
Nikolay Sivov