On 30.12.2014 2:06, Sean Burke wrote:
Provides an implementation of time and date format functions added in Vista sufficient to allow some basic applications requiring them to run. Includes necessary tests and header defs.
Sean Burke
Hi, Sean.
As you can see tests are failing on win2000 and winxp because these calls are not available on these platforms. You should use GetProcAddress() to fix that.
+@ stdcall GetDateFormatEx(ptr long ptr wstr ptr long ptr)
First argument should be 'wstr' as well.
+@ stdcall GetTimeFormatEx(ptr long ptr wstr ptr long)
Same.
+INT WINAPI GetDateFormatEx(LPCWSTR lpLocaleName, DWORD dwFlags,
const SYSTEMTIME* lpDate, LPCWSTR lpFormat,
LPWSTR lpDateStr, INT cchDate, LPCWSTR lpCalendar)
Please use cleaner argument names, like 'localename', 'flags', 'date', 'format', etc. So lowercase, no prefix.
- lcid = LocaleNameToLCID(lpLocaleName, 0);
- return NLS_GetDateTimeFormatW(lcid, dwFlags | DATE_DATEVARSONLY, lpDate,
lpFormat, lpDateStr, cchDate);
No real need for temporary 'lcid' variable.
Hi Nikolay,
On 12/29/2014 20:12, Nikolay Sivov wrote:
On 30.12.2014 2:06, Sean Burke wrote:
/ Provides an implementation of time and date format functions added in
/>>/ Vista sufficient to allow some basic applications requiring them to run. />>/ Includes necessary tests and header defs. />>/ />>/ />>/ Sean Burke />>/ />>/ />>/ /
Hi, Sean.
As you can see tests are failing on win2000 and winxp because these calls are not available on these platforms. You should use GetProcAddress() to fix that.
/ +@ stdcall GetDateFormatEx(ptr long ptr wstr ptr long ptr)
/
First argument should be 'wstr' as well.
/ +@ stdcall GetTimeFormatEx(ptr long ptr wstr ptr long)
/
Same.
/ +INT WINAPI GetDateFormatEx(LPCWSTR lpLocaleName, DWORD dwFlags,
/>>/ + const SYSTEMTIME* lpDate, LPCWSTR lpFormat, />>/ + LPWSTR lpDateStr, INT cchDate, LPCWSTR lpCalendar) /
Please use cleaner argument names, like 'localename', 'flags', 'date', 'format', etc. So lowercase, no prefix.
The rest of the file uses argument names directly from the MSDN documentation. I'm inclined to follow this convention as I think it provides a clear and direct connection to the API as documented. However, I am unfamiliar with current wine conventions, so if you still feel this is a worthwhile change, let me know.
/ + lcid = LocaleNameToLCID(lpLocaleName, 0);
/>>/ + />>/ + return NLS_GetDateTimeFormatW(lcid, dwFlags | DATE_DATEVARSONLY, lpDate, />>/ + lpFormat, lpDateStr, cchDate); /
No real need for temporary 'lcid' variable.
Sean Burke
On 04.01.2015 10:11, Seán de Búrca wrote:
Hi Nikolay,
On 12/29/2014 20:12, Nikolay Sivov wrote:
On 30.12.2014 2:06, Sean Burke wrote:
/ Provides an implementation of time and date format functions added in
/>>/ Vista sufficient to allow some basic applications requiring them to run. />>/ Includes necessary tests and header defs. />>/ />>/ />>/ Sean Burke />>/ />>/ />>/ /
Hi, Sean.
As you can see tests are failing on win2000 and winxp because these calls are not available on these platforms. You should use GetProcAddress() to fix that.
/ +@ stdcall GetDateFormatEx(ptr long ptr wstr ptr long ptr)
/
First argument should be 'wstr' as well.
/ +@ stdcall GetTimeFormatEx(ptr long ptr wstr ptr long)
/
Same.
/ +INT WINAPI GetDateFormatEx(LPCWSTR lpLocaleName, DWORD dwFlags,
/>>/ + const SYSTEMTIME* lpDate, LPCWSTR lpFormat, />>/ + LPWSTR lpDateStr, INT cchDate, LPCWSTR lpCalendar) /
Please use cleaner argument names, like 'localename', 'flags', 'date', 'format', etc. So lowercase, no prefix.
The rest of the file uses argument names directly from the MSDN documentation. I'm inclined to follow this convention as I think it provides a clear and direct connection to the API as documented. However, I am unfamiliar with current wine conventions, so if you still feel this is a worthwhile change, let me know.
It doesn't have to directly match MSDN names, in fact it's good to be different in such small things. But if you prefer such naming it's not a stopper for this patch.
/ + lcid = LocaleNameToLCID(lpLocaleName, 0);
/>>/ + />>/ + return NLS_GetDateTimeFormatW(lcid, dwFlags | DATE_DATEVARSONLY, lpDate, />>/ + lpFormat, lpDateStr, cchDate); /
No real need for temporary 'lcid' variable.
Sean Burke