Hi Carlo,
On 2/26/12 12:56 PM, carlo.bramix@libero.it wrote:
I improved the patch according to the suggestions that I received:
- Removed the C++ style comment
- Removed the WARN message
- Added the tests for the new functions. The test has been run successfully
on Ubuntu 11.10.
Sincerely
Thanks for fixing those. This version looks better, but still could use some improvements (mostly for failing tests on win2k).
BOOL WINAPI StrToIntExA(LPCSTR lpszStr, DWORD dwFlags, LPINT lpiRet) { + LARGE_INTEGER li; + BOOL bRes; + + TRACE("(%s,%08X,%p)\n", debugstr_a(lpszStr), dwFlags, lpiRet); + + if (!lpiRet) + return FALSE;
In previous patch you mentioned that Windows crashes in this situation. Thus there is no point in having this check on Wine.
int str_to_int; int str_to_int_ex; int str_to_int_hex; + LONGLONG str_to_int64_ex; + LONGLONG str_to_int64_hex;
AFAICS int str_to_int* always matches str_to_int64* values except for overflows. It means that you could simply change str_to_int_* to be LONGLONG and simply cast it to int before using it in existing tests.
+ { "0x44ff", 0, 0, 0x44ff, 0, 0x44ff }, + { "0x2bdc546291f4b1", 0, 0, 0x6291f4b1, 0, 0x2bdc546291f4b1 },
64-bit literals are not portable. Something like ((ULONGLONG)0x2bdc54<<32) | (ULONGLONG)0x6291f4b1 would do the trick.
+ while (result->string) + { + return_val = -1; + bRet = StrToInt64ExA(result->string,0,&return_val);
This function is not available on win2k (http://testbot.winehq.org/JobDetails.pl?Key=17105&scrshot_202=1#k202), so it needs to be loaded dynamically via GetProcAddress. See how other functions are handled.
Cheers, Jacek